Skip to content

Commit c6dcf01

Browse files
committed
move mulit-author image support to macro so it is used everywhere
1 parent a977cd4 commit c6dcf01

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

themes/vocabulary_theme/templates/macros/authors_gravatar.html

+4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
{% set current_author = post.parent.parent.children.get('authors').children.get(author) %}
66
<header>
77
<figure class="image blog-image">
8+
{% if post.author|length >= 2 %}
9+
<img class="profile" src="/multiple-authors.jpg" alt="multiple authors image"/>
10+
{% else %}
811
<img class="profile" src="https://secure.gravatar.com/avatar/{{ current_author.md5_hashed_email }}?size=200&d=mp" alt="gravatar" />
12+
{% endif %}
913
</figure>
1014
</header>
1115
{% endif %}

themes/vocabulary_theme/templates/macros/posts.html

+1-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44
{% macro render_post_summary(post, skip_gravatar=false) %}
55
<div class="column is-one-third is-paddingless padding-horizontal-big padding-top-bigger">
66
<article class="card entry-post horizontal no-border blog-entry">
7-
{% if post.author|length >= 2 %}
8-
<header>
9-
<figure class="image blog-image">
10-
<img class="profile" src="/multiple-authors.jpg" alt="multiple authors image"/>
11-
</figure>
12-
</header>
13-
{% else %}
14-
{{ render_author_gravatar(post, skip_gravatar) }}
15-
{% endif %}
7+
{{ render_author_gravatar(post, skip_gravatar) }}
168
<div class="blog-content">
179
<h4 class="b-header"><a class="blog-title" href="{{ post|url }}">{{ post.title }}</a></h4>
1810
{{ render_authors_byline(post) }}

0 commit comments

Comments
 (0)