mirror of
https://github.com/adulau/brouilleursdeblanc.git
synced 2024-12-22 08:36:02 +00:00
Display the default image in case the avatar not available
Note that whenever content is written by another author, the existence of an avatar for that author is questionable, so adding another if-else block ensures that instead of the alt, the default image is shown
This commit is contained in:
parent
a60fd268f4
commit
c5e5938425
1 changed files with 8 additions and 0 deletions
|
@ -25,10 +25,18 @@
|
|||
</header>
|
||||
<footer class="entry-meta">
|
||||
{% if page.author.name %}
|
||||
{% if page.author.avatar %}
|
||||
<img src="{{ site.url }}/images/{{ page.author.avatar }}" alt="{{ page.author.name }} photo" class="author-photo">
|
||||
{% else %}
|
||||
<img src="{{ site.url }}/images/bio-photo-alt.jpg" alt="{{ page.author.name }} photo" class="author-photo">
|
||||
{% endif %}
|
||||
<span class="author vcard">By <span class="fn">{{ page.author.name }}</span></span>
|
||||
{% else %}
|
||||
{% if site.owner.avatar %}
|
||||
<img src="{{ site.url }}/images/{{ site.owner.avatar }}" alt="{{ site.owner.name }} photo" class="author-photo">
|
||||
{% else %}
|
||||
<img src="{{ site.url }}/images/bio-photo-alt.jpg" alt="{{ site.owner.name }} photo" class="author-photo">
|
||||
{% endif %}
|
||||
<span class="author vcard">By <span class="fn"><a href="{{ site.url }}/about/" title="About {{ site.owner.name }}">{{ site.owner.name }}</a></span></span>
|
||||
{% endif %}
|
||||
<span class="entry-date date published"><time datetime="{{ page.date | date_to_xmlschema }}"><i class="icon-calendar-empty"></i> {{ page.date | date: "%B %d, %Y" }}</time></span>
|
||||
|
|
Loading…
Reference in a new issue