huge refactoring styling, related links, belowsingle, ...

This commit is contained in:
Wouter Groeneveld 2022-11-12 21:29:17 +01:00
parent 46f2624724
commit 84e8072187
26 changed files with 265 additions and 413 deletions

View File

@ -19,7 +19,7 @@ enableGitInfo = true
pagination = 30 pagination = 30
description = "Freshly Baked Thoughts" description = "Freshly Baked Thoughts"
webmentionServer = "https://jam.brainbaking.com" webmentionServer = "https://jam.brainbaking.com"
copyright = "&uarr;&nbsp;<a href='#header'>Top</a> <svg class='icon icon-small' width='16' height='16'><title>lightbulb icon</title><use xlink:href='#bulb'></use></svg> <a href='/'>Brain Baking</a>. <a href='/no-copyright-no-tracking'>No &copy; and no tracking</a>." copyright = "&uarr;&nbsp;<a href='#header'>Top</a> <svg class='icon icon-small' width='16' height='16'><title>lightbulb icon</title><use xlink:href='#bulb'></use></svg> <a href='/'>Brain Baking</a> | <a href='/archives'>Archives</a> | <a href='/no-copyright-no-tracking'>No &copy; no tracking</a>."
[Author] [Author]
name = "Wouter Groeneveld" name = "Wouter Groeneveld"

View File

