1
0
mirror of https://github.com/arsenetar/pelican-red.git synced 2024-11-23 19:49:03 +00:00
pelican-red/templates/_author_item.html

66 lines
2.3 KiB
HTML
Raw Normal View History

{% set name = author.name|trim() %}
{% if name in AUTHORS %}
{% set props = AUTHORS[name] %}
{% endif %}
<li class="row" itemscope itemtype="http://schema.org/Person">
<meta itemprop="memberOf" content="{{ SITENAME }}" />
<div class="author">
<div class="small-4 columns">
<a class="th" href="{{ SITEURL }}/{{ author.url }}">
{% if props %}
{% for key, value in props.vcard if key == 'photo' %}
<img src="{{ value }}" itemprop="image" />
{% else %}
<img src="{{ SITEURL+'/'+FAVICON }}"/>
{% endfor %}
{% else %}
<img src="{{ SITEURL+'/'+FAVICON }}"/>
{% endif %}
</a>
</div>
<div class="small-12 columns">
<header>
<h3><a href="{{ SITEURL+'/'+author.url }}">{{ author }}</a></h3>
</header>
<ul class="vcard">
{% if props %}
{% for key, value in props.vcard %}
<li class="{{key}}">
{% if key == 'fn' %}
<span class="fn" itemprop="name">{{ value }}</span>
{% elif key == 'email' %}
<a href="mailto:{{ value }}"itemprop="email">{{ value }}</a>
{% elif key == 'url' %}
<a href="{{ value }}" itemprop="sameAs">{{ value }}</a>
{% elif key == 'note' %}
<div itemprop="description" <p>{{ value }}</p>
{% elif key == 'tel' %}
<span itemprop="telephone">{{ value }}</span>
{% elif key =='title' %}
<span itemprop="jobTitle">{{ value }}</span>
{% elif key == 'org' %}
<span itemprop="affiliation">{{ value }}</span>
{% elif key == 'photo' %}
<img class="photo" src="{{ value }}"/>
{% else %}
<span itemprop="{{ key }}">{{ value }}</span>
{% endif %}
</li>
{% endfor %}
{% else %}
<li class="fn" itemprop="name">{{ author }}</li>
<li class="url"><a href="{{ SITEURL+'/'+author.url }}" itemprop="url" >{{ SITEURL+'/'+author.url }}</a></li>
{% endif %}
</ul>
{% if props %}
<ul class="inline-list">
{% for network, url in props.social %}
<li><a href="{{ url }}"><i class="huge icon-{{ network }}"></i></a></li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
</li>