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

github.com/EmielH/tale-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Hollander <EmielH@users.noreply.github.com>2018-08-25 11:57:06 +0300
committerEmiel Hollander <EmielH@users.noreply.github.com>2018-08-25 11:57:06 +0300
commitc6d76a5a537ad6f79e591722eb883958f5ee1fea (patch)
treefb2e8a93243fd9ec7eaa332ef70ab39575f00290 /layouts
parent40be04b726f555d849da68b738f31365a057cf77 (diff)
Tidy up HTML output
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html22
-rw-r--r--layouts/partials/head.html16
2 files changed, 18 insertions, 20 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index fac4e58..2e05fc5 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,19 +1,19 @@
-{{ partial "header.html" . }}
+{{- partial "header.html" . }}
<main>
<div class="post">
<div class="post-info">
<span>Written by</span>
- {{ if .Params.Author }}
+ {{- if .Params.Author }}
{{ .Params.Author }}
- {{ else }}
+ {{- else }}
{{ .Site.Params.Author }}
- {{ end }}
+ {{- end }}
- {{ if .PublishDate }}
+ {{- if .PublishDate }}
<br>
<span>on&nbsp;</span><time datetime="{{ .PublishDate }}">{{ .PublishDate.Format "January 2, 2006" }}</time>
- {{ end }}
+ {{- end }}
</div>
<h1 class="post-title">{{ .Title }}</h1>
@@ -24,15 +24,15 @@
</div>
<div class="pagination">
- {{ if .Next }}
+ {{- if .Next }}
<a href="{{ .Next.URL }}" class="left arrow">&#8592;</a>
- {{ end }}
- {{ if .Prev }}
+ {{- end }}
+ {{- if .Prev }}
<a href="{{ .Prev.URL }}" class="right arrow">&#8594;</a>
- {{ end }}
+ {{- end }}
<a href="#" class="top">Top</a>
</div>
</main>
-{{ partial "footer.html" . }} \ No newline at end of file
+{{- partial "footer.html" . }} \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 99546be..ef91b1d 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,20 +1,18 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- {{ if eq .URL "/" }}
+ {{- if eq .URL "/" }}
<meta name="description" content="{{ .Site.Params.Description }}">
- {{ else }}
- {{ if .Description }}
- <meta name="description" content="{{ .Description }}">
- {{ end }}
- {{ end }}
+ {{- else if .Description }}
+ <meta name="description" content="{{ .Description }}">
+ {{- end }}
<title>
- {{ if eq .URL "/" }}
+ {{- if eq .URL "/" }}
{{ .Site.Title }}
- {{ else }}
+ {{- else }}
{{ .Title }} &middot; {{ .Site.Title }}
- {{ end }}
+ {{- end }}
</title>
<!-- CSS -->