Highlight current project.

This commit is contained in:
Pēteris Caune 2019-02-01 14:24:50 +02:00
parent 1b085a154b
commit ae77f0bbd5
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
2 changed files with 39 additions and 16 deletions

View File

@ -6,8 +6,29 @@
text-decoration: none;
}
#project-selector a:hover .panel {
#project-selector a:hover .project {
border-color: #0091EA;
}
#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;
}

View File

@ -22,8 +22,11 @@
{% for project in projects%}
<a href="{% url 'hc-checks' project.code %}">
<div class="col-sm-6 col-md-4">
<div class="panel panel-default">
<div class="panel-body">
<div class="panel project {% if project == request.profile.current_project %}selected{% endif %}">
{% if project == request.profile.current_project %}
<div class="marker">Current Project</div>
{% endif %}
<h4>{{ project }}</h4>
<div>
{% with project.check_set.count as n %}
@ -39,7 +42,6 @@
</div>
</div>
</div>
</div>
</a>
{% empty %}
<div class="col-sm-12">