davideisinger.com

My personal website
Log | Files | Refs | README

commit bb65a3d80f6a9dca84c203d7fbd2b40c6f353e2e
parent 1ed0f8128eebd8760510c33e9f1d64133316ba57
Author: David Eisinger <[email protected]>
Date:   Tue, 24 Oct 2023 20:49:29 -0400

Misc. updates & reorganization

Diffstat:
Acontent/elsewhere/_index.md | 5+++++
Acontent/journal/_index.md | 3+++
Mthemes/v2/assets/css/style.scss | 9+++++++++
Mthemes/v2/layouts/_default/baseof.html | 5++++-
Mthemes/v2/layouts/_default/tag.html | 5++++-
Mthemes/v2/layouts/_default/tag.terms.html | 2+-
Mthemes/v2/layouts/elsewhere/list.html | 12+++++++++---
Mthemes/v2/layouts/elsewhere/single.html | 12++++++++++--
Mthemes/v2/layouts/index.html | 28+++++++++++++++++++++++++++-
Mthemes/v2/layouts/journal/list.html | 2+-
Mthemes/v2/layouts/journal/single.html | 5++++-
Mthemes/v2/layouts/notes/list.html | 2+-
Mthemes/v2/layouts/notes/single.html | 5++++-
Mthemes/v2/layouts/partials/head.html | 24+++++++++++-------------
14 files changed, 93 insertions(+), 26 deletions(-)

