Website/layouts/partials/authorbox.html

23 lines
790 B
HTML
Raw Normal View History

2018-07-11 20:45:17 +02:00
{{- if .Param "authorbox" }}
<div class="authorbox clearfix">
{{- if and (not .Params.Author.avatar) (not .Params.Author.name) (not .Params.Author.bio) }}
<p class="authorbox__warning"><strong>WARNING:</strong> Authorbox is activated, but [Author] parameters are not specified.</p>
{{- end }}
{{- with .Params.Author.avatar }}
<figure class="authorbox__avatar">
<img alt="{{ $.Params.Author.name }} avatar" src="{{ $.Params.Author.avatar | relURL }}" class="avatar" height="90" width="90">
</figure>
{{- end }}
{{- with .Params.Author.name }}
<div class="authorbox__header">
<span class="authorbox__name">{{ T "authorbox_name" . }}</span>
</div>
{{- end }}
{{- with .Params.Author.bio }}
<div class="authorbox__description">
{{ . }}
</div>
{{- end }}
</div>
{{- end }}