diff --git a/config.toml b/config.toml index 5d4dfc87..24419886 100644 --- a/config.toml +++ b/config.toml @@ -19,7 +19,7 @@ enableGitInfo = true pagination = 30 description = "Freshly Baked Thoughts" webmentionServer = "https://jam.brainbaking.com" - copyright = "↑ Top lightbulb icon Brain Baking. No © and no tracking." + copyright = "↑ Top lightbulb icon Brain Baking | Archives | No © no tracking." [Author] name = "Wouter Groeneveld" diff --git a/content/about.md b/content/about.md index df17440b..fb9636c6 100644 --- a/content/about.md +++ b/content/about.md @@ -5,26 +5,26 @@ bigimg: About Me.jpg 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). -### ... 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). -### ... 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/. I’m a big Test Driven Development advocate. I teach software engineering techniques in both industry and academia. -### ... Writer +## ... Writer I like fountain pens and [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. @@ -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. ---- - -## Where good ideas come from: books - -I keep an active Goodreads 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: - - -
-
- - - -
-

 

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

Freshly Baked Thoughts

Archives »
-
    +
      {{ range first $itms (where .Site.Pages "Section" "post").ByDate.Reverse }} -
    • +
    • {{ .Title }}

      - {{ .Date.Format ("02 Jan 2006") }} +
    • {{ end }}
-
+

Popular Bakings This Month

Statistics »
-
    +
      {{ range first $itms (.Site.Data.popularposts) }} -
    • +
    • {{ .title }}

      @@ -48,18 +50,20 @@
-
+

Random Tasty Treats

