Feature: Adding linkback functionality Author avatar & Name (#1386)
* adding linkback funct to author avatar & nm * rm author_class; change linkback var to home; updating config docs
This commit is contained in:

committed by
Michael Rose

parent
5490b6f46a
commit
9ca57649c1
@ -9,15 +9,32 @@
|
||||
{% if author.avatar %}
|
||||
<div class="author__avatar">
|
||||
{% if author.avatar contains "://" %}
|
||||
<img src="{{ author.avatar }}" alt="{{ author.name }}" itemprop="image">
|
||||
{% assign author_src = author.avatar %}
|
||||
{% else %}
|
||||
<img src="{{ author.avatar | absolute_url }}" class="author__avatar" alt="{{ author.name }}" itemprop="image">
|
||||
{% assign author_src = author.avatar | absolute_url %}
|
||||
{% endif %}
|
||||
|
||||
{% if author.home %}
|
||||
{% if author.home contains "://" %}
|
||||
{% assign author_link = author.home %}
|
||||
{% else %}
|
||||
{% assign author_link = author.home | absolute_url %}
|
||||
{% endif %}
|
||||
<a href="{{ author_link }}">
|
||||
<img src="{{ author_src }}" alt="{{ author.name }}" itemprop="image">
|
||||
</a>
|
||||
{% else %}
|
||||
<img src="{{ author_src }}" alt="{{ author.name }}" itemprop="image">
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="author__content">
|
||||
<h3 class="author__name" itemprop="name">{{ author.name }}</h3>
|
||||
{% if author.home %}
|
||||
<a href="{{ author_link }}"><h3 class="author__name" itemprop="name">{{ author.name }}</h3></a>
|
||||
{% else %}
|
||||
<h3 class="author__name" itemprop="name">{{ author.name }}</h3>
|
||||
{% endif %}
|
||||
{% if author.bio %}
|
||||
<p class="author__bio" itemprop="description">
|
||||
{{ author.bio }}
|
||||
|
Reference in New Issue
Block a user