Make author avatar optional

This commit is contained in:
Michael Rose 2016-10-06 19:39:28 -04:00
parent 818b99354f
commit 50d4b1b9a8
3 changed files with 9 additions and 7 deletions

View file

@ -4,13 +4,15 @@
<div itemscope itemtype="http://schema.org/Person"> <div itemscope itemtype="http://schema.org/Person">
<div class="author__avatar"> {% if author.avatar %}
{% if author.avatar contains "://" %} <div class="author__avatar">
<img src="{{ author.avatar }}" alt="{{ author.name }}"> {% if author.avatar contains "://" %}
{% else %} <img src="{{ author.avatar }}" alt="{{ author.name }}">
<img src="{{ author.avatar | prepend: "/" | absolute_url }}" class="author__avatar" alt="{{ author.name }}"> {% else %}
{% endif %} <img src="{{ author.avatar | prepend: "/" | absolute_url }}" class="author__avatar" alt="{{ author.name }}">
</div> {% endif %}
</div>
{% endif %}
<div class="author__content"> <div class="author__content">
<h3 class="author__name">{{ author.name }}</h3> <h3 class="author__name">{{ author.name }}</h3>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

0
example/assets/images/bio-photo.jpg Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB