diff --git a/nikola/data/themes/base-jinja/templates/archiveindex.tmpl b/nikola/data/themes/base-jinja/templates/archiveindex.tmpl index 67dd787507..2a3d8bc109 100644 --- a/nikola/data/themes/base-jinja/templates/archiveindex.tmpl +++ b/nikola/data/themes/base-jinja/templates/archiveindex.tmpl @@ -1,11 +1,11 @@ {# -*- coding: utf-8 -*- #} {% extends 'index.tmpl' %} {% import 'archive_navigation_helper.tmpl' as archive_nav with context %} -{% import 'feed_helper.tmpl' as feed with context %} +{% import 'translation_link_helper.tmpl' as translation_links with context %} {% block extra_head %} {{ super() }} - {{ feed.head(archive_name) }} + {{ translation_links.head(archive_name) }} {% endblock %} {% block content_header %} diff --git a/nikola/data/themes/base-jinja/templates/author.tmpl b/nikola/data/themes/base-jinja/templates/author.tmpl index 6859e2136a..ae304c0322 100644 --- a/nikola/data/themes/base-jinja/templates/author.tmpl +++ b/nikola/data/themes/base-jinja/templates/author.tmpl @@ -1,10 +1,10 @@ {# -*- coding: utf-8 -*- #} {% extends 'list_post.tmpl' %} -{% import 'feed_helper.tmpl' as feed with context %} +{% import 'translation_link_helper.tmpl' as translation_links with context %} {% block extra_head %} {{ super() }} - {{ feed.head(author) }} + {{ translation_links.head(author) }} {% endblock %} @@ -16,7 +16,7 @@

{{ description }}

{% endif %}
- {{ feed.link(author) }} + {{ translation_links.link(author) }}
{% if posts %} diff --git a/nikola/data/themes/base-jinja/templates/authorindex.tmpl b/nikola/data/themes/base-jinja/templates/authorindex.tmpl index f33ba213c0..cfed736d0a 100644 --- a/nikola/data/themes/base-jinja/templates/authorindex.tmpl +++ b/nikola/data/themes/base-jinja/templates/authorindex.tmpl @@ -1,8 +1,8 @@ {# -*- coding: utf-8 -*- #} {% extends 'index.tmpl' %} -{% import 'feed_helper.tmpl' as feed with context %} +{% import 'translation_link_helper.tmpl' as translation_links with context %} {% block extra_head %} {{ super() }} - {{ feed.head(author) }} + {{ translation_links.head(author) }} {% endblock %} diff --git a/nikola/data/themes/base-jinja/templates/base_helper.tmpl b/nikola/data/themes/base-jinja/templates/base_helper.tmpl index ae88fdd99f..d5d0b698fe 100644 --- a/nikola/data/themes/base-jinja/templates/base_helper.tmpl +++ b/nikola/data/themes/base-jinja/templates/base_helper.tmpl @@ -1,5 +1,5 @@ {# -*- coding: utf-8 -*- #} -{% import 'feed_helper.tmpl' as feed with context %} +{% import 'translation_link_helper.tmpl' as translation_links with context %} {% macro html_headstart() %} @@ -42,7 +42,7 @@ lang="{{ lang }}"> {% if meta_generator_tag %} {% endif %} - {{ feed.head() }} + {{ translation_links.head() }} {% if favicons %} @@ -100,7 +100,7 @@ lang="{{ lang }}"> {# This function is deprecated; use feed_helper directly. #} {% macro html_feedlinks() %} - {{ feed.head() }} + {{ translation_links.head() }} {% endmacro %} {% macro html_translations() %} diff --git a/nikola/data/themes/base-jinja/templates/index.tmpl b/nikola/data/themes/base-jinja/templates/index.tmpl index 79adc3894b..dcb6176263 100644 --- a/nikola/data/themes/base-jinja/templates/index.tmpl +++ b/nikola/data/themes/base-jinja/templates/index.tmpl @@ -11,11 +11,6 @@ {% endif %} {{ math.math_styles_ifposts(posts) }} - {% if has_other_languages and other_languages %} - {% for language, classification, _ in other_languages %} - - {% endfor %} - {% endif %} {% endblock %} {% block content %} @@ -24,7 +19,11 @@

{{ messages("Also available in:") }}

{% for language, classification, name in other_languages %} -

{{ messages("LANGUAGE", language) }} ({{ name|e }})

+

{{ messages("LANGUAGE", language) }} + {% if kind != 'archive' %} + ({{ name|e }}) + {% endif %} +

{% endfor %}
{% endif %} diff --git a/nikola/data/themes/base-jinja/templates/list.tmpl b/nikola/data/themes/base-jinja/templates/list.tmpl index bbee8e63a2..907a928ee9 100644 --- a/nikola/data/themes/base-jinja/templates/list.tmpl +++ b/nikola/data/themes/base-jinja/templates/list.tmpl @@ -2,14 +2,6 @@ {% extends 'base.tmpl' %} {% import 'archive_navigation_helper.tmpl' as archive_nav with context %} -{% block extra_head %} - {% if has_other_languages and other_languages %} - {% for language, classification, _ in other_languages %} - - {% endfor %} - {% endif %} -{% endblock %} - {% block content %}
@@ -20,7 +12,11 @@

{{ messages("Also available in:") }}

{% for language, classification, name in other_languages %} -

{{ messages("LANGUAGE", language) }} ({{ name|e }})

+

{{ messages("LANGUAGE", language) }} + {% if kind != 'archive' %} + ({{ name|e }}) + {% endif %} +

{% endfor %}
{% endif %} diff --git a/nikola/data/themes/base-jinja/templates/list_post.tmpl b/nikola/data/themes/base-jinja/templates/list_post.tmpl index a5998dfce3..ccb104e4c6 100644 --- a/nikola/data/themes/base-jinja/templates/list_post.tmpl +++ b/nikola/data/themes/base-jinja/templates/list_post.tmpl @@ -2,14 +2,6 @@ {% extends 'base.tmpl' %} {% import 'archive_navigation_helper.tmpl' as archive_nav with context %} -{% block extra_head %} - {% if has_other_languages and other_languages %} - {% for language, classification, _ in other_languages %} - - {% endfor %} - {% endif %} -{% endblock %} - {% block content %}
@@ -20,7 +12,11 @@

{{ messages("Also available in:") }}

{% for language, classification, name in other_languages %} -

{{ messages("LANGUAGE", language) }} ({{ name|e }})

+

{{ messages("LANGUAGE", language) }} + {% if kind != 'archive' %} + ({{ name|e }}) + {% endif %} +

{% endfor %}
{% endif %} diff --git a/nikola/data/themes/base-jinja/templates/sectionindex.tmpl b/nikola/data/themes/base-jinja/templates/sectionindex.tmpl index c74277650a..dfc4052434 100644 --- a/nikola/data/themes/base-jinja/templates/sectionindex.tmpl +++ b/nikola/data/themes/base-jinja/templates/sectionindex.tmpl @@ -1,17 +1,17 @@ {# -*- coding: utf-8 -*- #} {% extends 'index.tmpl' %} -{% import 'feed_helper.tmpl' as feed with context %} +{% import 'translation_link_helper.tmpl' as translation_links with context %} {% block extra_head %} {{ super() }} - {{ feed.head(section) }} + {{ translation_links.head(section) }} {% endblock %} {% block content %}

{{ title|e }}

- {{ feed.link(section) }} + {{ translation_links.link(section) }}
{{ super() }}
diff --git a/nikola/data/themes/base-jinja/templates/tag.tmpl b/nikola/data/themes/base-jinja/templates/tag.tmpl index 19dd7b341a..20265cc59f 100644 --- a/nikola/data/themes/base-jinja/templates/tag.tmpl +++ b/nikola/data/themes/base-jinja/templates/tag.tmpl @@ -1,10 +1,10 @@ {# -*- coding: utf-8 -*- #} {% extends 'list_post.tmpl' %} -{% import 'feed_helper.tmpl' as feed with context %} +{% import 'translation_link_helper.tmpl' as translation_links with context %} {% block extra_head %} {{ super() }} - {{ feed.head(tag) }} + {{ translation_links.head(tag) }} {% endblock %} @@ -24,13 +24,17 @@ {% endif %} {% if has_other_languages and other_languages %}

{{ messages("Also available in:") }}

{% for language, classification, name in other_languages %} -

{{ messages("LANGUAGE", language) }} ({{ name|e }})

+

{{ messages("LANGUAGE", language) }} + {% if kind != 'archive' %} + ({{ name|e }}) + {% endif %} +

{% endfor %}
{% endif %} diff --git a/nikola/data/themes/base-jinja/templates/tagindex.tmpl b/nikola/data/themes/base-jinja/templates/tagindex.tmpl index a991df0493..084cfd7bb6 100644 --- a/nikola/data/themes/base-jinja/templates/tagindex.tmpl +++ b/nikola/data/themes/base-jinja/templates/tagindex.tmpl @@ -1,6 +1,6 @@ {# -*- coding: utf-8 -*- #} {% extends 'index.tmpl' %} -{% import 'feed_helper.tmpl' as feed with context %} +{% import 'translation_link_helper.tmpl' as translation_links with context %} {% block content_header %} {{ parent.content_header() }} @@ -22,5 +22,5 @@ {% block extra_head %} {{ super() }} - {{ feed.head(tag) }} + {{ translation_links.head(tag) }} {% endblock %} diff --git a/nikola/data/themes/base-jinja/templates/feed_helper.tmpl b/nikola/data/themes/base-jinja/templates/translation_link_helper.tmpl similarity index 93% rename from nikola/data/themes/base-jinja/templates/feed_helper.tmpl rename to nikola/data/themes/base-jinja/templates/translation_link_helper.tmpl index 56f6a9a67a..bc90ff8b19 100644 --- a/nikola/data/themes/base-jinja/templates/feed_helper.tmpl +++ b/nikola/data/themes/base-jinja/templates/translation_link_helper.tmpl @@ -38,6 +38,11 @@ {% endif %} {% endif %} {% endif %} + {% if has_other_languages and other_languages %} + {% for language, classification, _ in other_languages %} + + {% endfor %} + {% endif %} {% endmacro %} {% macro link(classification) %} diff --git a/nikola/data/themes/base/templates/archiveindex.tmpl b/nikola/data/themes/base/templates/archiveindex.tmpl index d609f5dabf..b845fec036 100644 --- a/nikola/data/themes/base/templates/archiveindex.tmpl +++ b/nikola/data/themes/base/templates/archiveindex.tmpl @@ -1,11 +1,11 @@ ## -*- coding: utf-8 -*- <%inherit file="index.tmpl"/> <%namespace name="archive_nav" file="archive_navigation_helper.tmpl" import="*"/> -<%namespace name="feed" file="feed_helper.tmpl" import="*"/> +<%namespace name="translation_links" file="translation_link_helper.tmpl" import="*"/> <%block name="extra_head"> ${parent.extra_head()} - ${feed.head(archive_name)} + ${translation_links.head(archive_name)} <%block name="content_header"> diff --git a/nikola/data/themes/base/templates/author.tmpl b/nikola/data/themes/base/templates/author.tmpl index 741003cdf0..662f95fd48 100644 --- a/nikola/data/themes/base/templates/author.tmpl +++ b/nikola/data/themes/base/templates/author.tmpl @@ -1,10 +1,10 @@ ## -*- coding: utf-8 -*- <%inherit file="list_post.tmpl"/> -<%namespace name="feed" file="feed_helper.tmpl" import="*"/> +<%namespace name="translation_links" file="translation_link_helper.tmpl" import="*"/> <%block name="extra_head"> ${parent.extra_head()} - ${feed.head(author)} + ${translation_links.head(author)} @@ -16,7 +16,7 @@

${description}

%endif
%if posts: diff --git a/nikola/data/themes/base/templates/authorindex.tmpl b/nikola/data/themes/base/templates/authorindex.tmpl index 2b8df24bbd..be3d81d678 100644 --- a/nikola/data/themes/base/templates/authorindex.tmpl +++ b/nikola/data/themes/base/templates/authorindex.tmpl @@ -1,8 +1,8 @@ ## -*- coding: utf-8 -*- <%inherit file="index.tmpl"/> -<%namespace name="feed" file="feed_helper.tmpl" import="*"/> +<%namespace name="translation_links" file="translation_link_helper.tmpl" import="*"/> <%block name="extra_head"> ${parent.extra_head()} - ${feed.head(author)} + ${translation_links.head(author)} diff --git a/nikola/data/themes/base/templates/base_helper.tmpl b/nikola/data/themes/base/templates/base_helper.tmpl index d7de16d4da..7d41ae834e 100644 --- a/nikola/data/themes/base/templates/base_helper.tmpl +++ b/nikola/data/themes/base/templates/base_helper.tmpl @@ -1,5 +1,5 @@ ## -*- coding: utf-8 -*- -<%namespace name="feed" file="feed_helper.tmpl" import="*"/> +<%namespace name="translation_links" file="translation_link_helper.tmpl" import="*"/> <%def name="html_headstart()"> @@ -42,7 +42,7 @@ lang="${lang}"> % if meta_generator_tag: % endif - ${feed.head()} + ${translation_links.head()} %if favicons: @@ -100,7 +100,7 @@ lang="${lang}"> ### This function is deprecated; use feed_helper directly. <%def name="html_feedlinks()"> - ${feed.head()} + ${translation_links.head()} <%def name="html_translations()"> diff --git a/nikola/data/themes/base/templates/index.tmpl b/nikola/data/themes/base/templates/index.tmpl index 0bfa0f7da6..616f469cb9 100644 --- a/nikola/data/themes/base/templates/index.tmpl +++ b/nikola/data/themes/base/templates/index.tmpl @@ -11,11 +11,6 @@ % endif ${math.math_styles_ifposts(posts)} - %if has_other_languages and other_languages: - %for language, classification, _ in other_languages: - - %endfor - %endif <%block name="content"> diff --git a/nikola/data/themes/base/templates/list.tmpl b/nikola/data/themes/base/templates/list.tmpl index 9f16d9ea48..d7437a7bf5 100644 --- a/nikola/data/themes/base/templates/list.tmpl +++ b/nikola/data/themes/base/templates/list.tmpl @@ -2,14 +2,6 @@ <%inherit file="base.tmpl"/> <%namespace name="archive_nav" file="archive_navigation_helper.tmpl" import="*"/> -<%block name="extra_head"> - %if has_other_languages and other_languages: - %for language, classification, _ in other_languages: - - %endfor - %endif - - <%block name="content">
diff --git a/nikola/data/themes/base/templates/list_post.tmpl b/nikola/data/themes/base/templates/list_post.tmpl index 2e9f42cdbd..2ff3170da5 100644 --- a/nikola/data/themes/base/templates/list_post.tmpl +++ b/nikola/data/themes/base/templates/list_post.tmpl @@ -2,14 +2,6 @@ <%inherit file="base.tmpl"/> <%namespace name="archive_nav" file="archive_navigation_helper.tmpl" import="*"/> -<%block name="extra_head"> - %if has_other_languages and other_languages: - %for language, classification, _ in other_languages: - - %endfor - %endif - - <%block name="content">
diff --git a/nikola/data/themes/base/templates/sectionindex.tmpl b/nikola/data/themes/base/templates/sectionindex.tmpl index 8eabec25d3..1402690c29 100644 --- a/nikola/data/themes/base/templates/sectionindex.tmpl +++ b/nikola/data/themes/base/templates/sectionindex.tmpl @@ -1,17 +1,17 @@ ## -*- coding: utf-8 -*- <%inherit file="index.tmpl"/> -<%namespace name="feed" file="feed_helper.tmpl" import="*"/> +<%namespace name="translation_links" file="translation_link_helper.tmpl" import="*"/> <%block name="extra_head"> ${parent.extra_head()} - ${feed.head(section)} + ${translation_links.head(section)} <%block name="content">

${title|h}

- ${feed.link(section)} + ${translation_links.link(section)}
${parent.content()}
diff --git a/nikola/data/themes/base/templates/tag.tmpl b/nikola/data/themes/base/templates/tag.tmpl index ab9197c6b6..a2cc7cc9be 100644 --- a/nikola/data/themes/base/templates/tag.tmpl +++ b/nikola/data/themes/base/templates/tag.tmpl @@ -1,10 +1,10 @@ ## -*- coding: utf-8 -*- <%inherit file="list_post.tmpl"/> -<%namespace name="feed" file="feed_helper.tmpl" import="*"/> +<%namespace name="translation_links" file="translation_link_helper.tmpl" import="*"/> <%block name="extra_head"> ${parent.extra_head()} - ${feed.head(tag)} + ${translation_links.head(tag)} @@ -24,7 +24,7 @@ %endif %if has_other_languages and other_languages:
diff --git a/nikola/data/themes/base/templates/tagindex.tmpl b/nikola/data/themes/base/templates/tagindex.tmpl index 0d654a214d..e9c1ef4a22 100644 --- a/nikola/data/themes/base/templates/tagindex.tmpl +++ b/nikola/data/themes/base/templates/tagindex.tmpl @@ -1,6 +1,6 @@ ## -*- coding: utf-8 -*- <%inherit file="index.tmpl"/> -<%namespace name="feed" file="feed_helper.tmpl" import="*"/> +<%namespace name="translation_links" file="translation_link_helper.tmpl" import="*"/> <%block name="content_header"> ${parent.content_header()} @@ -22,5 +22,5 @@ <%block name="extra_head"> ${parent.extra_head()} - ${feed.head(tag)} + ${translation_links.head(tag)} diff --git a/nikola/data/themes/base/templates/feed_helper.tmpl b/nikola/data/themes/base/templates/translation_link_helper.tmpl similarity index 93% rename from nikola/data/themes/base/templates/feed_helper.tmpl rename to nikola/data/themes/base/templates/translation_link_helper.tmpl index fc7880df73..06733f0756 100644 --- a/nikola/data/themes/base/templates/feed_helper.tmpl +++ b/nikola/data/themes/base/templates/translation_link_helper.tmpl @@ -38,6 +38,11 @@ % endif % endif % endif + % if has_other_languages and other_languages: + % for language, classification, _ in other_languages: + + % endfor + % endif <%def name="link(classification)"> diff --git a/nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl b/nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl index 3dcba21f2d..12ad41954d 100644 --- a/nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl +++ b/nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl @@ -1,7 +1,7 @@ {# -*- coding: utf-8 -*- #} {% import 'annotation_helper.tmpl' as notes with context %} -{% import 'feed_helper.tmpl' as feed with context %} +{% import 'translation_link_helper.tmpl' as translation_links with context %} {% macro html_headstart() %} {% if meta_generator_tag %} {% endif %} - {{ feed.head() }} - {{ html_feedlinks() }} + {{ translation_links.head() }} {% if favicons %} @@ -162,7 +161,7 @@ lang="{{ lang }}"> {% endmacro %} {% macro html_feedlinks() %} - {{ feed.head() }} + {{ translation_links.head() }} {% endmacro %} {% macro html_translations() %} diff --git a/nikola/data/themes/bootstrap3/templates/base_helper.tmpl b/nikola/data/themes/bootstrap3/templates/base_helper.tmpl index 717fbd2e1a..1855c0ccb7 100644 --- a/nikola/data/themes/bootstrap3/templates/base_helper.tmpl +++ b/nikola/data/themes/bootstrap3/templates/base_helper.tmpl @@ -1,7 +1,7 @@ ## -*- coding: utf-8 -*- <%namespace name="notes" file="annotation_helper.tmpl" import="*" /> -<%namespace name="feed" file="feed_helper.tmpl" import="*" /> +<%namespace name="translation_links" file="translation_link_helper.tmpl" import="*" /> <%def name="html_headstart()"> % if meta_generator_tag: % endif - ${feed.head()} - ${html_feedlinks()} + ${translation_links.head()} %if favicons: @@ -162,7 +161,7 @@ lang="${lang}"> <%def name="html_feedlinks()"> - ${feed.head()} + ${translation_links.head()} <%def name="html_translations()">