summaryrefslogtreecommitdiff
path: root/themes/new_theme/layouts/partials/authorbox.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/new_theme/layouts/partials/authorbox.html')
-rw-r--r--themes/new_theme/layouts/partials/authorbox.html21
1 files changed, 16 insertions, 5 deletions
diff --git a/themes/new_theme/layouts/partials/authorbox.html b/themes/new_theme/layouts/partials/authorbox.html
index cfd09c5..29faa5f 100644
--- a/themes/new_theme/layouts/partials/authorbox.html
+++ b/themes/new_theme/layouts/partials/authorbox.html
@@ -1,13 +1,24 @@
-{{- if .Site.Params.authorbox }}
+{{- if .Param "authorbox" }}
<div class="authorbox clearfix">
+ {{- if and (not .Site.Author.avatar) (not .Site.Author.name) (not .Site.Author.bio) }}
+ <p class="authorbox__warning">
+ <strong>WARNING:</strong> Authorbox is activated, but [Author] parameters are not specified.
+ </p>
+ {{- end }}
+ {{- with .Site.Author.avatar }}
<figure class="authorbox__avatar">
- <img alt="{{ .Site.Author.name }} avatar" src="{{ .Site.Author.avatar | absURL }}" class="avatar" height="90" width="90">
+ <img alt="{{ $.Site.Author.name }} avatar" src="{{ $.Site.Author.avatar | relURL }}" class="avatar" height="90" width="90">
</figure>
+ {{- end }}
+ {{- with .Site.Author.name }}
<div class="authorbox__header">
- <span class="authorbox__name">About {{ .Site.Author.name }}</span>
+ <span class="authorbox__name">{{ T "authorbox_name" . }}</span>
</div>
+ {{- end }}
+ {{- with .Site.Author.bio }}
<div class="authorbox__description">
- {{ .Site.Author.bio }}
+ {{ . | markdownify }}
</div>
+ {{- end }}
</div>
-{{- end }} \ No newline at end of file
+{{- end }}