diff options
Diffstat (limited to 'templates/page.html')
-rw-r--r-- | templates/page.html | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/templates/page.html b/templates/page.html index a442437..06dca0b 100644 --- a/templates/page.html +++ b/templates/page.html @@ -9,18 +9,46 @@ {% endif %} {% endblock %} {% block header %} - <h1>{{ page.title }}</h1> - <p class="publish-date">Published {{ page.date | date(format="%b %d, %Y - %H:%M UTC") }} on - {% if page.permalink is containing("weblog") %} - <a href="/weblog">Yaroslav's weblog</a></p> - {% elif page.permalink is containing("food") %} - <a href="/food">Yaroslav's recipe book</a></p> - {% endif %} - {% if page.updated %} - <p class="publish-date">Last edited {{ page.updated | date(format="%b %d, %Y - %H:%M UTC") }}</p> - {% endif %} +<h1>{{ page.title }}</h1> +<p class="publish-date"> + {{ trans(key="published", lang=lang) }} + {{ page.date | date(format="%Y-%m-%d %H:%M UTC") }} + {{ trans(key="published_on", lang=lang) }} + {% if page.permalink is containing("weblog") %} + <a href="{% if lang != "en" %}/{{ lang }}{% endif %}/weblog"> + {{ trans(key="weblog_title", lang=lang) }} + </a> + {% elif page.permalink is containing("food") %} + <a href="{% if lang != "en" %}/{{ lang }}{% endif %}/food"> + {{ trans(key="recipes_title", lang=lang) }} + </a></p> + {% endif %} +</p> +{% if page.updated %} +<p class="publish-date"> + {{ trans(key="edited", lang=lang) }} + {{ page.updated | date(format="%Y-%m-%d %H:%M UTC") }} +</p> +{% endif %} +{% if page.translations | length > 1 %} +{% for trans in page.translations %} +{% if trans.lang != lang %} +{% if trans.lang == "ru" %} +<p class="publish-date"> + Доступно на русском: <a href="{{ trans.permalink }}">{{ trans.title }}</a> +</p> +{% elif trans.lang == "es" %} +<p class="publish-date"> + Disponible en español: <a href="{{ trans.permalink }}">{{ trans.title }}</a> +</p> +{% else %} +<p class="publish-date"> + Available in English: <a href="{{ trans.permalink }}">{{ trans.title }}</a> +</p> +{% endif %} +{% endif %} +{% endfor %} +{% endif %} {% endblock %} {% block content %} <div class="post-container"> |