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,6 +4,7 @@
<div itemscope itemtype="http://schema.org/Person"> <div itemscope itemtype="http://schema.org/Person">
{% if author.avatar %}
<div class="author__avatar"> <div class="author__avatar">
{% if author.avatar contains "://" %} {% if author.avatar contains "://" %}
<img src="{{ author.avatar }}" alt="{{ author.name }}"> <img src="{{ author.avatar }}" alt="{{ author.name }}">
@ -11,6 +12,7 @@
<img src="{{ author.avatar | prepend: "/" | absolute_url }}" class="author__avatar" alt="{{ author.name }}"> <img src="{{ author.avatar | prepend: "/" | absolute_url }}" class="author__avatar" alt="{{ author.name }}">
{% endif %} {% endif %}
</div> </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