Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v18] Design de la page "Tous les tags" #3502

Merged
merged 1 commit into from
Apr 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 %}