All posts »
-
    - {{ range first $itms (shuffle (where .Site.Pages "Section" "post")) }} -
  • +
      + {{ range first $itms (shuffle (where (where .Site.Pages ".Params.disableComments" "!=" "true") "Section" "post")) }} +
    • {{ .Title }}

      - {{ .Date.Format ("02 Jan 2006") }} +
    • {{ end }} @@ -69,7 +73,7 @@
      - +
      A photo of Me! @@ -80,7 +84,6 @@

      If you found my bakings amusing and/or helpful, you can buy me a coffee—if you don't mind I'll use it to enjoy a cup of tea instead. I also like to hear about your own bakings via chat iconMastodon or mail icone-mail. Thanks!

      -
       
      diff --git a/layouts/shortcodes/archive.html b/layouts/shortcodes/archive.html index 56b4c5f2..01a86ffa 100644 --- a/layouts/shortcodes/archive.html +++ b/layouts/shortcodes/archive.html @@ -2,13 +2,21 @@ Not finding what you're looking for? Browse the archives. -
      -

      {{ $year }}

      +

      {{ $year }}

      - {{ range (where (where $.Site.Pages "Section" "post") "Date.Year" "eq" $year).GroupByDate "Jan" }} -

      {{ .Key }}

      +{{ range (where (where $.Site.Pages "Section" "post") "Date.Year" "eq" $year).GroupByDate "January" }} +

      {{ .Key }}

      - {{ partial "list-ul" . }} + {{ range .Pages.GroupByDate "Jan" }} +
        + {{ range .Pages.ByDate.Reverse }} +
      • + {{ .Title }} + + + +
      • + {{ end }} +
      {{ end }} - -
      +{{ end }} diff --git a/themes/brainbaking-minimal/assets/sass/_blockquote.sass b/themes/brainbaking-minimal/assets/sass/_blockquote.sass index 0e25caf6..90700e6b 100644 --- a/themes/brainbaking-minimal/assets/sass/_blockquote.sass +++ b/themes/brainbaking-minimal/assets/sass/_blockquote.sass @@ -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 font-family: $font-alt-stack @@ -39,7 +25,6 @@ blockquote margin-top: -10px p - padding-left: 0.5rem 0 !important letter-spacing: 0rem width: 100% diff --git a/themes/brainbaking-minimal/assets/sass/_bootstrap-minimal.sass b/themes/brainbaking-minimal/assets/sass/_bootstrap-minimal.sass index c897cc08..69fd638f 100644 --- a/themes/brainbaking-minimal/assets/sass/_bootstrap-minimal.sass +++ b/themes/brainbaking-minimal/assets/sass/_bootstrap-minimal.sass @@ -2,8 +2,13 @@ h1 font-size: 2.4rem @media (min-width: 768px) font-size: 3rem + margin-top: 0.5em + margin-bottom: 0.2em + h2 - font-size: 2.0rem + font-size: 1.9rem + margin-top: 1em + margin-bottom: 1em h3 font-size: 1.4rem h4 @@ -11,13 +16,11 @@ h4 h1, h2 font-weight: 700 - margin-top: 20px - margin-bottom: 10px h3, h4, h5, h6 font-weight: normal - margin-top: 10px - margin-bottom: 10px + margin-top: 1em + margin-bottom: 1em h1, h2, h3, h4, h5, h6 line-height: 1.8 diff --git a/themes/brainbaking-minimal/assets/sass/_brainbaking-intro.sass b/themes/brainbaking-minimal/assets/sass/_brainbaking-intro.sass index 03883618..dd2fca6c 100644 --- a/themes/brainbaking-minimal/assets/sass/_brainbaking-intro.sass +++ b/themes/brainbaking-minimal/assets/sass/_brainbaking-intro.sass @@ -1,11 +1,11 @@ -.intro - +.intro + padding-top: 0 article padding-top: 0.8em h1 margin: 0 - padding-bottom: 0.8em + padding-bottom: 1.2em text-shadow: #bbbbbb 0 4px 5px font-size: 5vh @@ -38,10 +38,19 @@ height: 30vh top: 6rem + header - svg.logo - visibility: hidden + @media (min-width: 960px) + width: calc(100vw - 100px) - @media (min-width: 1400px) - visibility: visible + @media (min-width: 1120px) + width: calc(100vw - 420px) + + svg.logo + visibility: hidden + position: absolute + left: 0 + + @media (min-width: 1400px) + visibility: visible diff --git a/themes/brainbaking-minimal/assets/sass/_brainbaking.sass b/themes/brainbaking-minimal/assets/sass/_brainbaking.sass index f7471d1c..6b454770 100644 --- a/themes/brainbaking-minimal/assets/sass/_brainbaking.sass +++ b/themes/brainbaking-minimal/assets/sass/_brainbaking.sass @@ -59,29 +59,29 @@ nav, footer ul list-style: circle -.flexlist +.flexgrid display: flex flex-direction: column justify-content: space-between align-items: baseline - small - opacity: 0.7 + &-8020 + *:nth-child(2) + opacity: 0.7 + @media (min-width: 600px) + flex-direction: row - @media (min-width: 600px) - flex-direction: row + *:nth-child(1) + flex: 3 1 15rem + margin: 0.1em + *:nth-child(2) + flex: 1 2 1rem + text-align: right - div, h2, h3 - flex: 3 1 15rem - small - flex: 1 2 1rem - text-align: right - -ul.smallist +ul.small padding: 0 list-style: none - div.highlight padding-top: 1.5rem padding-bottom: 1.5rem @@ -109,7 +109,7 @@ pre &.post .content > p:first-of-type::first-letter margin-top: 10px -article, main.list, main.notes, .txtblock +article, main.notes, .txtblock margin: auto flex: 1 0 auto display: block @@ -122,7 +122,7 @@ article, main.list, main.notes, .txtblock article padding-left: 1rem padding-right: 1rem - margin-bottom: 1rem + padding-bottom: 1rem text-align: left &.post .content > p:first-of-type::first-letter @@ -164,13 +164,13 @@ article .belowsingle background-color: $belowsingle border-top: 3px solid $accent - margin-top: 4rem + padding-bottom: 2rem .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-bottom: 60px @@ -202,19 +202,18 @@ h1, h2, h3 color: $grey main - min-height: calc(100vh - 112px) + min-height: calc(100vh - 200px) + padding-top: 3rem + padding-bottom: 2rem footer padding-top: 2rem padding-bottom: 2rem -time - color: grey - kbd color: $accent border: 1px solid $accent - font-size: 1em + font-size: 0.9em padding: 2px 4px border-radius: 3px -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 -.page-header - margin-top: 60px - .nowrap white-space: nowrap table width: 100% - padding-top: 1rem - padding-bottom: 1rem + margin-top: 1rem + margin-bottom: 1rem border-collapse: collapse tbody diff --git a/themes/brainbaking-minimal/assets/sass/_listing.sass b/themes/brainbaking-minimal/assets/sass/_listing.sass deleted file mode 100644 index ddcb0942..00000000 --- a/themes/brainbaking-minimal/assets/sass/_listing.sass +++ /dev/null @@ -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 diff --git a/themes/brainbaking-minimal/assets/sass/main.sass b/themes/brainbaking-minimal/assets/sass/main.sass index e74f8c1b..8d87b68f 100644 --- a/themes/brainbaking-minimal/assets/sass/main.sass +++ b/themes/brainbaking-minimal/assets/sass/main.sass @@ -19,7 +19,6 @@ $accent: #018661 @import 'figures' @import 'icons' @import 'blockquote' -@import 'listing' @import 'goodreads' @import 'forms' @import 'toot' diff --git a/themes/brainbaking-minimal/layouts/_default/list.html b/themes/brainbaking-minimal/layouts/_default/list.html index 8b24802b..41fefe61 100644 --- a/themes/brainbaking-minimal/layouts/_default/list.html +++ b/themes/brainbaking-minimal/layouts/_default/list.html @@ -1,50 +1,38 @@ {{ partial "header" . }} -{{ partial "bigimg" . }} -
      - - {{ if .Title }} -
      -

      -  {{ .Title }} -

      - - {{ if isset .Params "subtitle" }} -

      {{ .Params.subtitle }}

      - {{ end }} -
      - {{ end }} - - -
      +
      +
      +

      +  {{ .Title }} +

      +
      {{ .Content }}
      - + {{ range .Pages.GroupByDate "2006" "desc" }} {{ if ne .Key "0001" }} -

      {{ .Key }}

      +

      {{ .Key }}

      {{ range .Pages.GroupByDate "Jan" }} -
        - {{ range .Pages.ByDate.Reverse }} -
      • - {{ .Title }} - {{ .Date.Format ("02 Jan") }} -
      • - {{ end }} -
      +
        + {{ range .Pages.ByDate.Reverse }} +
      • + {{ .Title }} + + + +
      • + {{ end }} +
      {{ end }} {{ end }} {{ end }} -
      +
      - -
      -
      {{ partial "footer" . }} diff --git a/themes/brainbaking-minimal/layouts/_default/single.html b/themes/brainbaking-minimal/layouts/_default/single.html index 908cd803..0e7fed7e 100644 --- a/themes/brainbaking-minimal/layouts/_default/single.html +++ b/themes/brainbaking-minimal/layouts/_default/single.html @@ -1,30 +1,36 @@ {{ partial "header" . }} -
      - {{ partial "bigimg" . }} - -
      +
      {{ partial "single-header" . }} +
      {{ .Content | safeHTML }} + + {{ if isset $.Params "tags" }} +

      + + tags icon + + + + {{ range .Params.tags }} + {{ . }} + {{ end }} + +

      + {{ end }}
      +
      {{ if (not .Params.disableComments) }}
      - {{ partial "single-comments" . }} - {{ partial "single-webmentions" . }} - {{ partial "single-related" . }} - -
      -
      + {{ partial "single-webmentions" . }} + {{ partial "single-comments" . }}
      - {{ else }} -
      -
      {{ end }}
      diff --git a/themes/brainbaking-minimal/layouts/_default/taxonomy.html b/themes/brainbaking-minimal/layouts/_default/taxonomy.html index f195cb5a..b93ce1fe 100644 --- a/themes/brainbaking-minimal/layouts/_default/taxonomy.html +++ b/themes/brainbaking-minimal/layouts/_default/taxonomy.html @@ -1,24 +1,32 @@ {{ partial "header" . }}
      +
      +

      + {{ .Section | humanize }} "{{ .Title }}" +

      +
      -

      - Tagged with:
      "{{ .Title }}" -

      - -
      - {{ range .Paginator.Pages.GroupByDate "2006" "desc" }} +
      + {{ range .Pages.GroupByDate "2006" "desc" }} + {{ if ne .Key "0001" }}

      {{ .Key }}

      - {{ range .Pages.GroupByDate "Jan" }} -

      {{ .Key }}

      - {{ partial "list-ul" . }} - {{ end }} - {{ end }} -
      - -{{ template "_internal/pagination.html" . }} - + {{ range .Pages.GroupByDate "Jan" }} +
        + {{ range .Pages.ByDate.Reverse }} +
      • + {{ .Title }} + + + +
      • + {{ end }} +
      + {{ end }} + {{ end }} + {{ end }} +
{{ partial "footer" . }} diff --git a/themes/brainbaking-minimal/layouts/_default/terms.html b/themes/brainbaking-minimal/layouts/_default/terms.html index ba97c1f8..ba133f4a 100644 --- a/themes/brainbaking-minimal/layouts/_default/terms.html +++ b/themes/brainbaking-minimal/layouts/_default/terms.html @@ -1,8 +1,6 @@ {{ $.Scratch.Set "curLetter" "" }} {{ $offset := 1 }} {{ partial "header" . }} - -{{ partial "bigimg" . }}
@@ -12,8 +10,6 @@ -
- {{ with .Content }}
{{ . }} diff --git a/themes/brainbaking-minimal/layouts/notes/list.html b/themes/brainbaking-minimal/layouts/notes/list.html index 3543e746..8818392b 100644 --- a/themes/brainbaking-minimal/layouts/notes/list.html +++ b/themes/brainbaking-minimal/layouts/notes/list.html @@ -1,6 +1,4 @@ {{ partial "header" . }} - -{{ partial "bigimg" . }}
diff --git a/themes/brainbaking-minimal/layouts/notes/single.html b/themes/brainbaking-minimal/layouts/notes/single.html index 93321f82..1d8f345d 100644 --- a/themes/brainbaking-minimal/layouts/notes/single.html +++ b/themes/brainbaking-minimal/layouts/notes/single.html @@ -1,7 +1,4 @@ {{ partial "header" . }} - -{{ partial "bigimg" . }} -
diff --git a/themes/brainbaking-minimal/layouts/partials/bigimg.html b/themes/brainbaking-minimal/layouts/partials/bigimg.html deleted file mode 100644 index 4068ab97..00000000 --- a/themes/brainbaking-minimal/layouts/partials/bigimg.html +++ /dev/null @@ -1,18 +0,0 @@ -{{ if .Params.bigimg }} - {{- $image := resources.Get (printf "%s%s" "bigimg/" .Params.bigimg ) -}} - - {{ if eq $image nil }} -
-
- {{ else }} - -
-
-   -
-
- {{ end }} -{{ else }} -
-
-{{ end }} diff --git a/themes/brainbaking-minimal/layouts/partials/head-meta.html b/themes/brainbaking-minimal/layouts/partials/head-meta.html index 94eb6d24..662b6a73 100644 --- a/themes/brainbaking-minimal/layouts/partials/head-meta.html +++ b/themes/brainbaking-minimal/layouts/partials/head-meta.html @@ -38,41 +38,13 @@ {{ $thumb := $logo | absURL }} -{{ if .Params.bigimg }} - {{- $image := resources.Get (printf "%s%s" "bigimg/" .Params.bigimg ) -}} - {{ if eq $image nil }} +{{ $match := findRE `!\[(.*)\]\((.+).(jpg|png|gif)` .RawContent 1 }} +{{ range $match }} + {{ $relthumb := replaceRE `!\[(.*)\]\(` "" . }} + {{ if hasPrefix $relthumb "/" }} + {{ $thumb = printf "%s%s" $base $relthumb }} {{ else }} - {{- $imgsmall := $image.Resize "768x jpg q70" }} - {{ $thumb = $imgsmall.Permalink }} - {{- $imgmedium := $image.Resize "960x jpg q85" }} - - - - - {{ 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 }} + {{ $thumb = printf "%s%s" $perm $relthumb }} {{ end }} {{ end }} diff --git a/themes/brainbaking-minimal/layouts/partials/list-ul.html b/themes/brainbaking-minimal/layouts/partials/list-ul.html deleted file mode 100644 index 164ef39c..00000000 --- a/themes/brainbaking-minimal/layouts/partials/list-ul.html +++ /dev/null @@ -1,34 +0,0 @@ -
-
    - {{ range .Pages.ByDate.Reverse }} -
  • - {{ .Date.Format ("02") }} -
    -

    - {{ .Title }} -

    - {{ if isset .Params "subtitle" }} - {{ .Params.subtitle }} - {{ else }} - {{ .Summary | truncate 50 }} - {{ end }} -
    -
    - {{ if isset .Params "categories" }} - - {{ range .Params.categories }} - {{ . }} - {{ end }} -   - {{ end }} - {{ if isset .Params "tags" }} -   - {{ range .Params.tags }} - {{ . }} - {{ end }} - {{ end }} -
    -
  • - {{ end }} -
