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,34 +2,36 @@
<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>
{{ range .Pages.GroupByDate "January" }}
<ul>
<li>
<details open>
<summary>{{ .Key }} ({{ len .Pages }})</summary>
{{ range .Pages }}
<ul>
<li>
<span class="list-date">{{ .Date.Format "Jan 2" }} &middot;</span>
<a href="{{ .RelPermalink }}">{{.Title}}</a>
</li>
</ul>
{{ end }}
</details>
</li>
</ul>
{{ 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>{{ .Key }} ({{ len .Pages }})</li>
{{ range .Pages }}
<ul>
<li>
<span class="list-date">{{ .Date.Format "Jan 2" }} &middot;</span>
<a href="{{ .RelPermalink }}">{{.Title}}</a>
</li>
</ul>
{{ end }}
</details>
</li>
</ul>
{{ end }}
</section>
</ul>
{{ end }}
</section>
{{ partial "footer.html" . }}
</article>
</div>
{{ end }}
{{ end }}

View file

@ -1,25 +1,26 @@
{{ define "main" }}
<div id="layout" class="pure-g">
<article class="pure-u-1">
{{ partial "brand.html" . }}
{{ range where .Site.RegularPages "Type" "post"}}
<h1 class="content-title">
{{ if .IsNode }}
<a href="{{ .Permalink }}">{{ .Title}}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} :: Draft {{end}}</a>
{{ end }}
</h1>
<article class="pure-u-1">
{{ partial "brand.html" . }}
{{ with .Content }}
<section>
{{ . }}
</section>
{{ end }}
{{ range where .Site.RegularPages "Type" "posts" }}
<h2 class="content-title">
{{ if .IsNode }}
<a href="{{ .Permalink }}">{{ .Title}}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} :: Draft {{end}}</a>
{{ 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>
{{ end }}
{{ partial "footer.html" . }}
</article>
</div>
{{ end }}
{{ end }}

View file

@ -1,42 +1,44 @@
<section>
<h1 class="content-title">
{{ if .IsNode }}
<a href="{{ .Permalink }}">{{ .Title}}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} :: Draft {{end}}</a>
{{ end }}
</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 }}
<i class="fa fa-user">&nbsp;</i><span class="author">
&nbsp;{{ .Params.author }}</span> <br>
{{ end }}
{{ if not .Params.hidedate }}
<i class="fa fa-calendar"></i>
&nbsp;{{ .Date.Format "Jan 2, 2006" }}
{{end }}
{{ if not .Params.hidereadtime }}
&nbsp;<i class="fa fa-clock-o"></i>
&nbsp;{{ .ReadingTime }} min read
{{ end }}
{{ if .Params.categories }}
<br>
<i class="fa fa-tags"> </i>
{{ range .Params.categories }}
<a href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
</span>
{{ end }}
<h1 class="content-title">
{{ if .IsNode }}
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} :: Draft {{end}}</a>
{{ end }}
</section>
</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 }}
<i class="fa fa-user">&nbsp;</i><span class="author">
&nbsp;{{ .Params.author }}</span> <br>
{{ end }}
{{ if not .Params.hidedate }}
<i class="fa fa-calendar"></i>
&nbsp;{{ .Date.Format "Jan 2, 2006" }}
{{end }}
{{ if not .Params.hidereadtime }}
&nbsp;<i class="fa fa-clock-o"></i>
&nbsp;{{ .ReadingTime }} min read
{{ end }}
{{ if .Params.categories }}
<br>
<i class="fa fa-tags"> </i>
{{ range .Params.categories }}
<a href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
</span>
{{ end }}
{{ end }}
</section>

View file

