Skip to content

Commit

Permalink
Merge pull request getpelican#236 from makefu/gum_multi_authors
Browse files Browse the repository at this point in the history
Gum show multiple authors if there are any
  • Loading branch information
almet committed Sep 24, 2014
2 parents c4691d0 + 39c1a0c commit b879f58
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 31 deletions.
8 changes: 5 additions & 3 deletions gum/templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ <h2 class="entry-title">
<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 -->
Expand Down
62 changes: 34 additions & 28 deletions gum/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,40 @@


<div class="eleven columns">
<ol id="post-list">
{% for article in articles_page.object_list %}
<li><article class="hentry">
<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 %}
</footer><!-- /.post-info -->
<div class="entry-content"> {{ article.summary }} </div><!-- /.entry-content -->

<div class="medium primary btn"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">Read more <i class="icon-arrow-right"></i></a></div>



<div class="row tag-row">
{% if article.tags %}
<span>Tagged as : </span>
{% for tag in article.tags %}
<a class="danger label" href="{{ SITEURL }}/{{ tag.url }}">{{ tag|e }}</a>
{% endfor %}
{% endif %}
</div>



</article></li>
{% endfor %}
</ol><!-- /#posts-list -->
<ol id="post-list">
{% for article in articles_page.object_list %}
<li><article class="hentry">
<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.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 -->

<div class="medium primary btn"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">Read more <i class="icon-arrow-right"></i></a></div>



<div class="row tag-row">
{% if article.tags %}
<span>Tagged as : </span>
{% for tag in article.tags %}
<a class="danger label" href="{{ SITEURL }}/{{ tag.url }}">{{ tag|e }}</a>
{% endfor %}
{% endif %}
</div>



</article></li>
{% endfor %}
</ol><!-- /#posts-list -->

</div><!-- /.eleven.columns -->

Expand Down

0 comments on commit b879f58

Please sign in to comment.