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

File diff suppressed because one or more lines are too long

View file

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

View file

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