Site.owner.avatar now accepts local images and hotlinked images (conditional on http://, https:// in string)

This commit is contained in:
Maximilian Held 2014-03-10 16:25:07 +01:00
parent d587853180
commit a6dcf3a9e7

View file

@ -1,4 +1,10 @@
<img src="{{ site.url }}/images/{{ site.owner.avatar }}" class="bio-photo" alt="{{ site.owner.name }} bio photo"></a> {% if site.owner.avatar contains 'http://' %}
<img src="{{ site.owner.avatar }}" class="bio-photo" alt="{{ site.owner.name }} bio photo"></a>
{% elsif site.owner.avatar contains 'https://' %}
<img src="{{ site.owner.avatar }}" class="bio-photo" alt="{{ site.owner.name }} bio photo"></a>
{% else %}
<img src="{{ site.url }}/images/{{ site.owner.avatar }}" class="bio-photo" alt="{{ site.owner.name }} bio photo"></a>
{% endif %}
<h3>{{ site.owner.name }}</h3> <h3>{{ site.owner.name }}</h3>
<p>{{ site.owner.bio }}</p> <p>{{ site.owner.bio }}</p>
{% if site.owner.twitter %}<a href="http://twitter.com/{{ site.owner.twitter }}" class="author-social" target="_blank"><i class="icon-twitter"></i> Twitter</a>{% endif %} {% if site.owner.twitter %}<a href="http://twitter.com/{{ site.owner.twitter }}" class="author-social" target="_blank"><i class="icon-twitter"></i> Twitter</a>{% endif %}