Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dataCobra/hugo-vitae.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Panzeri <mattia.panzeri93@gmail.com>2020-12-29 14:47:30 +0300
committerdataCobra <datacobra@thinkbot.de>2021-02-06 17:33:38 +0300
commita7187a0de1a3e56f7b5b77b5399c95725318895f (patch)
tree6d38b63ea08197d8b6bf07b45e9fbbd42da32963
parent43dd971c2d504ca9289e8c9a4e9399c6936735f5 (diff)
feat(layouts): Display Author on main lists
-rw-r--r--layouts/_default/list.html11
-rw-r--r--layouts/index.html11
2 files changed, 22 insertions, 0 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index aa36069..992c1d3 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -19,6 +19,17 @@
</div>
<div class="matter">
<h3 class="title small"><a href="{{ .RelPermalink }}">{{.Title}}{{ if .Draft }}<sup class="draft-label">DRAFT</sup>{{ end }}</a></h3>
+ <div class="author">
+ {{ if eq .Site.Params.listAuthor true }}
+ {{ if isset .Params "author" }}
+ {{ if isset .Params "authorlink" }}
+ {{ i18n "authorpretext" }} <a href="{{ relURL .Params.authorlink }}">{{ .Params.author }}</a>
+ {{ else }}
+ {{ i18n "authorpretext" }} {{ .Params.author }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ </div>
<span class="description">
{{ if isset .Params "description" }}
{{ .Description }}
diff --git a/layouts/index.html b/layouts/index.html
index 2954d79..313f0e8 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -70,6 +70,17 @@
</div>
<div class="matter">
<h3 class="title small"><a href="{{ .RelPermalink }}">{{.Title}}{{ if .Draft }}<sup class="draft-label">DRAFT</sup>{{ end }}</a></h3>
+ <div class="author">
+ {{ if eq .Site.Params.listAuthor true}}
+ {{ if isset .Params "author" }}
+ {{ if isset .Params "authorlink" }}
+ {{ i18n "authorpretext" }} <a href="{{ relURL .Params.authorlink }}">{{ .Params.author }}</a>
+ {{ else }}
+ {{ i18n "authorpretext" }} {{ .Params.author }}
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ </div>
<span class="description">
{{ if isset .Params "description" }}
{{ .Description }}