TechShotgun/_layouts/author_index.html

54 lines
1.9 KiB
HTML

---
layout: index
---
{% assign the_author = site.data.authors | where: 'id', page.author %}
{% for author in the_author %}
<div class="authorbox">
<div class="avatar">
{% if author.avatar %}
<img src="{{ site.media_folder | prepend: site.baseurl | replace: '//', '/'}}{{ author.avatar }}" alt="{{ author.id }} avatar">
{% else %}
<img src="{{ site.baseurl | replace: '//', '/' }}/{{ site.media_folder | replace: '//', '/'}}/{{ site.author_default_avatar }}" alt="avatar">
{% endif %}
</div>
<div class="info">
<h2 class="author_name">
{% if author.name %}
{{ author.name }}
{% else %}
{{ author.id }}
{% endif %}
</h2>
{% if author.bio%}
<p class="bio">{{ author.bio }}</p>
{% endif %}
{% if author.facebook or author.twitter or author.instagram or author.email %}
<p class="social">
{% if author.facebook %}
<a href="{{ author.facebook }}" target="_blank" class="noline"><i class="fa fa-facebook"></i></a>
{% endif %}
{% if author.twitter %}
<a href="{{ author.twitter }}" target="_blank" class="noline"><i class="fa fa-twitter"></i></a>
{% endif %}
{% if author.instagram %}
<a href="{{ author.instagram }}" target="_blank" class="noline"><i class="fa fa-instagram"></i></a>
{% endif %}
{% if author.email %}
<a href="mailto:{{ author.email }}" class="noline"><i class="fa fa-envelope"></i></a>
{% endif %}
</p>
{% endif %}
</div>
</div>
{% endfor %}
{% for post in site.posts %}
{% if post.author contains page.author %}
{% include article_index.html %}
{% endif %}
{% endfor %}