@ -5,26 +5,26 @@ bigimg: About Me.jpg
disableComments: true disableComments: true
--- ---
And I'm currently an experienced multiclass ... And I'm currently an multiclass ...
### ... Baker ## ... Baker
I hold a professional bread baker's degree so naturally I love to think of myself as a real baker. I highly respect the craft and enjoy kneading dough with my hands. I specialize in _sourdough bread_, as you can read at my [bread baking blog](https://redzuurdesem.be). I've written a book on [the science of sourdough bread](https://redzuurdesem.be/het-boek) (in Dutch). I hold a professional bread baker's degree so naturally I love to think of myself as a real baker. I highly respect the craft and enjoy kneading dough with my hands. I specialize in _sourdough bread_, as you can read at my [bread baking blog](https://redzuurdesem.be). I've written a book on [the science of sourdough bread](https://redzuurdesem.be/het-boek) (in Dutch).
### ... Researcher ## ... Researcher
I am a PhD researcher at the Faculty of Engineering Technology, KU Leuven. My academic research focuses on identifying and amplifying non-technical skills in software engineering education, primarily targetting _creative problem solving_. I sometimes [blog about my work](/tags/phd). I am a PhD researcher at the Faculty of Engineering Technology, KU Leuven. My academic research focuses on identifying and amplifying non-technical skills in software engineering education, primarily targetting _creative problem solving_. I sometimes [blog about my work](/tags/phd).
### ... Programmer ## ... Programmer
I'm an experienced software engineer and took on various roles from agile coaching to technical lead. I hold a Master of Computer Science. I also dabble in open source, have a peek at https://git.brainbaking.com/. Im a big Test Driven Development advocate. I teach software engineering techniques in both industry and academia. I'm an experienced software engineer and took on various roles from agile coaching to technical lead. I hold a Master of Computer Science. I also dabble in open source, have a peek at https://git.brainbaking.com/. Im a big Test Driven Development advocate. I teach software engineering techniques in both industry and academia.
### ... Writer ## ... Writer
I like fountain pens and [<svg class='icon icon-text'><use xlink:href='#book'></use></svg>journaling](/tags/journaling/). I love jotting down stuff and possibly converting that into blog posts, academic articles, books, or any other medium where I can express my enthusiasm. I like fountain pens and [<svg class='icon icon-text'><use xlink:href='#book'></use></svg>journaling](/tags/journaling/). I love jotting down stuff and possibly converting that into blog posts, academic articles, books, or any other medium where I can express my enthusiasm.
### ... Teacher ## ... Teacher
Transforming knowledge into well-digestible material is my mission. As they say: _the best way to learn something is to teach it_ - I couldn't agree more. Besides various formal teaching assignments at KU Leuven, I've also coached software developers in different companies, and occasionally organize bread baking workshops. Transforming knowledge into well-digestible material is my mission. As they say: _the best way to learn something is to teach it_ - I couldn't agree more. Besides various formal teaching assignments at KU Leuven, I've also coached software developers in different companies, and occasionally organize bread baking workshops.
@ -61,21 +61,3 @@ There are multiple concepts all defining the same thing:
I used to be only good at programming because I thought, as a Computer Scientist, you specialize instead of generalize. But the more I worked with computers, the more my hands itched to do something else. So nowadays I love to go wide and pass on that enthusiasm for knowledge on any level. I used to be only good at programming because I thought, as a Computer Scientist, you specialize instead of generalize. But the more I worked with computers, the more my hands itched to do something else. So nowadays I love to go wide and pass on that enthusiasm for knowledge on any level.
---
## Where good ideas come from: books
I keep an active <a href="https://www.goodreads.com/user/show/5451893-wouter" target="_blank"><svg class='icon'><use xlink:href='#goodreads'></use></svg>Goodreads</a> account where I manage everything I've read and want to read. I invite you to join the community there. Marking a book as read and writing a (short) review never was that satisfying...
I used to be almost exclusively a fantasy reader. Now I mostly read non-fiction on the most diverse topics, but I do have a soft spot for things like philosophy, art, mindful food and software engineering.
These are the latest 12 books I've read:
</main>
<div id="gr_grid_widget_1496758344" class="goodreadswidget">
</div>
<script src="/js/goodreads.js" type="text/javascript" charset="utf-8"></script>
<main>
<p style="clear: both;">&nbsp;</p>

View File

@ -1,6 +1,7 @@
--- ---
title: Freshly Baked Thoughts title: Freshly Baked Thoughts
icontag: book icontag: book
disableComments: true
--- ---
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/> 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

@ -2,7 +2,7 @@
import sqlite3 import sqlite3
import sys import sys
import os import os
from datetime import datetime import datetime
# see https://github.com/arp242/goatcounter/blob/master/db/query/hit_list.List-stats.sql # see https://github.com/arp242/goatcounter/blob/master/db/query/hit_list.List-stats.sql
# date format: "2022-11-01 23:00:00" # date format: "2022-11-01 23:00:00"
@ -13,8 +13,7 @@ select
from hit_counts from hit_counts
where where
hit_counts.site = 1 hit_counts.site = 1
and hour >= "2022-11-01" and hour >= ?
and hour < "2022-12-01"
and path like '/post/%' and path like '/post/%'
group by path group by path
order by total desc order by total desc
@ -28,18 +27,20 @@ if len(sys.argv) > 1:
if not os.path.exists(dbpath): if not os.path.exists(dbpath):
exit("DB file " + dbpath + " does not exist, quitting!") exit("DB file " + dbpath + " does not exist, quitting!")
connection = sqlite3.connect(dbpath) with sqlite3.connect(dbpath) as connection:
cursor = connection.cursor() cursor = connection.cursor()
cursor.execute(q) a_month_ago = (datetime.date.today() - datetime.timedelta(days=31)).strftime("%Y-%m-%d")
rows = cursor.fetchall()
total = sum(map(lambda r: int(r[3]), rows))
title = lambda r: r[1].split('|')[0].strip() cursor.execute(q, [a_month_ago])
url = lambda r: r[0] rows = cursor.fetchall()
date = lambda r: datetime.strptime(r[2], "%Y-%m-%d %H:%M:%S").strftime("%d %b %Y") total = sum(map(lambda r: int(r[3]), rows))
rank = lambda r: str(round((int(r[3]) / total) * 100)) + "%"
print('[') title = lambda r: r[1].split('|')[0].strip()
print(',\n'.join(map(lambda r: "{ \"url\": \"" + url(r) + "\", \"title\": \"" + title(r) + "\", \"rank\": \"" + rank(r) + "\" }", rows))) url = lambda r: r[0]
print(']') date = lambda r: datetime.datetime.strptime(r[2], "%Y-%m-%d %H:%M:%S").strftime("%d %b %Y")
rank = lambda r: str(round((int(r[3]) / total) * 100)) + "%"
print('[')
print(',\n'.join(map(lambda r: "{ \"url\": \"" + url(r) + "\", \"title\": \"" + title(r) + "\", \"rank\": \"" + rank(r) + "\" }", rows)))
print(']')

View File

@ -10,33 +10,35 @@
<div class="txtblock"> <div class="txtblock">
<article> <article>
<div class="flexlist"> <div class="flexgrid flexgrid-8020">
<h2>Freshly Baked Thoughts</h2> <h2>Freshly Baked Thoughts</h2>
<small><a href="/archives">Archives</a> &raquo;</small> <small><a href="/archives">Archives</a> &raquo;</small>
</div> </div>
<ul class="smallist"> <ul class="small">
{{ range first $itms (where .Site.Pages "Section" "post").ByDate.Reverse }} {{ range first $itms (where .Site.Pages "Section" "post").ByDate.Reverse }}
<li class="flexlist"> <li class="flexgrid flexgrid-8020">
<h3> <h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a> <a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3> </h3>
<small> <small>
{{ .Date.Format ("02 Jan 2006") }} <time datetime='{{ .Date.Format "2006-01-02" }}'>
{{ .Date.Format ("02 Jan 2006") }}
</time>
</small> </small>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
</article> </article>
<article> <article>
<div class="flexlist"> <div class="flexgrid flexgrid-8020">
<h2>Popular Bakings This Month</h2> <h2>Popular Bakings This Month</h2>
<small><a href="https://stats.brainbaking.com">Statistics</a> &raquo;</small> <small><a href="https://stats.brainbaking.com">Statistics</a> &raquo;</small>
</div> </div>
<ul class="smallist"> <ul class="small">
{{ range first $itms (.Site.Data.popularposts) }} {{ range first $itms (.Site.Data.popularposts) }}
<li class="flexlist"> <li class="flexgrid flexgrid-8020">
<h3> <h3>
<a href="{{ .url }}">{{ .title }}</a> <a href="{{ .url }}">{{ .title }}</a>
</h3> </h3>
@ -48,18 +50,20 @@
</ul> </ul>
</article> </article>
<article> <article>
<div class="flexlist"> <div class="flexgrid flexgrid-8020">
<h2>Random Tasty Treats</h2> <h2>Random Tasty Treats</h2>
<small><a href="/post">All posts</a> &raquo;</small> <small><a href="/post">All posts</a> &raquo;</small>
</div> </div>
<ul class="smallist"> <ul class="small">
{{ range first $itms (shuffle (where .Site.Pages "Section" "post")) }} {{ range first $itms (shuffle (where (where .Site.Pages ".Params.disableComments" "!=" "true") "Section" "post")) }}
<li class="flexlist"> <li class="flexgrid flexgrid-8020">
<h3> <h3>
<a href="{{ .RelPermalink }}">{{ .Title }}</a> <a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3> </h3>
<small> <small>
{{ .Date.Format ("02 Jan 2006") }} <time datetime='{{ .Date.Format "2006-01-02" }}'>
{{ .Date.Format ("02 Jan 2006") }}
</time>
</small> </small>
</li> </li>
{{ end }} {{ end }}
@ -69,7 +73,7 @@
<div class="belowsingle"> <div class="belowsingle">
<div class="txtblock"> <div class="txtblock">
<h2 class="page-header"><a href="/about" alt="go to the about page"><svg class='icon'><title>about me</title><use xlink:href='#about'></use></svg></a>About the Head Brain Baker</h2> <h2 class="page-header">The Head Brain Baker</h2>
<article class="p-author h-card"> <article class="p-author h-card">
<div class="avatar"> <div class="avatar">
<img class="u-photo" src="{{ .Site.BaseURL }}/img/avatar.jpg" alt="A photo of Me!" /> <img class="u-photo" src="{{ .Site.BaseURL }}/img/avatar.jpg" alt="A photo of Me!" />
@ -80,7 +84,6 @@
<p> <p>
If you found my bakings amusing and/or helpful, you can <a rel="me" href="https://ko-fi.com/woutergroeneveld"><strong>buy me a coffee</strong></a>—if you don't mind I'll use it to enjoy a cup of tea instead. I also like to hear about your own <em>bakings</em> via <svg class='icon icon-text'><title>chat icon</title><use xlink:href='#discuss'></use></svg><a rel="me" class="u-url" href="{{ .Site.Author.mastodonlink }}">Mastodon</a> or <svg class='icon icon-text'><title>mail icon</title><use xlink:href='#mail'></use></svg><span class="link meel">e-mail</span>. Thanks! If you found my bakings amusing and/or helpful, you can <a rel="me" href="https://ko-fi.com/woutergroeneveld"><strong>buy me a coffee</strong></a>—if you don't mind I'll use it to enjoy a cup of tea instead. I also like to hear about your own <em>bakings</em> via <svg class='icon icon-text'><title>chat icon</title><use xlink:href='#discuss'></use></svg><a rel="me" class="u-url" href="{{ .Site.Author.mastodonlink }}">Mastodon</a> or <svg class='icon icon-text'><title>mail icon</title><use xlink:href='#mail'></use></svg><span class="link meel">e-mail</span>. Thanks!
</p> </p>
<hr/>
</article> </article>
&nbsp; &nbsp;
</div> </div>

View File

@ -2,13 +2,21 @@
Not finding what you're looking for? <a href="/tags">Browse the archives</a>. Not finding what you're looking for? <a href="/tags">Browse the archives</a>.
<div class="list"> <h2>{{ $year }}</h2>
<h2>{{ $year }}</h2>
{{ range (where (where $.Site.Pages "Section" "post") "Date.Year" "eq" $year).GroupByDate "Jan" }} {{ range (where (where $.Site.Pages "Section" "post") "Date.Year" "eq" $year).GroupByDate "January" }}
<h3><a name="{{ .Key }}"></a>{{ .Key }}</h3> <h3>{{ .Key }}</h3>
{{ partial "list-ul" . }} {{ range .Pages.GroupByDate "Jan" }}
<ul class="small">
{{ range .Pages.ByDate.Reverse }}
<li class="flexgrid flexgrid-8020">
<span><a href="{{ .RelPermalink }}">{{ .Title }}</a></span>
<small>
<time datetime='{{ .Date.Format "2006-01-02" }}'>{{ .Date.Format ("02 Jan 2006") }}</time>
</small>
</li>
{{ end }}
</ul>
{{ end }} {{ end }}
{{ end }}
</div>

View File

@ -1,17 +1,3 @@
@mixin block-960
width: calc(100% - -220px + 0px)
margin-left: -90px
@mixin block-1120
width: calc(100% - -260px + 0px)
margin-left: -130px
header
@media (min-width: 960px)
@include block-960
@media (min-width: 1120px)
@include block-1120
blockquote blockquote
font-family: $font-alt-stack font-family: $font-alt-stack
@ -39,7 +25,6 @@ blockquote
margin-top: -10px margin-top: -10px
p p
padding-left: 0.5rem 0 !important padding-left: 0.5rem 0 !important
letter-spacing: 0rem letter-spacing: 0rem
width: 100% width: 100%

View File

@ -2,8 +2,13 @@ h1
font-size: 2.4rem font-size: 2.4rem
@media (min-width: 768px) @media (min-width: 768px)
font-size: 3rem font-size: 3rem
margin-top: 0.5em
margin-bottom: 0.2em
h2 h2
font-size: 2.0rem font-size: 1.9rem
margin-top: 1em
margin-bottom: 1em
h3 h3
font-size: 1.4rem font-size: 1.4rem
h4 h4
@ -11,13 +16,11 @@ h4
h1, h2 h1, h2
font-weight: 700 font-weight: 700
margin-top: 20px
margin-bottom: 10px
h3, h4, h5, h6 h3, h4, h5, h6
font-weight: normal font-weight: normal
margin-top: 10px margin-top: 1em
margin-bottom: 10px margin-bottom: 1em
h1, h2, h3, h4, h5, h6 h1, h2, h3, h4, h5, h6
line-height: 1.8 line-height: 1.8

View File

@ -1,11 +1,11 @@
.intro .intro
padding-top: 0
article article
padding-top: 0.8em padding-top: 0.8em
h1 h1
margin: 0 margin: 0
padding-bottom: 0.8em padding-bottom: 1.2em
text-shadow: #bbbbbb 0 4px 5px text-shadow: #bbbbbb 0 4px 5px
font-size: 5vh font-size: 5vh
@ -38,10 +38,19 @@
height: 30vh height: 30vh
top: 6rem top: 6rem
header header
svg.logo @media (min-width: 960px)
visibility: hidden width: calc(100vw - 100px)
@media (min-width: 1400px) @media (min-width: 1120px)
visibility: visible width: calc(100vw - 420px)
svg.logo
visibility: hidden
position: absolute
left: 0
@media (min-width: 1400px)
visibility: visible

View File

@ -59,29 +59,29 @@ nav, footer
ul ul
list-style: circle list-style: circle
.flexlist .flexgrid
display: flex display: flex
flex-direction: column flex-direction: column
justify-content: space-between justify-content: space-between
align-items: baseline align-items: baseline
small &-8020
opacity: 0.7 *:nth-child(2)
opacity: 0.7
@media (min-width: 600px)
flex-direction: row
@media (min-width: 600px) *:nth-child(1)
flex-direction: row flex: 3 1 15rem
margin: 0.1em
*:nth-child(2)
flex: 1 2 1rem
text-align: right
div, h2, h3 ul.small
flex: 3 1 15rem
small
flex: 1 2 1rem
text-align: right
ul.smallist
padding: 0 padding: 0
list-style: none list-style: none
div.highlight div.highlight
padding-top: 1.5rem padding-top: 1.5rem
padding-bottom: 1.5rem padding-bottom: 1.5rem
@ -109,7 +109,7 @@ pre
&.post .content > p:first-of-type::first-letter &.post .content > p:first-of-type::first-letter
margin-top: 10px margin-top: 10px
article, main.list, main.notes, .txtblock article, main.notes, .txtblock
margin: auto margin: auto
flex: 1 0 auto flex: 1 0 auto
display: block display: block
@ -122,7 +122,7 @@ article, main.list, main.notes, .txtblock
article article
padding-left: 1rem padding-left: 1rem
padding-right: 1rem padding-right: 1rem
margin-bottom: 1rem padding-bottom: 1rem
text-align: left text-align: left
&.post .content > p:first-of-type::first-letter &.post .content > p:first-of-type::first-letter
@ -164,13 +164,13 @@ article
.belowsingle .belowsingle
background-color: $belowsingle background-color: $belowsingle
border-top: 3px solid $accent border-top: 3px solid $accent
margin-top: 4rem padding-bottom: 2rem
.page-header .page-header
border-bottom: 1px solid $lightgrey border-bottom: 1px solid darken($lightgrey, 20%)
article hr, main.intro hr article hr
margin-top: 60px margin-top: 60px
margin-bottom: 60px margin-bottom: 60px
@ -202,19 +202,18 @@ h1, h2, h3
color: $grey color: $grey
main main
min-height: calc(100vh - 112px) min-height: calc(100vh - 200px)
padding-top: 3rem
padding-bottom: 2rem
footer footer
padding-top: 2rem padding-top: 2rem
padding-bottom: 2rem padding-bottom: 2rem
time
color: grey
kbd kbd
color: $accent color: $accent
border: 1px solid $accent border: 1px solid $accent
font-size: 1em font-size: 0.9em
padding: 2px 4px padding: 2px 4px
border-radius: 3px border-radius: 3px
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.25) -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.25)
@ -260,16 +259,13 @@ kbd
background: rgba(0,0,0,0.65) !important background: rgba(0,0,0,0.65) !important
.page-header
margin-top: 60px
.nowrap .nowrap
white-space: nowrap white-space: nowrap
table table
width: 100% width: 100%
padding-top: 1rem margin-top: 1rem
padding-bottom: 1rem margin-bottom: 1rem
border-collapse: collapse border-collapse: collapse
tbody tbody

