From ae77f0bbd52d19849131dfafabea0ecf2e3fd6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 1 Feb 2019 14:24:50 +0200 Subject: [PATCH] Highlight current project. --- static/css/projects.css | 23 ++++++++++++++++++++++- templates/front/projects.html | 32 +++++++++++++++++--------------- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/static/css/projects.css b/static/css/projects.css index e18112a2..711f2270 100644 --- a/static/css/projects.css +++ b/static/css/projects.css @@ -6,8 +6,29 @@ text-decoration: none; } +#project-selector a:hover .project { + border-color: #0091EA; +} -#project-selector a:hover .panel { +#project-selector .project { + border-color: #ddd; + padding: 24px; + position: relative; +} + +#project-selector .project.selected { border-color: #0091EA; } +#project-selector .project.selected .marker { + display: block; + position: absolute; + top: 0; + font-size: 10px; + padding: 2px 8px; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + color: #fff; + background: #0091EA; + text-transform: uppercase; +} diff --git a/templates/front/projects.html b/templates/front/projects.html index e9d00322..0c652947 100644 --- a/templates/front/projects.html +++ b/templates/front/projects.html @@ -22,21 +22,23 @@ {% for project in projects%}
-
-
-

{{ project }}

-
- {% with project.check_set.count as n %} - {{ n }} check{{ n|pluralize }}, - {% endwith %} - - {% with project.channel_set.count as n %} - {{ n }} integration{{ n|pluralize }} - {% endwith %} -
-
- {{ project.owner.email }} -
+
+ {% if project == request.profile.current_project %} +
Current Project
+ {% endif %} + +

{{ project }}

+
+ {% with project.check_set.count as n %} + {{ n }} check{{ n|pluralize }}, + {% endwith %} + + {% with project.channel_set.count as n %} + {{ n }} integration{{ n|pluralize }} + {% endwith %} +
+
+ {{ project.owner.email }}