diff --git a/content/elsewhere/_index.md b/content/elsewhere/_index.md @@ -0,0 +1,5 @@ +--- +title: "Elsewhere" +--- + +Articles I've written in other places diff --git a/content/journal/_index.md b/content/journal/_index.md @@ -0,0 +1,3 @@ +--- +title: "Journal" +--- diff --git a/themes/v2/assets/css/style.scss b/themes/v2/assets/css/style.scss @@ -16,6 +16,10 @@ body { h1, h2, h3 { font-size: 1em; margin: 1em 0; + + span { + color: #aaa; + } } h3 { @@ -111,6 +115,11 @@ code { img { width: 100%; height: auto; + + &.inline { + width: auto; + vertical-align: middle; + } } .image-set { diff --git a/themes/v2/layouts/_default/baseof.html b/themes/v2/layouts/_default/baseof.html @@ -1,6 +1,9 @@ <!DOCTYPE html> <html> - {{- partial "head.html" . -}} + <head> + {{- partial "head.html" . -}} + {{- block "head" . }}{{- end }} + </head> <body> {{- partial "header.html" . -}} <div id="content"> diff --git a/themes/v2/layouts/_default/tag.html b/themes/v2/layouts/_default/tag.html @@ -2,7 +2,10 @@ <section> <hr> - <h3>#{{ .Title }}</h3> + <h2> + <a href="/tags">Tags</a> <span>&gt;</span> + #{{ .Title }} + </h2> <ul> {{ range .RegularPages }} diff --git a/themes/v2/layouts/_default/tag.terms.html b/themes/v2/layouts/_default/tag.terms.html @@ -2,7 +2,7 @@ <section> <hr> - <h3>{{ .Title }}</h3> + <h2>{{ .Title }}</h2> <ul> {{ range .Data.Terms.Alphabetical }} diff --git a/themes/v2/layouts/elsewhere/list.html b/themes/v2/layouts/elsewhere/list.html @@ -2,14 +2,20 @@ <section> <hr> - <h3>Elsewhere</h3> + <h2>Elsewhere</h2> + + {{ .Content }} <ul> {{ range (where .Site.RegularPages "Type" "in" "elsewhere") }} + {{ $url := urls.Parse .Params.canonical_url }} + {{ $host := strings.Replace $url.Hostname "www." "" }} + <li> <a href="{{ .Permalink }}">{{ .Title }}</a> - {{ .Date | time.Format "(2006-01-02)" }} - {{ if .Params.needs_review }}<b>NEEDS REVIEW</b>{{ end }} + <span class="nowrap"> + (<a href="{{ $url }}">{{ $host }}</a>, {{ .Date | time.Format "2006-01-02" }}) + </span> </li> {{ end }} </ul> diff --git a/themes/v2/layouts/elsewhere/single.html b/themes/v2/layouts/elsewhere/single.html @@ -1,13 +1,21 @@ +{{ define "head" }} + <link rel="canonical" href="{{ .Params.canonical_url }}"> +{{ end }} + {{ define "main" }} {{ $url := urls.Parse .Params.canonical_url }} + {{ $host := strings.Replace $url.Hostname "www." "" }} <hr> - <h2>{{ .Title }}</h2> + <h2> + <a href="/elsewhere">Elsewhere</a> <span>&gt;</span> + {{ .Title }} + </h2> <h3> Posted {{ .Date | time.Format "2006-01-02" }} - on <a href="{{ .Params.canonical_url }}">{{ $url.Hostname }}</a> + on <a href="{{ .Params.canonical_url }}">{{ $host }}</a> </h3> {{ .Content }} diff --git a/themes/v2/layouts/index.html b/themes/v2/layouts/index.html @@ -9,7 +9,7 @@ </h3> <ul> - {{ range (where .Site.RegularPages "Type" "in" "journal") }} + {{ range first 5 (where .Site.RegularPages "Type" "in" "journal") }} <li> <p> <a href="{{ .Permalink }}">{{ .Title }}</a> @@ -22,5 +22,31 @@ </ul> </section> + <section> + <hr> + + <h3> + <a href="/elsewhere">Elsewhere</a> + </h3> + + <ul> + {{ range where (where .Site.RegularPages "Type" "in" "elsewhere") "Params.featured" "=" true }} + {{ $url := urls.Parse .Params.canonical_url }} + {{ $host := strings.Replace $url.Hostname "www." "" }} + + <li> + <p> + <a href="{{ .Permalink }}">{{ .Title }}</a> + <span class="nowrap"> + (<a href="{{ $url }}">{{ $host }}</a>, {{ .Date | time.Format "2006-01-02" }}) + </span> + </p> + + {{ .Summary }} + </li> + {{ end }} + </ul> + </section> + {{- partial "pinboard.html" . -}} {{ end }} diff --git a/themes/v2/layouts/journal/list.html b/themes/v2/layouts/journal/list.html @@ -2,7 +2,7 @@ <section> <hr> - <h3>Journal</h3> + <h2>Journal</h2> <ul> {{ range (where .Site.RegularPages "Type" "in" "journal") }} diff --git a/themes/v2/layouts/journal/single.html b/themes/v2/layouts/journal/single.html @@ -1,7 +1,10 @@ {{ define "main" }} <hr> - <h2>{{ .Title }}</h2> + <h2> + <a href="/journal">Journal</a> <span>&gt;</span> + {{ .Title }} + </h2> <h3> Posted {{ .Date | time.Format "2006-01-02" }} diff --git a/themes/v2/layouts/notes/list.html b/themes/v2/layouts/notes/list.html @@ -2,7 +2,7 @@ <section> <hr> - <h3>Notes</h3> + <h2>Notes</h2> <ul> {{ range (where .Site.RegularPages.ByLastmod.Reverse "Type" "in" "notes") }} diff --git a/themes/v2/layouts/notes/single.html b/themes/v2/layouts/notes/single.html @@ -1,7 +1,10 @@ {{ define "main" }} <hr> - <h2>{{ .Title }}</h2> + <h2> + <a href="/elsewhere">Notes</a> <span>&gt;</span> + {{ .Title }} + </h2> {{ .Content }} diff --git a/themes/v2/layouts/partials/head.html b/themes/v2/layouts/partials/head.html @@ -1,13 +1,11 @@ -<head> - <meta charset="utf-8"> - <title> - {{- if .Page.IsHome -}} - {{ .Site.Title }} - {{- else -}} - {{ .Title }} – {{ .Site.Title }} - {{- end -}} - </title> - {{ $css := resources.Get "css/style.scss" | toCSS | minify | fingerprint }} - <link rel="stylesheet" href="{{ $css.RelPermalink }}"> - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> -</head> +<meta charset="utf-8"> +<title> + {{- if .Page.IsHome -}} + {{ .Site.Title }} + {{- else -}} + {{ .Title }} – {{ .Site.Title }} + {{- end -}} +</title> +{{ $css := resources.Get "css/style.scss" | toCSS | minify | fingerprint }} +<link rel="stylesheet" href="{{ $css.RelPermalink }}"> +<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">