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"> <div id="layout" class="pure-g">
<article class="pure-u-1"> <article class="pure-u-1">
{{ partial "brand.html" . }} {{ partial "brand.html" . }}
{{ partial "content.header.html" . }}
<section class="list-page"> {{ partial "content.header.html" . }}
{{ range .Data.Pages.GroupByDate "2006" }}
<details open> <section class="list-page">
<summary class="year">{{ .Key }} ({{ len .Pages }})</summary> {{ range .Data.Pages.GroupByDate "2006" }}
{{ range .Pages.GroupByDate "January" }} <ul>
<ul> <li class="year">{{ .Key }} ({{ len .Pages }})</li>
<li> {{ range .Pages.GroupByDate "January" }}
<details open> <ul>
<summary>{{ .Key }} ({{ len .Pages }})</summary> <li>{{ .Key }} ({{ len .Pages }})</li>
{{ range .Pages }} {{ range .Pages }}
<ul> <ul>
<li> <li>
<span class="list-date">{{ .Date.Format "Jan 2" }} &middot;</span> <span class="list-date">{{ .Date.Format "Jan 2" }} &middot;</span>
<a href="{{ .RelPermalink }}">{{.Title}}</a> <a href="{{ .RelPermalink }}">{{.Title}}</a>
</li> </li>
</ul> </ul>
{{ end }}
</details>
</li>
</ul>
{{ end }} {{ end }}
</details> </li>
</ul>
{{ end }} {{ end }}
</section> </ul>
{{ end }}
</section>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
</article> </article>
</div> </div>
{{ end }} {{ end }}

View file

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

View file

@ -1,42 +1,44 @@
<section> <section>
<h1 class="content-title"> <h1 class="content-title">
{{ if .IsNode }} {{ if .IsNode }}
<a href="{{ .Permalink }}">{{ .Title}}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>
{{ else }} {{ else }}
<a href="{{ .RelPermalink }}">{{ .Title }}{{ if .Draft }} :: Draft {{end}}</a> <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 }}
{{ end }} {{ 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"> <footer class="page-footer">
<hr> <hr>
<div class="previous-post" style="display:inline-block;"> <div class="previous-post" style="display:inline-block;">
{{ if .PrevPage }} {{ if .PrevPage }}
<a class="link-reverse" href="{{ .PrevPage.Permalink }}?ref=footer">« {{ .PrevPage.Title | truncate 50 "..."}}</a> <a class="link-reverse" href="{{ .PrevPage.Permalink }}?ref=footer">« {{ .PrevPage.Title | truncate 50 "..."}}</a>
{{ end }} {{ 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 }} {{ if .NextPage }}
<a class="link-reverse" href="{{ .NextPage.Permalink }}?ref=footer">{{ .NextPage.Title | truncate 50 "..." }} »</a> <a class="link-reverse" href="{{ .NextPage.Permalink }}?ref=footer">{{ .NextPage.Title | truncate 50 "..." }} »</a>
{{ end }} {{ end }}
</div> </div>
<ul class="page-footer-menu"> <ul class="page-footer-menu">
{{/* SOCIALS */}}
{{/* SOCIALS */}} {{ if isset .Site.Params "twitter" }}
{{ if isset .Site.Params "twitter" }} <li><a href="https://twitter.com/{{.Site.Params.twitter}}"><i class='fab fa-twitter fa-lg'></i></a></li>
<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>
{{ end }} {{ end }}
<div class="copyright"> {{ if isset .Site.Params "github" }}
<p> <li><a href="https://github.com/{{.Site.Params.github}}"><i class='fab fa-github fa-lg'></i></a></li>
{{ with .Site.Params.copyright }} {{ end }}
{{ . | safeHTML }}
{{ else }} {{ if isset .Site.Params "gitlab" }}
&copy; {{now.Format "2006"}} <li><a href="https://gitlab.com/{{.Site.Params.gitlab}}"><i class='fab fa-gitlab fa-lg'></i></a></li>
{{ with .Site.Params.copyrightHolder }}{{ . }}{{end}}. {{ end }}
All rights reserved.
{{end}} {{ if isset .Site.Params "patreon" }}
</p> <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> </div>
</footer> </footer>