View File

@ -1,48 +0,0 @@
div.list
text-align: left
padding-left: 2rem
padding-bottom: 2rem
h2
border-top: 1px solid #eee
padding-top: 1rem
h3
color: #999
@media (min-width: 768px)
float: left
margin-top: 1.5rem
.list-ul
list-style: none
margin: 0
padding: 0
padding-bottom: 1rem
@media (min-width: 768px)
padding-left: 4rem
li
padding: 0.8rem
.list-date
font-weight: normal
padding-left: 0.4rem
padding-right: 0.4rem
color: white
background-color: $accent
border-radius: 2rem
margin-top: 1.5rem
float: left
div
margin-left: 60px
.pages
padding: 15px 0
.pages-icon
padding: 0 15px
.pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span, .pagination>.active>span:focus, .pagination>.active>span:hover
border-color: $accent !important

View File

@ -19,7 +19,6 @@ $accent: #018661
@import 'figures' @import 'figures'
@import 'icons' @import 'icons'
@import 'blockquote' @import 'blockquote'
@import 'listing'
@import 'goodreads' @import 'goodreads'
@import 'forms' @import 'forms'
@import 'toot' @import 'toot'

View File

@ -1,50 +1,38 @@
{{ partial "header" . }} {{ partial "header" . }}
{{ partial "bigimg" . }}
<a id="top"></a> <a id="top"></a>
<main class="list"> <main class="list h-entry">
<header>
{{ if .Title }} <h1 class="p-name" id="header">
<header> <svg class='icon'><use xlink:href="#{{ .Params.icontag }}"></use></svg>&nbsp;{{ .Title }}
<h1> </h1>
<svg class='icon'><use xlink:href="#{{ .Params.icontag }}"></use></svg>&nbsp;{{ .Title }} </header>
</h1>
{{ if isset .Params "subtitle" }}
<h2>{{ .Params.subtitle }}</h2>
{{ end }}
</header>
{{ end }}
<hr/>
<article> <article>
{{ .Content }} {{ .Content }}
</article> </article>
<article> <article>
<small> <small>
{{ range .Pages.GroupByDate "2006" "desc" }} {{ range .Pages.GroupByDate "2006" "desc" }}
{{ if ne .Key "0001" }} {{ if ne .Key "0001" }}
<h2>{{ .Key }}</h2> <h2>{{ .Key }}</h2>
{{ range .Pages.GroupByDate "Jan" }} {{ range .Pages.GroupByDate "Jan" }}
<ul class="smallist"> <ul class="small">
{{ range .Pages.ByDate.Reverse }} {{ range .Pages.ByDate.Reverse }}
<li> <li class="flexgrid flexgrid-8020">
<a href="{{ .RelPermalink }}">{{ .Title }}</a> <span><a href="{{ .RelPermalink }}">{{ .Title }}</a></span>
<span style="color: gray;">{{ .Date.Format ("02 Jan") }}</span> <small>
</li> <time datetime='{{ .Date.Format "2006-01-02" }}'>{{ .Date.Format ("02 Jan 2006") }}</time>
{{ end }} </small>
</ul> </li>
{{ end }}
</ul>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
</small> </small>
</article> </article>
<footer>
</footer>
</main> </main>
{{ partial "footer" . }} {{ partial "footer" . }}

