diff options
author | m-r-r <raybaudroigm@gmail.com> | 2012-06-03 12:35:29 +0200 |
---|---|---|
committer | m-r-r <raybaudroigm@gmail.com> | 2012-06-03 12:35:29 +0200 |
commit | a77b2490db136a6f95a6c3f8cc6e602b7a262092 (patch) | |
tree | cf98b596ec5dfe48100c8c2ca14c506cf0fa50af /dev-random | |
parent | e66da8b11bc410155dcb0c06e3fd585b59017f0e (diff) | |
download | pelican-themes-a77b2490db136a6f95a6c3f8cc6e602b7a262092.zip pelican-themes-a77b2490db136a6f95a6c3f8cc6e602b7a262092.tar.gz pelican-themes-a77b2490db136a6f95a6c3f8cc6e602b7a262092.tar.bz2 |
[dev-random] Translations support !
Diffstat (limited to 'dev-random')
-rw-r--r-- | dev-random/templates/article.html | 8 | ||||
-rw-r--r-- | dev-random/templates/index.html | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/dev-random/templates/article.html b/dev-random/templates/article.html index ab5679c..4bd02f5 100644 --- a/dev-random/templates/article.html +++ b/dev-random/templates/article.html @@ -1,3 +1,4 @@ +{%- if article.lang %}{% set DEFAULT_LANG = article.lang %}{% endif -%} {% extends "base.html" %} {% block headers %} @@ -24,6 +25,13 @@ <div class="meta"> Dans «<a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>» par <a href="{{ SITEURL }}/author/{{article.author}}.html">{{ article.author}}</a> + {% if article.translations %} + Langues: + <a href="{{ SITEURL }}/{{ article.url }}">{{ article.lang or DEFAULT_LANG }}</a> + {% for translation in article.translations %} + <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> + {% endfor %} + {% endif %} </div> </header> <div class="post-content"> diff --git a/dev-random/templates/index.html b/dev-random/templates/index.html index 11314d1..c098ddc 100644 --- a/dev-random/templates/index.html +++ b/dev-random/templates/index.html @@ -20,6 +20,13 @@ <div class="meta"> Dans «<a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>» par <a href="{{ SITEURL }}/author/{{article.author}}.html">{{ article.author}}</a> + {% if article.translations %} + Langues: + <a href="{{ SITEURL }}/{{ article.url }}">{{ article.lang or DEFAULT_LANG }}</a> + {% for translation in article.translations %} + <a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> + {% endfor %} + {% endif %} </div> </header> <div class="post-content"> |