Add link to article translations in index and article template
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ article.title }}{% endblock %}
|
||||
{% block content %}
|
||||
<section id="content" class="body">
|
||||
{% block content %}
|
||||
<section id="content" class="body">
|
||||
<article>
|
||||
<header> <h1 class="entry-title"><a href="{{ article.url }}"
|
||||
rel="bookmark" title="Permalink to {{ article.title }}">{{ article.title
|
||||
@@ -16,8 +16,9 @@
|
||||
By <a class="url fn" href="#">{{ article.author }}</a>
|
||||
</address>
|
||||
{% endif %}
|
||||
<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>.
|
||||
<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>.
|
||||
{% include 'taglist.html' %}
|
||||
{% include 'translations.html' %}
|
||||
</footer><!-- /.post-info -->
|
||||
{{ article.content }}
|
||||
</div><!-- /.entry-content -->
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content_title %}{% endblock %}
|
||||
{% block content %}
|
||||
{% block content %}
|
||||
{% if articles %}
|
||||
{% for article in articles %}
|
||||
{% for article in articles %}
|
||||
{% if loop.index == 1 %}
|
||||
<section id="content" class="body">
|
||||
<aside id="featured"><article>
|
||||
<h1 class="entry-title"><a href="{{ SITEURL }}/{{ article.url
|
||||
}}">{{ article.title }}</a></h1>
|
||||
}}">{{ article.title }}</a></h1>
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="{{ article.date.isoformat() }}">
|
||||
{{ article.date.strftime('%a %d %B %Y') }}
|
||||
@@ -20,6 +20,7 @@
|
||||
{% endif %}
|
||||
<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
|
||||
{% include 'taglist.html' %}
|
||||
{% include 'translations.html' %}
|
||||
</footer><!-- /.post-info -->
|
||||
{{ article.content }}
|
||||
</article></aside><!-- /#featured -->
|
||||
@@ -28,12 +29,12 @@
|
||||
<hr />
|
||||
<ol id="posts-list" class="hfeed">
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<li><article class="hentry">
|
||||
{% else %}
|
||||
<li><article class="hentry">
|
||||
<header>
|
||||
<h1><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h1>
|
||||
</header>
|
||||
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="{{ article.date.isoformat() }}">
|
||||
@@ -56,7 +57,7 @@
|
||||
</ol><!-- /#posts-list -->
|
||||
</section><!-- /#content -->
|
||||
{% else %}
|
||||
<section id="content" class="body">
|
||||
<section id="content" class="body">
|
||||
<h2>Pages</h2>
|
||||
{% for page in PAGES %}
|
||||
<li><a href="{{ SITEURL }}/pages/{{ page.url }}">{{ page.title }}</a></li>
|
||||
|
||||
6
notmyidea-cms/templates/translations.html
Normal file
6
notmyidea-cms/templates/translations.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{% if article.translations %}
|
||||
Translations:
|
||||
{% for translation in article.translations %}
|
||||
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user