blog.minskio.co.uk

Content and theme behind minskio.co.uk
Log | Files | Refs

commit ad505d88ad0c586ca6b1eff2a0c7873c544c5fe1
parent dd555cfd61ffe7a68fb4d82ed605baaf52ebcfc8
Author: breadcat <peter@minskio.co.uk>
Date:   Sun, 28 Jun 2020 00:34:31 +0100

Tidy up produced HTML

Indentation, unecessary CSS declarations, line breaks, everything must
go!

Diffstat:
Mthemes/Brine/layouts/_default/list.html | 11+++++------
Mthemes/Brine/layouts/_default/page.html | 13+++----------
Mthemes/Brine/layouts/_default/single.html | 17+++++------------
Mthemes/Brine/layouts/_default/terms.html | 10++++------
Mthemes/Brine/layouts/partials/pagination.html | 13++++++-------
Mtodo.txt | 2--
6 files changed, 23 insertions(+), 43 deletions(-)

diff --git a/themes/Brine/layouts/_default/list.html b/themes/Brine/layouts/_default/list.html @@ -1,6 +1,5 @@ -{{ define "main" }}<article> - <h1 class="page-heading">{{ .Title }}</h1> - <ul class="post-list"> - {{ range $index, $element := .Paginator.Pages }} <li><h3><a class="post-link" href="{{ .Permalink }}">{{ .Title }}</a></h3><span class="post-meta">{{ .PublishDate.Format "Jan 2, 2006" }}, {{ .ReadingTime }} min read</span></li> - {{ end }}</ul>{{ partial "pagination.html" $ }} - </article>{{ end }} +{{ define "main" }} <h1>{{ .Title }}</h1> + <ul>{{ range $index, $element := .Paginator.Pages }} + <li><h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3><span>{{ .PublishDate.Format "Jan 2, 2006" }}, {{ .ReadingTime }} min read</span></li>{{ end }} + </ul> +{{ partial "pagination.html" $ }}{{ end }} diff --git a/themes/Brine/layouts/_default/page.html b/themes/Brine/layouts/_default/page.html @@ -1,10 +1,3 @@ -{{ define "main" }} - <article class="post"> - <header class="post-header"> - <h1 class ="post-title">{{ .Title }}</h1> - <div class="post-meta"> - <div>Reading time: {{ .ReadingTime }} min</div> - </div> - </header> - <div class="post-content">{{ .Content }}</div> - </article>{{ end }} +{{ define "main" }} <h1>{{ .Title }}</h1> + <div>Reading time: {{ .ReadingTime }} min</div> + {{ .Content }}{{ end }} diff --git a/themes/Brine/layouts/_default/single.html b/themes/Brine/layouts/_default/single.html @@ -1,12 +1,5 @@ -{{ define "main" }} - <article class="post"> - <header class="post-header"> - <h1 class ="post-title">{{ .Title }}</h1> - <div class="post-meta"> - <div>Published: {{ .PublishDate.Format "Jan 2, 2006" }}</div> - <div>Reading time: {{ .ReadingTime }} min</div>{{- with .Params.tags -}} - <div>Tags: {{ range . -}}{{- with $.Site.GetPage (printf "/%s/%s" "tags" . ) -}}<a href="{{ .Permalink }}">{{ .Title }}</a>&nbsp;{{- end -}}{{- end -}}</div>{{- end -}} - </div> - </header> - <div class="post-content">{{ .Content }}</div> - </article>{{ end }} +{{ define "main" }} <h1>{{ .Title }}</h1> + <div>Published: {{ .PublishDate.Format "Jan 2, 2006" }}</div> + <div>Reading time: {{ .ReadingTime }} min</div>{{- with .Params.tags -}} + <div>Tags: {{ range . -}}{{- with $.Site.GetPage (printf "/%s/%s" "tags" . ) -}}<a href="{{ .Permalink }}">{{ .Title }}</a>&nbsp;{{- end -}}{{- end -}}</div>{{- end -}} + {{ .Content }}{{ end }} diff --git a/themes/Brine/layouts/_default/terms.html b/themes/Brine/layouts/_default/terms.html @@ -1,6 +1,4 @@ -{{ define "main" }}<article> - <h1>{{ .Title }}</h1> - <ul class="posts-list"> - {{ range .Data.Terms.Alphabetical }} <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li> - {{ end }}</ul> - </article>{{ end }} +{{ define "main" }} <h1>{{ .Title }}</h1> + <ul>{{ range .Data.Terms.Alphabetical }} + <li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>{{ end }} + </ul>{{ end }} diff --git a/themes/Brine/layouts/partials/pagination.html b/themes/Brine/layouts/partials/pagination.html @@ -1,6 +1,5 @@ -{{ with $.Paginator }}{{ if gt .TotalPages 1 }} - <p class="pagination"> - {{ with .Prev }}<a class="page-link" href="{{ .URL }}">Previous</a></li> - {{ end }}{{ range .Pagers }}<a class="page-link{{ if eq .PageNumber $.Paginator.PageNumber }} a{{ end }}" href="{{ .URL }}">{{ .PageNumber }}</a> - {{ end }}{{ with .Next }}<a class="page-link" href="{{ .URL }}">Next</a>{{ end }} - </p>{{ end }}{{ end }} -\ No newline at end of file +{{ with $.Paginator }}{{ if gt .TotalPages 1 }} <p class="pagination"> + {{ with .Prev }}<a class="page-link" href="{{ .URL }}">Previous</a></li> + {{ end }}{{ range .Pagers }}<a class="page-link{{ if eq .PageNumber $.Paginator.PageNumber }} a{{ end }}" href="{{ .URL }}">{{ .PageNumber }}</a> + {{ end }}{{ with .Next }}<a class="page-link" href="{{ .URL }}">Next</a>{{ end }} + </p>{{ end }}{{ end }} +\ No newline at end of file diff --git a/todo.txt b/todo.txt @@ -1,5 +1,3 @@ merge themes\Brine\layouts\_default\{page single}.html using if statements fix lastmod content\posts\archived-{movies television}.md fix looping page lists \{recipes languages dreams}\* -correct indentations in page source -remove surplus newlines in page source