Browse Source

Highlight current project.

pull/217/head
Pēteris Caune 6 years ago
parent
commit
ae77f0bbd5
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
2 changed files with 39 additions and 16 deletions
  1. +22
    -1
      static/css/projects.css
  2. +17
    -15
      templates/front/projects.html

+ 22
- 1
static/css/projects.css View File

@ -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;
}

+ 17
- 15
templates/front/projects.html View File

@ -22,21 +22,23 @@
{% 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">
<h4>{{ project }}</h4>
<div>
{% with project.check_set.count as n %}
{{ n }} check{{ n|pluralize }},
{% endwith %}
{% with project.channel_set.count as n %}
{{ n }} integration{{ n|pluralize }}
{% endwith %}
</div>
<div class="text-muted">
{{ project.owner.email }}
</div>
<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 %}
{{ n }} check{{ n|pluralize }},
{% endwith %}
{% with project.channel_set.count as n %}
{{ n }} integration{{ n|pluralize }}
{% endwith %}
</div>
<div class="text-muted">
{{ project.owner.email }}
</div>
</div>
</div>


Loading…
Cancel
Save