redesign landing page and /post list ptI

This commit is contained in:
Wouter Groeneveld 2022-11-12 08:44:52 +01:00
parent 17b3fd003a
commit 87622a9014
11 changed files with 163 additions and 75 deletions

View File

@ -4,9 +4,6 @@ type: archive
icontag: tech
---
> A half-baked idea a day keeps the doctor away. <span>Wouter</span>
These are fleeting, _half-baked_ thoughts, that may or may not get fully baked into fleshed out [blog posts](/post). The notes below may also be syndicated to other platforms and websites. Enjoy reading my ramblings!
Not finding what you're looking for? [Browse the archives](/archives).<br/>

View File

@ -3,10 +3,4 @@ title: Freshly Baked Thoughts
icontag: book
---
> No Art and Science serve alone; <br/>Patience must in the work be shown. <span>Goethe</span>
A continuous pursuit of knowledge for either personal or professional reasons is called "Lifelong learning" - also known as "**Brain Baking**". I discovered that in order for me to teach and inspire others, I first had to teach and inspire myself. You are looking at the result of that work.
Want to stay up to date? [Subscribe to the <svg class='icon icon-small' width='16' height='16'><title>feed icon</title><use xlink:href='#news'></use></svg>Blog Feed](/post/index.xml).<br/>
Not finding what you're looking for? [Browse the archives](/archives).<br/>
Interested in fleeting thoughts? [Read half-baked notes](/notes).<br/>
Below is a list of every fully baked post. Still not finding what you're looking for? [Browse the archives](/archives). Want to stay up to date? [Subscribe](/subscribe) to Brain Baking! Interested in fleeting thoughts? Read [half-baked notes](/notes).<br/>

View File

@ -1,18 +1,18 @@
---
title: Brain Archives
title: Brain Baking Archives
url: /archives/
aliases:
- /tags/
icontag: tag
---
The preservation of once freshly baked but now perhaps stale thoughts.<br/> Not finding what you're looking for? Try browsing the archives:
The preservation of [once freshly baked](/post) but now perhaps stale thoughts.<br/> Not finding what you're looking for? Try browsing the archives:
### By search
## By Search
{{< search >}}
### By category
## By Category
`try {`
@ -33,7 +33,7 @@ The preservation of once freshly baked but now perhaps stale thoughts.<br/> Not
I also write about retro PC/Handheld gaming and actual _bread baking_ on sister websites of Brain Baking: [Jefklak's Retro Codex](https://jefklakscodex.com) and [Red Zuurdesem](https://redzuurdesem.be), respectively.
### By year
## By Year
- [2022](/post/2022) ... when working from home was still a thing
- [2021](/post/2021) ... when I got back into both retro (80486) and modern (M1) hardware
@ -46,8 +46,9 @@ I also write about retro PC/Handheld gaming and actual _bread baking_ on sister
- [2014](/post/2014) ... when I switched from mostly programming in Java to C#
- [2013](/post/2013) ... when this site was a wiki running on pmWiki, and then DokuWiki
If that takes too long, [viewing all posts](/post) on a single page might help.
### By tag
## By Tag
The following tags are the most used in my writing: {{< popular-categories >}}.

View File

@ -1,5 +1,5 @@
{{ partial "header" . }}
{{ $itms := 5 }}
<main class="intro">
<h1>
@ -7,29 +7,88 @@
<svg class="logo"><title>Brain Baking Logo</title><use xlink:href='#logo'></use></svg>
<span style="color: #694425">Baking</span>
</h1>
<div class="txtblock">
<article>
<div class="flexlist">
<h2>Freshly Baked Thoughts</h2>
<small><a href="/archives">Archives</a> &raquo;</small>
</div>
<hr />
{{ $paginator := .Paginate (where .Site.Pages "Type" "post") $.Site.Params.pagination }}
{{ $currYear := .Date.Format "2006" }}
{{ if eq $paginator.PageNumber 1 }}
<h2><a href="/" alt="home"><svg class='icon'><title>home</title><use xlink:href='#book'></use></svg></a>Freshly Baked Thoughts</h2>
{{ end }}
<div class="list">
{{ range ($paginator.Pages).GroupByDate "2006" "desc" }}
{{ if ne $currYear .Key }}
<h2>{{ .Key }}</h2>
{{ $tags := slice }}
{{ $cats := slice }}
<ul class="smallist">
{{ range first $itms (where .Site.Pages "Section" "post").ByDate.Reverse }}
<li class="flexlist">
<h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
<small>
{{ .Date.Format ("02 Jan 2006") }}
</small>
</li>
{{ if isset .Params "tags" }}
{{ $tags = $tags | append .Params.tags }}
{{ end }}
{{ if isset .Params "categories" }}
{{ $cats = $cats | append .Params.categories }}
{{ end }}
{{ end }}
</ul>
</article>
<article>
<div class="flexlist">
<h2>Popular Bakings This Month</h2>
<small><a href="https://stats.brainbaking.com">Statistics</a> &raquo;</small>
</div>
{{ range .Pages.GroupByDate "Jan" }}
<h3>{{ .Key }}</h3>
{{ partial "list-ul" . }}
{{ $tags := slice }}
{{ $cats := slice }}
<ul class="smallist">
{{ range first $itms (where .Site.Pages "Section" "post").ByDate.Reverse }}
<li class="flexlist">
<h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
<small>
{{ .Date.Format ("02 Jan 2006") }}
</small>
</li>
{{ if isset .Params "tags" }}
{{ $tags = $tags | append .Params.tags }}
{{ end }}
{{ if isset .Params "categories" }}
{{ $cats = $cats | append .Params.categories }}
{{ end }}
{{ end }}
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
</ul>
</article>
<article>
<div class="flexlist">
<h2>Random Tasty Treats</h2>
<small><a href="/post">All posts</a> &raquo;</small>
</div>
{{ $tags := slice }}
{{ $cats := slice }}
<ul class="smallist">
{{ range first $itms (shuffle (where .Site.Pages "Section" "post")) }}
<li class="flexlist">
<h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
<small>
{{ .Date.Format ("02 Jan 2006") }}
</small>
</li>
{{ if isset .Params "tags" }}
{{ $tags = $tags | append .Params.tags }}
{{ end }}
{{ if isset .Params "categories" }}
{{ $cats = $cats | append .Params.categories }}
{{ end }}
{{ end }}
</ul>
</article>
</div>
<div class="belowsingle">

View File

@ -3,27 +3,24 @@ h1
@media (min-width: 768px)
font-size: 3rem
h2
font-size: 2.1rem
font-size: 2.0rem
h3
font-size: 1.7rem
font-size: 1.4rem
h4
font-size: 1.5rem
h5
font-size: 1.3rem
h6
font-size: 1.2rem
h1, h2, h3
h1, h2
font-weight: 700
margin-top: 20px
margin-bottom: 10px
h4, h5, h6
h3, h4, h5, h6
font-weight: normal
margin-top: 10px
margin-bottom: 10px
h1, h2, h3, h4, h5, h6
line-height: 1.8
font-weight: 700
.hidden
display: none

View File

@ -44,7 +44,7 @@ $dark-fg: #dddddd
color: $dark-fg
h1, h2, h3
color: $dark-accent
color: darken(white, 20%)
.intro
h1
@ -82,6 +82,9 @@ $dark-fg: #dddddd
color: $dark-accent
border-bottom: 1px solid $dark-accent
&:hover, &:visited:hover
border-bottom: 1px solid $dark-bg
.belowsingle
background-color: $dark-bg-alt
border-bottom: 5px solid $dark-bg

View File

@ -1,10 +1,11 @@
.intro
h2
font-size: 4vh
article
padding-top: 0.8em
h1
margin: 0
padding-bottom: 0.8em
text-shadow: #bbbbbb 0 4px 5px
font-size: 5vh

View File

@ -59,6 +59,28 @@ nav, footer
ul
list-style: circle
.flexlist
display: flex
flex-direction: column
justify-content: space-between
align-items: baseline
small
opacity: 0.7
@media (min-width: 600px)
flex-direction: row
div, h2, h3
flex: 3 1 15rem
small
flex: 1 2 1rem
text-align: right
ul.smallist
padding: 0
list-style: none
div.highlight
padding-top: 1.5rem
@ -71,7 +93,6 @@ a, a:visited, .link
text-decoration: none
&:hover
border-bottom: 1px solid $grey
color: $grey
@ -193,7 +214,7 @@ time
kbd
color: $accent
border: 1px solid $accent
font-size: 1rem
font-size: 1em
padding: 2px 4px
border-radius: 3px
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.25)
@ -256,3 +277,16 @@ table
tr
&:nth-child(odd)
background: #EEEEEE
.tagindex
.taggrid
display: grid
grid-template-columns: repeat(auto-fill, minmax(10em, 1fr))
column-gap: 1em
row-gap: 1.2em
h3
border-bottom: 1px solid darkgrey
ul
padding-left: 1em

