diff options
author | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-08-25 11:57:06 +0300 |
---|---|---|
committer | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-08-25 11:57:06 +0300 |
commit | c6d76a5a537ad6f79e591722eb883958f5ee1fea (patch) | |
tree | fb2e8a93243fd9ec7eaa332ef70ab39575f00290 /layouts | |
parent | 40be04b726f555d849da68b738f31365a057cf77 (diff) |
Tidy up HTML output
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 22 | ||||
-rw-r--r-- | layouts/partials/head.html | 16 |
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 </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">←</a> - {{ end }} - {{ if .Prev }} + {{- end }} + {{- if .Prev }} <a href="{{ .Prev.URL }}" class="right arrow">→</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 }} · {{ .Site.Title }} - {{ end }} + {{- end }} </title> <!-- CSS --> |