mainly cosmetic changes to the code

This commit is contained in:
loikein 2023-04-15 00:36:29 +01:00
parent eb95b736e4
commit 6760f0cb6b
4 changed files with 170 additions and 165 deletions

View file

@ -2,17 +2,18 @@
<div id="layout" class="pure-g">
<article class="pure-u-1">
{{ partial "brand.html" . }}
{{ partial "content.header.html" . }}
<section class="list-page">
{{ range .Data.Pages.GroupByDate "2006" }}
<details open>
<summary class="year">{{ .Key }} ({{ len .Pages }})</summary>
{{ partial "content.header.html" . }}
<section class="list-page">
{{ range .Data.Pages.GroupByDate "2006" }}
<ul>
<li class="year">{{ .Key }} ({{ len .Pages }})</li>
{{ range .Pages.GroupByDate "January" }}
<ul>
<li>
<details open>
<summary>{{ .Key }} ({{ len .Pages }})</summary>
<li>{{ .Key }} ({{ len .Pages }})</li>
{{ range .Pages }}
<ul>
<li>
@ -21,14 +22,15 @@
</li>
</ul>
{{ end }}
</details>
</li>
</ul>
{{ end }}
</details>
</ul>
{{ end }}
</section>
</section>
{{ partial "footer.html" . }}
</article>
</div>

View file

@ -1,10 +1,15 @@
{{ define "main" }}
<div id="layout" class="pure-g">
<article class="pure-u-1">
<article class="pure-u-1">
{{ partial "brand.html" . }}
{{ range where .Site.RegularPages "Type" "post"}}
{{ with .Content }}
<section>
{{ . }}
</section>
{{ end }}
{{ range where .Site.RegularPages "Type" "posts" }}
<h1 class="content-title">
<h2 class="content-title">
{{ if .IsNode }}
<a href="{{ .Permalink }}">{{ .Title}}</a>
{{ else }}
@ -12,14 +17,10 @@
{{ end }}
</h1>
<p>{{ truncate 120 .Summary }}</p>
{{/* {{ if .Truncated }} */}}
<p><a href="{{ .RelPermalink }}">Read On &rarr;</a></p>
{{/* {{ end }} */}}
<p>{{ truncate 140 .Summary }}</p>
{{ end }}
{{ partial "footer.html" . }}
</article>
</article>
</div>
{{ end }}

View file

@ -1,16 +1,18 @@
<section>
<h1 class="content-title">
<h1 class="content-title">
{{ if .IsNode }}
<a href="{{ .Permalink }}">{{ .Title}}</a>
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} :: Draft {{end}}</a>
{{ end }}
</h1>
{{ if .IsPage }}
</h1>
{{ if .IsPage }}
{{ if .Params.subtitle }}
<p class=subtitle>{{ .Params.subtitle }}</p>
{{ end }}
{{ if or (eq .Type "post") (.Params.meta) }}
<span class="content-meta">
{{ if .Params.author }}
@ -18,7 +20,6 @@
&nbsp;{{ .Params.author }}</span> <br>
{{ end }}
{{ if not .Params.hidedate }}
<i class="fa fa-calendar"></i>
&nbsp;{{ .Date.Format "Jan 2, 2006" }}
@ -38,5 +39,6 @@
{{ end }}
</span>
{{ end }}
{{ end }}
{{ end }}
</section>

View file

@ -1,20 +1,19 @@
<footer class="page-footer">
<hr>
<hr>
<div class="previous-post" style="display:inline-block;">
<div class="previous-post" style="display:inline-block;">
{{ if .PrevPage }}
<a class="link-reverse" href="{{ .PrevPage.Permalink }}?ref=footer">« {{ .PrevPage.Title | truncate 50 "..."}}</a>
{{ end }}
</div>
</div>
<div class="next-post", style="display:inline-block;float:right;">
<div class="next-post", style="display:inline-block;float:right;">
{{ if .NextPage }}
<a class="link-reverse" href="{{ .NextPage.Permalink }}?ref=footer">{{ .NextPage.Title | truncate 50 "..." }} »</a>
{{ end }}
</div>
<ul class="page-footer-menu">
</div>
<ul class="page-footer-menu">
{{/* SOCIALS */}}
{{ if isset .Site.Params "twitter" }}
<li><a href="https://twitter.com/{{.Site.Params.twitter}}"><i class='fab fa-twitter fa-lg'></i></a></li>
@ -67,17 +66,17 @@
{{ range .Site.Menus.footer }}
<li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
{{ end }}
</ul>
</ul>
{{ if .Site.Params.showPoweredBy}}
<p>
{{ if .Site.Params.showPoweredBy}}
<p>
Powered by <a href="https://gohugo.io">Hugo</a> and the
<a href="https://github.com/slashformotion/hugo-tufte">Tufte theme</a>.
</p>
{{ end }}
<a href="https://github.com/loikein/hugo-tufte">Tufte theme</a>.
</p>
{{ end }}
<div class="copyright">
<p>
<div class="copyright">
<p>
{{ with .Site.Params.copyright }}
{{ . | safeHTML }}
{{ else }}
@ -85,6 +84,7 @@
{{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}.
All rights reserved.
{{end}}
</p>
</p>
</div>
</footer>