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:
authordataCobra <datacobra@thinkbot.de>2021-03-06 18:05:23 +0300
committerdataCobra <datacobra@thinkbot.de>2021-03-06 18:05:23 +0300
commitb8d324ccc25c8791083b5f05728229aa2575d3e5 (patch)
tree0a61100eb5cc634593fef4ba97558cc06d12f743 /layouts
parent84d7e72c4dfa4cc888e801548671499d04b16f47 (diff)
Refactoring of list.html
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html40
1 files changed, 17 insertions, 23 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 8dbf3d1..67e98a8 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,14 +1,14 @@
{{- define "main" }}
-{{ if isset .Data "Term" }}
+{{- if isset .Data "Term" }}
<h1 class="page-title">{{ humanize .Data.Term }}</h1>
-{{ else }}
+{{- else }}
<h1 class="page-title">{{ .Title }}</h1>
-{{ end }}
-{{.Content}}
+{{- end -}}
+{{ .Content }}
<ul class="posts flat">
-{{- range .Data.Pages -}}
-{{- if (in .Site.Params.excludedTypes .Type) -}}
-{{- else -}}
+{{- range .Data.Pages }}
+{{- if (in .Site.Params.excludedTypes .Type) }}
+{{- else }}
<li class="post">
<div class="post-header">
<div class="meta">
@@ -20,27 +20,21 @@
<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" }}
+{{- if eq .Site.Params.listAuthor true }}
+{{- if isset .Params "author" }}
+{{- if isset .Params "authorlink" }}
{{ i18n "authorpretext" }} <a href="{{ relURL .Params.authorlink }}" target="_blank" rel="noopener noreferrer">{{ .Params.author }}</a>
-{{ else }}
+{{- else }}
{{ i18n "authorpretext" }} {{ .Params.author }}
-{{ end }}
-{{ end }}
-{{ end }}
+{{- end }}
+{{- end }}
+{{- end }}
</div>
-<span class="description">
-{{ if isset .Params "description" }}
-{{ .Description }}
-{{ else }}
-{{ .Plain | htmlUnescape | safeHTML | truncate 140 }}
-{{ end }}
-</span>
+<span class="description">{{ if isset .Params "description" }}{{ .Description }}{{ else }}{{ .Plain | htmlUnescape | safeHTML | truncate 140 }}{{ end }}</span>
</div>
</div>
</li>
-{{- end -}}
-{{- end -}}
+{{- end }}
+{{- end }}
</ul>
{{- end }}