Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move mulit-author image support to macro so it is used everywhere #785

Merged
merged 2 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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