diff --git a/assets/styles/components/project/project.scss b/assets/styles/components/project/project.scss index abcd37f..8cfb24a 100644 --- a/assets/styles/components/project/project.scss +++ b/assets/styles/components/project/project.scss @@ -6,38 +6,73 @@ } .project-success { - background-color: #d1e7dd; + background-color: $green-200; } .project-warning { - background-color: #fff3cd; + background-color: $yellow-200; } .project-danger { - background-color: #f8d7da; + background-color: $red-200; } .project-other { - background-color: #e2e3e5; + background-color: $gray-200; +} +.icon-toggle { + & > span { + font-family: var(--bs-body-font-family); + text-transform:capitalize; + color: var(--bs-body-color); + } + &:before {padding-right: 0.4rem;} + &.icon-state-danger { color: $red-200; } + &.icon-state-warning { color: $yellow-200; } + &.icon-state-success { color: $green-200; } + &.icon-state-other { color: $gray-200; } +} +.btn-toggle-up-to-date-grey { + & > .icon-toggle { + & > span, + &.icon-state-danger, + &.icon-state-warning, + &.icon-state-success, + &.icon-state-other { + color: $gray-600; + } + } } .project-item { position: relative; + h2 { + margin-bottom: 1rem; + } + p { + font-size:0.8em; + margin-bottom:0; + } } .project-action-btn { - display: none; + opacity: 0; + transition: opacity; + transition-timing-function: ease-out; + transition-duration: 250ms; position: absolute; - right: 0.5rem; + bottom:0.2rem; padding: 0; &.edit { - top: 0.5rem; + left:0.4rem; } &.delete { - bottom: 0.5rem; - right: 0.75rem; + right: 0.45rem; } } .project-item:hover .project-action-btn { - display: block; + opacity:1; + transition: opacity; + transition-timing-function: ease-out; + transition-duration: 250ms; } .project-launcher { diff --git a/src/Controller/ProjectController.php b/src/Controller/ProjectController.php index 3868d56..b2e130c 100644 --- a/src/Controller/ProjectController.php +++ b/src/Controller/ProjectController.php @@ -38,7 +38,7 @@ public function index(Request $request, ProjectRepository $projectRepository): R { $page = $request->query->get('page', 0); $nbItems = $projectRepository->countByAllowedUser($this->getUser()); - $limit = 12; + $limit = 24; return $this->render('project/index.html.twig', [ 'currentPage' => $page, 'nbPages' => ceil($nbItems/$limit), diff --git a/templates/project/index.html.twig b/templates/project/index.html.twig index 19fc37c..dd366a0 100644 --- a/templates/project/index.html.twig +++ b/templates/project/index.html.twig @@ -8,13 +8,14 @@
{{ project.lastAnalyse ? project.lastAnalyse.date|date('d/m/Y H:i:s') : 'No analyse available' }}
+{{ project.lastAnalyse ? project.lastAnalyse.date|date('d M Y - H:i') : 'No analyse available' }}
{% if is_granted('PROJECT_EDIT', project) %} diff --git a/templates/project/show.html.twig b/templates/project/show.html.twig index f3b19f3..da21c67 100644 --- a/templates/project/show.html.twig +++ b/templates/project/show.html.twig @@ -47,7 +47,13 @@{{ item.type }} | {% if item.state < 0 %} @@ -192,4 +198,22 @@ }); {% endif %} + {% endblock %} \ No newline at end of file |