-
\ No newline at end of file diff --git a/themes/brainbaking-minimal/layouts/partials/single-comments.html b/themes/brainbaking-minimal/layouts/partials/single-comments.html index 3c545cac..7f2140ea 100644 --- a/themes/brainbaking-minimal/layouts/partials/single-comments.html +++ b/themes/brainbaking-minimal/layouts/partials/single-comments.html @@ -1,13 +1,15 @@ -
- + + Bio and Support + +
A photo of Me! diff --git a/themes/brainbaking-minimal/layouts/partials/single-header.html b/themes/brainbaking-minimal/layouts/partials/single-header.html index f67da3f0..e2dd3ffa 100644 --- a/themes/brainbaking-minimal/layouts/partials/single-header.html +++ b/themes/brainbaking-minimal/layouts/partials/single-header.html @@ -1,9 +1,8 @@
- {{ if .Title }} {{ if (not .Params.disableComments) }} - + {{ end }}

@@ -13,55 +12,37 @@ {{ .Title }}

{{ end }} - {{ if isset .Params "subtitle" }} -

{{ .Params.subtitle }}

- {{ end }} {{ if isset .Params "date" }} -

- {{ if isset .Params "date" }} - - published icon - - - - {{ end }} - {{ if isset .Params "categories" }} -  |  - - - category icon - - - {{ range .Params.categories }} - {{ . }} - {{ end }} - - {{ end }} - {{ if (and (isset .Params "context") (not (eq .Params.context ""))) }} -  |  - - - - In reply to{{ with .Params.rsvp }} (RSVP: {{ . }}){{ end }}
- {{ end }} -