View File

@ -1,30 +1,36 @@
{{ partial "header" . }} {{ partial "header" . }}
<main class="h-entry"> <main class="h-entry" data-pagefind-body>
{{ partial "bigimg" . }}
<article class="single {{ .Section }}" data-pagefind-body>
{{ partial "single-header" . }} {{ partial "single-header" . }}
<article class="single {{ .Section }}">
<div class="e-content content"> <div class="e-content content">
{{ .Content | safeHTML }} {{ .Content | safeHTML }}
{{ if isset $.Params "tags" }}
<p>
<svg class='icon icon-text' width='24' height='24'>
<title>tags icon</title>
<use xlink:href='#tag'></use>
</svg>
<span class='list-tags'>
{{ range .Params.tags }}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}" title="Tag: {{ . }}"><kbd class="item-tag p-category">{{ . }}</kbd></a>
{{ end }}
</span>
</p>
{{ end }}
</div> </div>
</article> </article>
</main>
{{ if (not .Params.disableComments) }} {{ if (not .Params.disableComments) }}
<div class="belowsingle"> <div class="belowsingle">
<div class="txtblock"> <div class="txtblock">
{{ partial "single-comments" . }}
{{ partial "single-webmentions" . }}
{{ partial "single-related" . }} {{ partial "single-related" . }}
{{ partial "single-webmentions" . }}
<footer> {{ partial "single-comments" . }}
</footer>
</div> </div>
</div> </div>
{{ else }}
<footer>
</footer>
{{ end }} {{ end }}
</main> </main>

