From 90d15ebcf8bfcb2b1908246cbee7b22fb320c348 Mon Sep 17 00:00:00 2001 From: Marco Balmer <micressor@secure.mailbox.org> Date: Wed, 12 Dec 2018 20:06:51 +0100 Subject: [PATCH] Base briar template optimization --- themes/briar/layouts/_default/baseof.html | 22 +++++++++++----------- themes/briar/layouts/_default/list.html | 22 +++++++++++----------- themes/briar/layouts/_default/section.html | 22 +++++++++++----------- themes/briar/layouts/_default/single.html | 4 ++-- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/themes/briar/layouts/_default/baseof.html b/themes/briar/layouts/_default/baseof.html index ba9e13f..f200c65 100644 --- a/themes/briar/layouts/_default/baseof.html +++ b/themes/briar/layouts/_default/baseof.html @@ -1,15 +1,15 @@ <!DOCTYPE html> <html lang="{{ .Site.LanguageCode }}"> - {{- partial "head.html" . -}} - <body> - <div id="wrapper"> - {{- partial "header.html" . -}} - <div id="container"> - <div id="content"> - {{- block "main" . }}{{- end }} - </div> - </div> - {{- partial "footer.html" . -}} +{{- partial "head.html" . -}} +<body> + <div id="wrapper"> + {{- partial "header.html" . -}} + <div id="container"> + <div id="content"> + {{- block "main" . }}{{- end }} </div> - </body> + </div> + {{- partial "footer.html" . -}} + </div> + </body> </html> diff --git a/themes/briar/layouts/_default/list.html b/themes/briar/layouts/_default/list.html index 5b21482..3f1ed33 100644 --- a/themes/briar/layouts/_default/list.html +++ b/themes/briar/layouts/_default/list.html @@ -1,14 +1,14 @@ {{ define "main" }} - <h1>{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }}</h1> - {{ range first 1 .Pages.ByDate.Reverse }} - <h3 itemprop="headline" class="blog-post-title"> - <a href="{{.Permalink}}">{{.Title}}</a> - </h3> +<h1>{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }}</h1> +{{ range first 1 .Pages.ByDate.Reverse }} +<h3 itemprop="headline" class="blog-post-title"> + <a href="{{.Permalink}}">{{.Title}}</a> +</h3> <p class="blog-post-meta">{{.Date.Format "2006-01-02"}} - {{ if (isset .Params "author") }} - by {{ markdownify .Params.author }} - {{ end }} - </p> - {{ end }} - {{ .Content }} +{{ if (isset .Params "author") }} +by {{ markdownify .Params.author }} +{{ end }} +</p> +{{ end }} +{{ .Content }} {{ end }} diff --git a/themes/briar/layouts/_default/section.html b/themes/briar/layouts/_default/section.html index d870959..a7fc36f 100644 --- a/themes/briar/layouts/_default/section.html +++ b/themes/briar/layouts/_default/section.html @@ -1,14 +1,14 @@ {{ define "main" }} - <h1>{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }}</h1> - {{ range first 10 .Pages.ByDate.Reverse }} - <h3 itemprop="headline" class="blog-post-title"> - <a href="{{.Permalink}}">{{.Title}}</a> - </h3> +<h1>{{ with .Title }} {{ . }} {{ else }} {{ .Site.Title }} {{ end }}</h1> +{{ range first 10 .Pages.ByDate.Reverse }} +<h3 itemprop="headline" class="blog-post-title"> + <a href="{{.Permalink}}">{{.Title}}</a> +</h3> <p class="blog-post-meta">{{.Date.Format "2006-01-02"}} - {{ if (isset .Params "author") }} - by {{ markdownify .Params.author }} - {{ end }} - </p> - {{ end }} - {{ .Content }} +{{ if (isset .Params "author") }} +by {{ markdownify .Params.author }} +{{ end }} +</p> +{{ end }} +{{ .Content }} {{ end }} diff --git a/themes/briar/layouts/_default/single.html b/themes/briar/layouts/_default/single.html index 830b17e..e22c3a1 100644 --- a/themes/briar/layouts/_default/single.html +++ b/themes/briar/layouts/_default/single.html @@ -1,4 +1,4 @@ {{ define "main" }} - <h2>{{ .Title }}</h2> - {{ .Content }} +<h2>{{ .Title }}</h2> +{{ .Content }} {{ end }} -- GitLab