@ -1,90 +1,90 @@
<footer class="page-footer">
<hr>
<hr>
<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 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 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>
<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">
{{/* 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>
{{ end }}
{{ if isset .Site.Params "github" }}
<li><a href="https://github.com/{{.Site.Params.github}}"><i class='fab fa-github fa-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "gitlab" }}
<li><a href="https://gitlab.com/{{.Site.Params.gitlab}}"><i class='fab fa-gitlab fa-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "patreon" }}
<li><a href="https://www.patreon.com/{{.Site.Params.patreon}}"><i class='fab fa-patreon la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "youtube" }}
<li><a href="https://www.youtube.com/{{.Site.Params.youtube}}"><i class='fab fa-youtube la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "medium" }}
<li><a href="https://medium.com/{{.Site.Params.medium}}"><i class='fab fa-medium la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "reddit" }}
<li><a href="https://www.reddit.com/user/{{.Site.Params.reddit}}"><i class='fab fa-reddit la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "stackoverflow" }}
<li><a href="https://stackoverflow.com/users/{{.Site.Params.stackoverflow}}?tab=profile"><i class='fab fa-stack-overflow la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "instagram" }}
<li><a href="https://www.instagram.com/{{.Site.Params.instagram}}"><i class='fab fa-instagram la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "mastodon" }}
<li><a href="https://{{.Site.Params.mastodon}}"><i class='fab fa-mastodon la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "orcid" }}
<li><a href="https://orcid.org/{{.Site.Params.orcid}}"><i class='fab fa-orcid la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "google_scholar" }}
<li><a href="https://scholar.google.com/citations?user={{.Site.Params.google_scholar}}"><i class='fas fa-graduation-cap la-lg'></i></a></li>
{{ end }}
{{/* END SOCIALS */}}
{{ range .Site.Menus.footer }}
<li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
{{ end }}
</ul>
{{ 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>
<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>
{{ end }}
<div class="copyright">
<p>
{{ with .Site.Params.copyright }}
{{ . | safeHTML }}
{{ else }}
&copy; {{now.Format "2006"}}
{{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}.
All rights reserved.
{{end}}
</p>
{{ if isset .Site.Params "github" }}
<li><a href="https://github.com/{{.Site.Params.github}}"><i class='fab fa-github fa-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "gitlab" }}
<li><a href="https://gitlab.com/{{.Site.Params.gitlab}}"><i class='fab fa-gitlab fa-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "patreon" }}
<li><a href="https://www.patreon.com/{{.Site.Params.patreon}}"><i class='fab fa-patreon la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "youtube" }}
<li><a href="https://www.youtube.com/{{.Site.Params.youtube}}"><i class='fab fa-youtube la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "medium" }}
<li><a href="https://medium.com/{{.Site.Params.medium}}"><i class='fab fa-medium la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "reddit" }}
<li><a href="https://www.reddit.com/user/{{.Site.Params.reddit}}"><i class='fab fa-reddit la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "stackoverflow" }}
<li><a href="https://stackoverflow.com/users/{{.Site.Params.stackoverflow}}?tab=profile"><i class='fab fa-stack-overflow la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "instagram" }}
<li><a href="https://www.instagram.com/{{.Site.Params.instagram}}"><i class='fab fa-instagram la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "mastodon" }}
<li><a href="https://{{.Site.Params.mastodon}}"><i class='fab fa-mastodon la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "orcid" }}
<li><a href="https://orcid.org/{{.Site.Params.orcid}}"><i class='fab fa-orcid la-lg'></i></a></li>
{{ end }}
{{ if isset .Site.Params "google_scholar" }}
<li><a href="https://scholar.google.com/citations?user={{.Site.Params.google_scholar}}"><i class='fas fa-graduation-cap la-lg'></i></a></li>
{{ end }}
{{/* END SOCIALS */}}
{{ range .Site.Menus.footer }}
<li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
{{ end }}
</ul>
{{ if .Site.Params.showPoweredBy}}
<p>
Powered by <a href="https://gohugo.io">Hugo</a> and the
<a href="https://github.com/loikein/hugo-tufte">Tufte theme</a>.
</p>
{{ end }}
<div class="copyright">
<p>
{{ with .Site.Params.copyright }}
{{ . | safeHTML }}
{{ else }}
&copy; {{now.Format "2006"}}
{{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}.
All rights reserved.
{{end}}
</p>
</div>
</footer>