View File

@ -1,24 +1,32 @@
{{ partial "header" . }} {{ partial "header" . }}
<main class="list"> <main class="list">
<header>
<h1 class="p-name" id="header">
<svg class='icon'><use xlink:href='#tag'></use></svg>{{ .Section | humanize }} <em>"{{ .Title }}"</em>
</h1>
</header>
<h2> <article>
<svg class='icon'><use xlink:href='#tag'></use></svg>Tagged with: <br/>"{{ .Title }}" {{ range .Pages.GroupByDate "2006" "desc" }}
</h2> {{ if ne .Key "0001" }}
<div class="list">
{{ range .Paginator.Pages.GroupByDate "2006" "desc" }}
<h2>{{ .Key }}</h2> <h2>{{ .Key }}</h2>
{{ range .Pages.GroupByDate "Jan" }} {{ range .Pages.GroupByDate "Jan" }}
<h3>{{ .Key }}</h3> <ul class="small">
{{ partial "list-ul" . }} {{ range .Pages.ByDate.Reverse }}
{{ end }} <li class="flexgrid flexgrid-8020">
{{ end }} <span><a href="{{ .RelPermalink }}">{{ .Title }}</a></span>
</div> <small>
<time datetime='{{ .Date.Format "2006-01-02" }}'>{{ .Date.Format ("02 Jan 2006") }}</time>
{{ template "_internal/pagination.html" . }} </small>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}
{{ end }}
</article>
</main> </main>
{{ partial "footer" . }} {{ partial "footer" . }}

