This commit is contained in:
Alexandre Vicenzi 2017-04-22 20:16:33 -03:00
parent 1802e84241
commit 46fe5918cd
11 changed files with 701 additions and 2684 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 382 KiB

View file

@ -122,7 +122,9 @@ main {
font-size: .72em;
padding: 14px 0 14px 0;
border-bottom: @nav-border-color 1px solid;
}
nav, .translations {
a {
padding: 0 4px 0 4px;
border-left: @nav-border-color 1px solid;
@ -170,9 +172,8 @@ main {
.translations {
float: right;
.lang-current {
color: @white;
background-color: @grey;
.active {
font-weight: 600;
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -13,8 +13,10 @@
{% block content %}
<article class="single">
<header>
{% if not ARTICLE_HIDE_TRANSLATION %}
{% import 'partial/translations.html' as translations with context %}
{{ translations.translations_for(article) }}
{% endif %}
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
<p>
{{ _('Posted on %(when)s in %(category)s',

View file

@ -1,10 +1,10 @@
{% macro translations_for(article) %}
{% if article.translations %}
<div class="translations">
<span class="lang lang-current">{{article.lang}}</span>
{% for translation in article.translations %}
<a class="lang" href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor %}
</div>
{% endif %}
{% if article.translations %}
<div class="translations">
<a class="active" href="{{ SITEURL }}/{{ article.url }}">{{article.lang}}</a>
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor %}
</div>
{% endif %}
{% endmacro %}