diff options
author | makefu <github@syntax-fehler.de> | 2014-07-21 21:27:37 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-07-21 21:27:37 +0200 |
commit | cd6d85592b4eedc190057a5db297aaef47bfbf4a (patch) | |
tree | a8d3b0804e411c0a6eec5999f7a61ac2a0159f1e /gum | |
parent | 94c269398742725fc359719851d0b39e4570a073 (diff) | |
download | pelican-themes-cd6d85592b4eedc190057a5db297aaef47bfbf4a.tar.gz |
Gum show multiple authors if there are any
until pelican rev 8e897ea it is possible to have multiple authors for
a post. This patch implements the visualization of multiple authors for
the gum theme.
Diffstat (limited to 'gum')
-rw-r--r-- | gum/templates/article.html | 8 | ||||
-rw-r--r-- | gum/templates/index.html | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gum/templates/article.html b/gum/templates/article.html index 15188d0..f050118 100644 --- a/gum/templates/article.html +++ b/gum/templates/article.html @@ -18,9 +18,11 @@ <abbr class="published" title="{{ article.date.isoformat() }}"> {{ article.locale_date }} </abbr> - {% if article.author %} - <address class="vcard author"> - By <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a> + {% if article.authors %} + <address class="vcard author">By + {% for author in article.authors|sort %} + <a class="url fn" href="{{ SITEURL }}/{{ author.url }}"> {{ author }}</a> + {% endfor %} </address> {% endif %} </footer><!-- /.post-info --> diff --git a/gum/templates/index.html b/gum/templates/index.html index aae5ea5..338f7e0 100644 --- a/gum/templates/index.html +++ b/gum/templates/index.html @@ -16,7 +16,14 @@ <header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header> <footer class="post-info"> <abbr class="published" title="{{ article.date.isoformat() }}"> {{ article.locale_date }} </abbr> - {% if article.author %}<address class="vcard author">By <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a></address>{% endif %} + + {% if article.authors %} + <address class="vcard author">By + {% for author in article.authors|sort %} + <a class="url fn" href="{{ SITEURL }}/{{ author.url }}"> {{ author }}</a> + {% endfor %} + </address> + {% endif %} </footer><!-- /.post-info --> <div class="entry-content"> {{ article.summary }} </div><!-- /.entry-content --> |