View File

@ -17,31 +17,31 @@
{{ end }}
{{ $paginator := .Paginate (where .Data.Pages ".Params.type" "ne" "archive") $.Site.Params.pagination }}
<hr/>
<article>
{{ .Content }}
</article>
{{ if eq $paginator.PageNumber 1 }}
<hr/>
{{ with .Content }}
<article>
{{ . }}
</article>
{{ end }}
{{ end }}
{{ if (not .Params.disableList) }}
<div class="list">
{{ range ($paginator.Pages).GroupByDate "2006" "desc" }}
<article>
<small>
{{ range .Pages.GroupByDate "2006" "desc" }}
{{ if ne .Key "0001" }}
<h2>{{ .Key }}</h2>
{{ range .Pages.GroupByDate "Jan" }}
<h3>{{ .Key }}</h3>
{{ partial "list-ul" . }}
<ul class="smallist">
{{ range .Pages.ByDate.Reverse }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
<span style="color: gray;">{{ .Date.Format ("02 Jan") }}</span>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
{{ end }}
{{ end }}
{{ end }}
</small>
</article>
<footer>
</footer>

View File

@ -20,8 +20,8 @@
</article>
{{ end }}
<article>
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(10em, 1fr)); column-gap: 1em; row-gap: 1.2em;">
<article class="tagindex">
<div class="taggrid">
{{range $name, $taxonomy := .Site.Taxonomies.tags}}
{{ $cnt := .Count }}
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
@ -35,8 +35,8 @@
{{ end }}
{{ $.Scratch.Set "curLetter" $firstChar }}
<div style="margin-block-start: 0.6rem;">
<h3 style="border-bottom: 1px solid black;">{{ $firstChar }}</h3>
<ul style="padding-left: 1em">
<h3>{{ $firstChar }}</h3>
<ul>
{{ end }}
{{ if gt $cnt $offset }}

View File

@ -4,6 +4,8 @@
<script defer src='{{ $scripts.Permalink }}'></script>
{{- if (ne hugo.Environment "development") }}
<script data-goatcounter="https://stats.brainbaking.com/count"
async src="//stats.brainbaking.com/count.js"></script>
<script data-goatcounter="https://stats.brainbaking.com/count" async src="//stats.brainbaking.com/count.js"></script>
<noscript>
<img src="https://stats.brainbaking.com/count?p=/test-img" title="GoatCounter stats">
</noscript>
{{- end }}