Skip to content

Commit

Permalink
Design de la page "Tous les tags"
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed Apr 4, 2016
1 parent 7d1e2c5 commit 116272b
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 29 deletions.
Binary file added assets/images/sprite/tags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 31 additions & 13 deletions assets/scss/components/_tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,42 @@
}
}

.content-tags-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;

&:after {
content: '';
display: block;
flex: 20;
}
}

.content-tag {
display: inline-block;
padding: 5px;
box-sizing: border-box;
color: white;
margin: 0 5px 20px;
line-height: 1.4em;
white-space: nowrap;
flex: auto;

a {
color: #777;
display: block;
padding: 5px 10px;
padding: 8px 15px;
text-decoration: none;
color: rgba(255, 255, 255, .7);
background: $color-primary;
border: solid 1px rgba(0, 0, 0, .5);
}
background-color: #EEE;
transition: all $transition-duration ease;
border: solid 1px #CCC;

strong {
display: block;
color: white;
&:hover, &:focus {
color: #EEE;
background-color: #777;
border-color: #777;
outline: none;
}

.tag-count {
color: #AAA;
}
}
}
}
3 changes: 3 additions & 0 deletions assets/scss/layout/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
&.ico-forum:after {
@include sprite-position($forum-heading);
}
&.ico-tags:after {
@include sprite-position($tags);
}

&.illu img {
position: absolute;
Expand Down
34 changes: 18 additions & 16 deletions templates/tutorialv2/view/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@



{% block headline %}

{% endblock %}



{% block content %}
{% for tag in tags %}
<div class="content-tag">
<a href="{% url 'content:list' %}?tag={{ tag.slug }}">
<strong>{{ tag }}</strong>
<span>{{ tag.num_content }} {% trans "contenu" %}{{ tag.num_content|pluralize }}</span>
</a>
{% block content_out %}
<section class="full-content-wrapper">
<h2 class="ico-after ico-tags">
Tous les tags
</h2>

<div class="content-tags-list">
{% for tag in tags %}
<div class="content-tag">
<a href="{% url 'content:list' %}?tag={{ tag.slug }}">
<div class="tag-title">{{ tag }}</div>
<div class="tag-count">{{ tag.num_content }} {% trans "contenu" %}{{ tag.num_content|pluralize }}</div>
</a>
</div>
{% empty %}
<p>{% trans "Aucun tag." %}</p>
{% endfor %}
</div>
{% empty %}
<p>{% trans "Aucun tag." %}</p>
{% endfor %}
</section>
{% endblock %}

0 comments on commit 116272b

Please sign in to comment.