View File

@ -1,8 +1,6 @@
{{ $.Scratch.Set "curLetter" "" }} {{ $.Scratch.Set "curLetter" "" }}
{{ $offset := 1 }} {{ $offset := 1 }}
{{ partial "header" . }} {{ partial "header" . }}
{{ partial "bigimg" . }}
<a id="top"></a> <a id="top"></a>
<main class="list"> <main class="list">
@ -12,8 +10,6 @@
</h1> </h1>
</header> </header>
<hr/>
{{ with .Content }} {{ with .Content }}
<article> <article>
{{ . }} {{ . }}

View File

@ -1,6 +1,4 @@
{{ partial "header" . }} {{ partial "header" . }}
{{ partial "bigimg" . }}
<a id="top"></a> <a id="top"></a>
<main class="list"> <main class="list">

View File

@ -1,7 +1,4 @@
{{ partial "header" . }} {{ partial "header" . }}
{{ partial "bigimg" . }}
<main class="h-entry"> <main class="h-entry">
<article class="single {{ .Section }}"> <article class="single {{ .Section }}">
<a id="top"></a> <a id="top"></a>

View File

@ -1,18 +0,0 @@
{{ if .Params.bigimg }}
{{- $image := resources.Get (printf "%s%s" "bigimg/" .Params.bigimg ) -}}
{{ if eq $image nil }}
<div style="padding-top: 3rem">
</div>
{{ else }}
<!-- jumbotron big-img see head-meta.html -->
<div class="jumbotron big-img">
<div class="container">
&nbsp;
</div>
</div>
{{ end }}
{{ else }}
<div style="padding-top: 3rem">
</div>
{{ end }}

View File