- {{ end }} - - {{ if isset $.Params "tags" }} - - tags icon - + {{ if isset .Params "date" }} + + published icon + - {{ end }} - - {{ range .Params.tags }} - {{ . }} + {{ end }} - - + {{ if isset .Params "categories" }} +  |  + + + category icon + + + {{ range .Params.categories }} + {{ . }} + {{ end }} + + {{ end }} + {{ if (and (isset .Params "context") (not (eq .Params.context ""))) }} +  |  + + + + In reply to{{ with .Params.rsvp }} (RSVP: {{ . }}){{ end }}
+ {{ end }} + {{ end }}
diff --git a/themes/brainbaking-minimal/layouts/partials/single-related.html b/themes/brainbaking-minimal/layouts/partials/single-related.html index 39ecf7ab..fb91a0e5 100644 --- a/themes/brainbaking-minimal/layouts/partials/single-related.html +++ b/themes/brainbaking-minimal/layouts/partials/single-related.html @@ -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 }} - - {{ range $related }} -
-

{{ .Title }}

-  |  - {{ if isset .Params "subtitle" }} - {{ .Params.subtitle }} - {{ else }} - {{ .Summary | truncate 50 }} - {{ end }} -
- {{ end }} - -
+
+
    + {{ range first 7 $related | uniq }} +
  • + + {{ .Title }} + + + + +
  • + {{ end }} +
