Skip to content

Commit

Permalink
move mulit-author image support to macro so it is used everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
TimidRobot committed May 28, 2024
1 parent a977cd4 commit c6dcf01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
{% set current_author = post.parent.parent.children.get('authors').children.get(author) %}
<header>
<figure class="image blog-image">
{% if post.author|length >= 2 %}
<img class="profile" src="/multiple-authors.jpg" alt="multiple authors image"/>
{% else %}
<img class="profile" src="https://secure.gravatar.com/avatar/{{ current_author.md5_hashed_email }}?size=200&d=mp" alt="gravatar" />
{% endif %}
</figure>
</header>
{% endif %}
Expand Down
10 changes: 1 addition & 9 deletions themes/vocabulary_theme/templates/macros/posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
{% macro render_post_summary(post, skip_gravatar=false) %}
<div class="column is-one-third is-paddingless padding-horizontal-big padding-top-bigger">
<article class="card entry-post horizontal no-border blog-entry">
{% if post.author|length >= 2 %}
<header>
<figure class="image blog-image">
<img class="profile" src="/multiple-authors.jpg" alt="multiple authors image"/>
</figure>
</header>
{% else %}
{{ render_author_gravatar(post, skip_gravatar) }}
{% endif %}
{{ render_author_gravatar(post, skip_gravatar) }}
<div class="blog-content">
<h4 class="b-header"><a class="blog-title" href="{{ post|url }}">{{ post.title }}</a></h4>
{{ render_authors_byline(post) }}
Expand Down

0 comments on commit c6dcf01

Please sign in to comment.