@ -38,41 +38,13 @@
<meta property="og:type" content="{{ if .Params.type }}{{ .Params.type }}{{ else }}website{{ end }}" /> <meta property="og:type" content="{{ if .Params.type }}{{ .Params.type }}{{ else }}website{{ end }}" />
{{ $thumb := $logo | absURL }} {{ $thumb := $logo | absURL }}
{{ if .Params.bigimg }} {{ $match := findRE `!\[(.*)\]\((.+).(jpg|png|gif)` .RawContent 1 }}
{{- $image := resources.Get (printf "%s%s" "bigimg/" .Params.bigimg ) -}} {{ range $match }}
{{ if eq $image nil }} {{ $relthumb := replaceRE `!\[(.*)\]\(` "" . }}
{{ if hasPrefix $relthumb "/" }}
{{ $thumb = printf "%s%s" $base $relthumb }}
{{ else }} {{ else }}
{{- $imgsmall := $image.Resize "768x jpg q70" }} {{ $thumb = printf "%s%s" $perm $relthumb }}
{{ $thumb = $imgsmall.Permalink }}
{{- $imgmedium := $image.Resize "960x jpg q85" }}
<meta property="og:image:width" content="{{ $imgsmall.Width }}" />
<meta property="og:image:height" content="{{ $imgsmall.Height }}" />
<style>
.big-img {
background-image: url({{ $imgsmall.RelPermalink }}) !important;
}
@media (min-width: 768px) {
.big-img {
background-image: url({{ $imgmedium.RelPermalink }}) !important;
}
}
@media (min-width: 960px) {
.big-img {
background-image: url({{ $image.RelPermalink }}) !important;
}
}
</style>
{{ end }}
{{ else }}
{{ $match := findRE `!\[(.*)\]\((.+).(jpg|png|gif)` .RawContent 1 }}
{{ range $match }}
{{ $relthumb := replaceRE `!\[(.*)\]\(` "" . }}
{{ if hasPrefix $relthumb "/" }}
{{ $thumb = printf "%s%s" $base $relthumb }}
{{ else }}
{{ $thumb = printf "%s%s" $perm $relthumb }}
{{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
<meta name="twitter:image" property="og:image" content="{{ $thumb }}" /> <meta name="twitter:image" property="og:image" content="{{ $thumb }}" />

View File

@ -1,34 +0,0 @@
<article>
<ul class="list-ul">
{{ range .Pages.ByDate.Reverse }}
<li>
<span class="list-date">{{ .Date.Format ("02") }}</span>
<div class="list-title">
<h4>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h4>
{{ if isset .Params "subtitle" }}
{{ .Params.subtitle }}
{{ else }}
{{ .Summary | truncate 50 }}
{{ end }}
</div>
<div class="list-tags">
{{ if isset .Params "categories" }}
<svg class='icon icon-text icon-gray'><use xlink:href="#folder"></use></svg>
{{ range .Params.categories }}
<a href="{{ site.BaseURL }}categories/{{ . | urlize }}">{{ . }}</a>
{{ end }}
&nbsp;
{{ end }}
{{ if isset .Params "tags" }}
<svg class='icon icon-text icon-gray'><use xlink:href="#tag"></use></svg>&nbsp;
{{ range .Params.tags }}
<a href="{{ site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag">{{ . }}</kbd></a>
{{ end }}
{{ end }}
</div>
</li>
{{ end }}
</ul>
</article>

View File

@ -1,13 +1,15 @@
<article class="p-author h-card"> <h3 class="page-header" id="bio">
<h4 class="page-header"> <a href="#bio">
<svg class='icon icon-text' width='24' height='24'> <svg class='icon icon-text' width='24' height='24'>
<title>About icon</title> <title>About icon</title>
<use xlink:href='#about'></use> <use xlink:href='#about'></use>
</svg> </svg>
Bio and Support </a>
</h4> Bio and Support
</h3>
<article class="p-author h-card">
<div class="avatar"> <div class="avatar">
<a href="{{ .Site.BaseURL }}" rel="me" class="u-url"> <a href="{{ .Site.BaseURL }}" rel="me" class="u-url">
<img class="u-photo" loading="lazy" src="{{ .Site.BaseURL }}img/avatar.jpg" alt="A photo of Me!" /> <img class="u-photo" loading="lazy" src="{{ .Site.BaseURL }}img/avatar.jpg" alt="A photo of Me!" />

View File

@ -1,9 +1,8 @@
<header> <header>
{{ if .Title }} {{ if .Title }}
{{ if (not .Params.disableComments) }} {{ if (not .Params.disableComments) }}
<a href="/"> <a href="/">
<svg class="logo" style="position: absolute; left: 2rem;"><title>Brain Baking home</title><use xlink:href='#logo'></use></svg> <svg class="logo"><title>Brain Baking home</title><use xlink:href='#logo'></use></svg>
</a> </a>
{{ end }} {{ end }}
<h1 class="p-name" id="header"> <h1 class="p-name" id="header">
@ -13,55 +12,37 @@
{{ .Title }} {{ .Title }}
</h1> </h1>
{{ end }} {{ end }}
{{ if isset .Params "subtitle" }}
<h2 class="p-summary">{{ .Params.subtitle }}</h2>
{{ end }}
{{ if isset .Params "date" }} {{ if isset .Params "date" }}
<h3> {{ if isset .Params "date" }}
{{ if isset .Params "date" }} <svg class='icon icon-text' width='24' height='24'>
<svg class='icon icon-text' width='24' height='24'> <title>published icon</title>
<title>published icon</title> <use xlink:href='#cal1'></use>
<use xlink:href='#cal1'></use>
</svg>
<time datetime='{{ .Date.Format "2006-01-02" }}' class="dt-published">
<a class="u-url u-uid" href="{{ .RelPermalink }}">
{{ .Date.Format (.Site.Params.dateFormat | default "2 January 2006") }}
</a>
</time>
{{ end }}
{{ if isset .Params "categories" }}
&nbsp;|&nbsp;
<span title="Categories">
<svg class='icon icon-text' width='24' height='24'>
<title>category icon</title>
<use xlink:href='#folder'></use>
</svg>
{{ range .Params.categories }}
<a class="p-category" href="/categories/{{ . }}">{{ . }}</a>
{{ end }}
</span>
{{ end }}
{{ if (and (isset .Params "context") (not (eq .Params.context ""))) }}
&nbsp;|&nbsp;
<svg class='icon icon-text' width='24' height='24'>
<use xlink:href='#discuss'></use>
</svg>
<a href="{{ .Params.context }}" class="u-in-reply-to">In reply to</a>{{ with .Params.rsvp }}&nbsp;(RSVP: <span class="p-rsvp">{{ . }}</span>){{ end }}<br/>
{{ end }}
</h3>
{{ end }}
{{ if isset $.Params "tags" }}
<svg class='icon icon-text' width='24' height='24'>
<title>tags icon</title>
<use xlink:href='#tag'></use>
</svg> </svg>
{{ end }} <time datetime='{{ .Date.Format "2006-01-02" }}' class="dt-published">
<span class='list-tags'> <a class="u-url u-uid" href="{{ .RelPermalink }}">
{{ range .Params.tags }} {{ .Date.Format (.Site.Params.dateFormat | default "2 January 2006") }}
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag p-category">{{ . }}</kbd></a> </a>
</time>
{{ end }} {{ end }}
</span> {{ if isset .Params "categories" }}
&nbsp;|&nbsp;
<span title="Categories">
<svg class='icon icon-text' width='24' height='24'>
<title>category icon</title>
<use xlink:href='#folder'></use>
</svg>
{{ range .Params.categories }}
<a class="p-category" href="/categories/{{ . }}">{{ . }}</a>
{{ end }}
</span>
{{ end }}
{{ if (and (isset .Params "context") (not (eq .Params.context ""))) }}
&nbsp;|&nbsp;
<svg class='icon icon-text' width='24' height='24'>
<use xlink:href='#discuss'></use>
</svg>
<a href="{{ .Params.context }}" class="u-in-reply-to">In reply to</a>{{ with .Params.rsvp }}&nbsp;(RSVP: <span class="p-rsvp">{{ . }}</span>){{ end }}<br/>
{{ end }}
{{ end }}
</header> </header>

View File

@ -1,32 +1,53 @@
{{ $related := first 3 (where (where .Site.RegularPages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} {{ $currtitle := .Title }}
{{ $currRellink := substr .RelPermalink 0 -1 }}
{{ $currContent := .Content }}
{{ $backlinks := slice }}
{{ $forwardlinks := slice }}
{{ range (where (where .Site.Pages.ByDate.Reverse ".Section" "in" (slice "post")) ".Params.disableComments" "!=" "true") }}
{{ $found := findRE $currRellink .Content 1 }}
{{ if and ($found) (ne .Title $currtitle) }}
{{ $backlinks = $backlinks | append . }}
{{ else }}
{{ $rellink := substr .RelPermalink 0 -1 }}
{{ $found = findRE $rellink $currContent 1 }}
{{ if and ($found) (ne .Title $currtitle) }}
{{ $forwardlinks = $forwardlinks | append . }}
{{ end }}
{{ end }}
{{ end }}
{{ $tagslice := first 5 (where (where .Site.RegularPages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
{{ $related := append $tagslice $forwardlinks }}
{{ $related = append $related $backlinks }}
{{ if $related }} {{ if $related }}
<h4 class="page-header" id="related"> <h3 class="page-header" id="related">
<a href="#related"> <a href="#related">
<svg class='icon icon-text' width='24' height='24'> <svg class='icon icon-text' width='24' height='24'>
<title>Related articles</title> <title>Related articles</title>
<use xlink:href='#news'></use> <use xlink:href='#news'></use>
</svg> </svg>
</a> </a>
Related Articles You Might Also Like...
</h4> </h3>
{{ range $related }} <article>
<article> <ul class="small">
<h4><a href="{{ .RelPermalink }}">{{ .Title }}</a></h4> {{ range first 7 $related | uniq }}
<time datetime='{{ .Date.Format "2006-01-02" }}'> <li class="flexgrid flexgrid-8020" style="padding-bottom: 0.5rem">
<svg class='icon icon-text' width='24' height='24'> <span>
<use xlink:href='#cal1'></use> <a href="{{ .RelPermalink }}">{{ .Title }}</a>
</svg> </span>
{{ .Date.Format (.Site.Params.dateFormat | default "02 Jan 2006") }} <small>
</time>&nbsp;|&nbsp; <time datetime='{{ .Date.Format "2006-01-02" }}'>
{{ if isset .Params "subtitle" }} {{ .Date.Format (.Site.Params.dateFormat | default "02 Jan 2006") }}
{{ .Params.subtitle }} </time>
{{ else }} </small>
{{ .Summary | truncate 50 }} </li>
{{ end }} {{ end }}
</article> </ul>
{{ end }} </article>
<hr/>
{{ end }} {{ end }}

View File

@ -2,7 +2,7 @@
{{ $wmServer := .Site.Params.webmentionServer }} {{ $wmServer := .Site.Params.webmentionServer }}
{{ if $mentions }} {{ if $mentions }}
<h4 class="page-header" id="mentions"> <h3 class="page-header" id="mentions">
<a href="#mentions"> <a href="#mentions">
<svg class='icon icon-text' width='24' height='24'> <svg class='icon icon-text' width='24' height='24'>
<title>Discussion</title> <title>Discussion</title>
@ -10,7 +10,7 @@
</svg> </svg>
</a> </a>
Mentions and Replies Mentions and Replies
</h4> </h3>
<div class="tootlist" style="margin-bottom: -3rem"> <div class="tootlist" style="margin-bottom: -3rem">
{{ range $mentions }} {{ range $mentions }}

View File

@ -1,6 +1,4 @@
{{ partial "header" . }} {{ partial "header" . }}
{{ partial "bigimg" . }}
<a id="top"></a> <a id="top"></a>
<main class="list"> <main class="list">
@ -10,7 +8,6 @@
</h1> </h1>
</header> </header>
<hr/>
{{ with .Content }} {{ with .Content }}
<article> <article>
{{ . }} {{ . }}
@ -19,24 +16,23 @@
<article> <article>
<h2>Prose in Words</h2> <h2>Prose in Words</h2>
<div class="worksgrid">
{{ range (where .Pages "Params.type" "writing") }}
{{ partial "works-block.html" . }}
{{ end }}
</div>
</article> </article>
<div class="worksgrid">
{{ range (where .Pages "Params.type" "writing") }}
{{ partial "works-block.html" . }}
{{ end }}
</div>
<article> <article>
<h2>Prose in Code</h2> <h2>Prose in Code</h2>
For those interested in smaller but technical buns of baked goodness, have fun exploring my open source projects at <a href="https://git.brainbaking.com/">https://git.brainbaking.com/</a> or my contributions at <a href="{{ .Site.Author.githublink }}">GitHub</a>. For those interested in smaller but technical buns of baked goodness, have fun exploring my open source projects at <a href="https://git.brainbaking.com/">https://git.brainbaking.com/</a> or my contributions at <a href="{{ .Site.Author.githublink }}">GitHub</a>.
<div class="worksgrid">
{{ range (where .Pages "Params.type" "code") }}
{{ partial "works-block.html" . }}
{{ end }}
</div>
</article> </article>
<div class="worksgrid">
{{ range (where .Pages "Params.type" "code") }}
{{ partial "works-block.html" . }}
{{ end }}
</div>
<footer>
</footer>
</main> </main>
{{ partial "footer" . }} {{ partial "footer" . }}