+
{{ end }} diff --git a/themes/brainbaking-minimal/layouts/partials/single-webmentions.html b/themes/brainbaking-minimal/layouts/partials/single-webmentions.html index d2ae1c8c..c1600fd0 100644 --- a/themes/brainbaking-minimal/layouts/partials/single-webmentions.html +++ b/themes/brainbaking-minimal/layouts/partials/single-webmentions.html @@ -2,7 +2,7 @@ {{ $wmServer := .Site.Params.webmentionServer }} {{ if $mentions }} - +
{{ range $mentions }} diff --git a/themes/brainbaking-minimal/layouts/works/list.html b/themes/brainbaking-minimal/layouts/works/list.html index 3a82005f..df116498 100644 --- a/themes/brainbaking-minimal/layouts/works/list.html +++ b/themes/brainbaking-minimal/layouts/works/list.html @@ -1,6 +1,4 @@ {{ partial "header" . }} - -{{ partial "bigimg" . }}
@@ -10,7 +8,6 @@ -
{{ with .Content }}
{{ . }} @@ -19,24 +16,23 @@

Prose in Words

+
+ {{ range (where .Pages "Params.type" "writing") }} + {{ partial "works-block.html" . }} + {{ end }} +
-
- {{ range (where .Pages "Params.type" "writing") }} - {{ partial "works-block.html" . }} - {{ end }} -
+

Prose in Code

For those interested in smaller but technical buns of baked goodness, have fun exploring my open source projects at https://git.brainbaking.com/ or my contributions at GitHub. +
+ {{ range (where .Pages "Params.type" "code") }} + {{ partial "works-block.html" . }} + {{ end }} +
-
- {{ range (where .Pages "Params.type" "code") }} - {{ partial "works-block.html" . }} - {{ end }} -
-
{{ partial "footer" . }} \ No newline at end of file