1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 12:52:10 +00:00

re-org the About section, add breadcrumbs

Create an "about" section.

Add breadcrumbs to show relationships between pages with full page
titles.
This commit is contained in:
Rohan Kumar 2022-07-07 17:05:33 -07:00
parent 40585964fe
commit 70b8a5e9cb
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
15 changed files with 106 additions and 28 deletions

View file

@ -117,7 +117,7 @@ deploy-html:
.PHONY: deploy-gemini .PHONY: deploy-gemini
deploy-gemini: deploy-gemini:
rsync $(RSYNCFLAGS) --exclude '*.html' --exclude '*.xml' --exclude '*.xhtml' --exclude '*.gz' --exclude '*.br' --exclude-from .rsyncignore $(OUTPUT_DIR)/gemini/ $(OUTPUT_DIR)/about $(OUTPUT_DIR)/posts $(OUTPUT_DIR)/publickey.* $(GEMINI_RSYNC_DEST)/ --delete rsync $(RSYNCFLAGS) --exclude '*.html' --exclude '*.xml' --exclude '*.xhtml' --exclude '*.gz' --exclude '*.br' --exclude-from .rsyncignore $(OUTPUT_DIR)/gemini/ $(OUTPUT_DIR)/about $(OUTPUT_DIR)/posts $(OUTPUT_DIR)/about $(OUTPUT_DIR)/publickey.* $(GEMINI_RSYNC_DEST)/ --delete
.PHONY: deploy .PHONY: deploy
deploy: deploy-html deploy-gemini deploy: deploy-html deploy-gemini

View file

@ -110,8 +110,11 @@ html {
* paragraph are section permalinks. */ * paragraph are section permalinks. */
input, input,
div[itemprop="comment"] dd > a,
dt > a, dt > a,
summary, summary,
nav[itemprop="breadcrumb"] a,
nav[itemprop="breadcrumb"] > span,
aside > a, /* Used for section permalinks */ aside > a, /* Used for section permalinks */
li > a { li > a {
padding: .75em .25em; padding: .75em .25em;
@ -138,14 +141,11 @@ html {
padding-bottom: .25em; padding-bottom: .25em;
} }
header > nav {
margin-bottom: -1em;
}
aside > a { aside > a {
margin: -.75em -.25em; margin: -.75em -.25em;
} }
div[itemprop="comment"] dd > a ,
footer > nav, footer > nav,
header > nav, header > nav,
/* List items with direct hyperlink children should only have one hyperlink. */ /* List items with direct hyperlink children should only have one hyperlink. */
@ -161,17 +161,11 @@ html {
padding-top: 0; padding-top: 0;
} }
nav li, nav:not([itemprop="breadcrumb"]) li,
ol li > a { ol li > a {
margin: .25em; margin: .25em;
} }
div[itemprop="comment"] dd > a {
display: inline-block;
margin-left: -.25em;
padding: .75em .25em;
}
/* Increase backlink tap target size */ /* Increase backlink tap target size */
a[role="doc-backlink"] { a[role="doc-backlink"] {
padding: 0 1.75em 1.5em .25em; padding: 0 1.75em 1.5em .25em;
@ -195,10 +189,12 @@ ul {
padding-left: 1.5em; padding-left: 1.5em;
} }
blockquote,
ol ol, ol ol,
ul ul { ul ul {
-webkit-hyphens: auto; -webkit-hyphens: auto;
hyphens: auto; hyphens: auto;
margin: 0;
padding-left: 1em; padding-left: 1em;
} }
@ -211,6 +207,22 @@ nav ul {
padding: 0; padding: 0;
} }
/* Make breadcrumbs inline, so they look familiar. */
nav[itemprop="breadcrumb"] ol,
nav[itemprop="breadcrumb"] li,
nav[itemprop="breadcrumb"] > span {
display: inline-block;
}
nav[itemprop="breadcrumb"] ol {
margin: -.25em 0;
padding: 0;
}
nav[itemprop="breadcrumb"] li:not(:last-of-type)::after {
content: "→";
}
/* step 2: remove bullets and make elements inline. /* step 2: remove bullets and make elements inline.
* Also: bump up the line-height and margins to increase space * Also: bump up the line-height and margins to increase space
* between tap-targets (SC 2.5.5). Google a11y guidelines require 8 CSS * between tap-targets (SC 2.5.5). Google a11y guidelines require 8 CSS
@ -219,15 +231,10 @@ nav ul li {
display: inline-block; display: inline-block;
margin-right: .5em; margin-right: .5em;
} }
/* narrow screens: we reduce margin for blockquotes a lot, using
/* narrow screens: reduce margin for blockquotes a lot, using * a border instead. */
* a border instead. Put it on the left and right to make it
* LTR/RTL-neutral, for machine translators that change text
* direction (e.g. the one in Edge). */
blockquote { blockquote {
border-left: 3px solid; border-left: 3px solid;
margin: 0;
padding: 0 1em;
} }
/* Narrow screens: allow hyphenating titles /* Narrow screens: allow hyphenating titles

View file

@ -19,7 +19,8 @@
/* splitting up sections with <hr> is unnecesary if those /* splitting up sections with <hr> is unnecesary if those
* sections are removed */ * sections are removed */
body > hr, body > hr,
nav a:not([rel="home"]) span { nav a:not([rel="home"]) span,
nav[itemprop="breadcrumb"] {
display: none; display: none;
} }
} }

View file

@ -112,6 +112,7 @@ disableKinds = ["taxonomy", "term"]
section = ["HTML", "atom", "RSS"] section = ["HTML", "atom", "RSS"]
posts = ["HTML", "atom", "RSS"] posts = ["HTML", "atom", "RSS"]
notes = ["HTML", "atom", "RSS"] notes = ["HTML", "atom", "RSS"]
about = ["HTML", "atom", "RSS"]
# https://github.com/nekr0z/static-webmentions # https://github.com/nekr0z/static-webmentions
[webmentions] [webmentions]

View file

@ -58,7 +58,7 @@ My username is Seirdy on Reddit, Hacker News, Lobsters, Tildes.net, Linux Weekly
My secondary Matrix account for Synapse-only rooms is @seirdy:fairydust.space. My Matrix account used to be @seirdy:envs.net but I've since migrated to my own Conduit server. My secondary Matrix account for Synapse-only rooms is @seirdy:fairydust.space. My Matrix account used to be @seirdy:envs.net but I've since migrated to my own Conduit server.
If you want to follow me on Fedi, read this first: If you want to follow me on Fedi, read this first:
=> ../fediverse-greeting/ Fediverse greeting => ./fediverse-greeting/ Fediverse greeting
If you find a "Seirdy" somewhere else and don't know whether or not it's me, please contact me and ask instead of assuming that it must be me. If you find a "Seirdy" somewhere else and don't know whether or not it's me, please contact me and ask instead of assuming that it must be me.
@ -79,7 +79,7 @@ Analyze WeeChat logs to quantify, graph, forecast, and perform anomaly-detection
Generate passwords and analyze password strength given physical limits to computing. Based on a weblog/gemlog entry: Generate passwords and analyze password strength given physical limits to computing. Based on a weblog/gemlog entry:
=> ../posts//2021/01/12/password-strength/ Becoming physically immune to brute-force attacks => ../posts/2021/01/12/password-strength/ Becoming physically immune to brute-force attacks
Written in Go. Written in Go.
@ -115,7 +115,7 @@ Some software I use: Fedora, Alpine Linux, SwayWM, mpv, mpd, Minetest, Neovim, t
More information is available in my "uses" page. More information is available in my "uses" page.
=> ../uses/ Software I use => ./uses/ Software I use
### Anime ### Anime

View file

@ -1,6 +1,5 @@
--- ---
date: 2020-10-30 date: 2020-10-30
layout: post
title: About Seirdy (Rohan Kumar) title: About Seirdy (Rohan Kumar)
outputs: outputs:
- html - html
@ -80,7 +79,7 @@ At least two platforms listed in the "Social (centralized)" category are not end
I used to have the Matrix ID `@seirdy:envs.net`. I sometimes use `@seirdy:fairydust.space` for technical reasons (seirdy.one runs a Conduit server but certain features only work in Synapse rooms). I used to have the Matrix ID `@seirdy:envs.net`. I sometimes use `@seirdy:fairydust.space` for technical reasons (seirdy.one runs a Conduit server but certain features only work in Synapse rooms).
If you want to follow me on the Fediverse, [read my Fediverse greeting first](../fediverse-greeting/) If you want to follow me on the Fediverse, [read my Fediverse greeting first]({{<relref "fediverse-greeting.md">}})
<small>Poggies</small> <small>Poggies</small>
@ -122,7 +121,7 @@ I lean towards simplicity; I usually prefer line-mode command-line interfaces th
There are exceptions, of course: I use a Linux distro with Systemd (Fedora), after all. When I use a graphical program, it's typically for things for which graphics are an inherent requirement or for accessibility reasons (most textual user interfaces don't play well with screen readers). There are exceptions, of course: I use a Linux distro with Systemd (Fedora), after all. When I use a graphical program, it's typically for things for which graphics are an inherent requirement or for accessibility reasons (most textual user interfaces don't play well with screen readers).
More information is available in [my "uses" page](../uses/). More information is available in [my "uses" page]({{<relref "uses">}}).
### Anime ### Anime

View file

@ -38,7 +38,7 @@ I try to always always add content-warnings (<abbr title="content-warn or conten
I am okay with you using whichever post-visibility you wish when replying to me, but I speak only for myself. If I want to talk to you privately I will use an alternate means of communication. I am okay with you using whichever post-visibility you wish when replying to me, but I speak only for myself. If I want to talk to you privately I will use an alternate means of communication.
If I want to make a well-thought-out post that could benefit others, I'll post it to [my website's "notes" section](../notes/) and syndicate it to Fedi with the "#POSSE" ([Publish on Own Site, Syndicate Elsewhere](https://indieweb.org/posse)) hashtag. My notes also have a dedicated Atom and RSS feed. This is much lower-volume and "cleaner" than my Fediverse profile, if that's what you prefer. If I want to make a well-thought-out post that could benefit others, I'll post it to [my website's "notes" section](../../notes/) and syndicate it to Fedi with the "#POSSE" ([Publish on Own Site, Syndicate Elsewhere](https://indieweb.org/posse)) hashtag. My notes also have a dedicated Atom and RSS feed. This is much lower-volume and "cleaner" than my Fediverse profile, if that's what you prefer.
I will probably not boost pictures lacking alt-text, descriptions in the post body, or captions in comments. If I see a nice un-captioned picture, Ill comment with my own caption instead. I often use a screen reader to reduce overstimulation and eye strain, and I sometimes use textual clients that can't display images; alt-text is really important to me! I will probably not boost pictures lacking alt-text, descriptions in the post body, or captions in comments. If I see a nice un-captioned picture, Ill comment with my own caption instead. I often use a screen reader to reduce overstimulation and eye strain, and I sometimes use textual clients that can't display images; alt-text is really important to me!

37
layouts/about/list.html Normal file
View file

@ -0,0 +1,37 @@
{{ define "main" -}}
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
<main>
{{- $articleTag := printf `<article class="h-entry hentry" itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Article" itemid="%s%s">` .Site.Params.CanonicalBaseURL $canonicalRelPermalink -}}
{{ partial "full-article.html" . | replaceRE `<article class="h-entry hentry">` $articleTag | safeHTML }}
<hr />
<section itemprop="hasPart" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed">
<h2>More about me</h2>
<p role="doc-tip">
Timestamp format: <code>YYYY-MM-DD HH:MM</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite>. Sorted newest to oldest.
</p>
<ol>
{{- $pages := (where site.RegularPages "Section" .Section) -}}
{{- range $pages -}}
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
<li itemprop="dataFeedElement" itemscope="" itemtype="https://schema.org/DataFeedItem">
<article class="h-entry hentry" itemprop="item" itemscope="" itemtype="https://schema.org/Article" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
<h3 itemprop="name headline" class="p-name entry-title">
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
{{ .Title }}
</a>
</h3>
<p>
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02 15:04" }}</time>
{{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}}
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04" }}</time>
{{- end }}
</p>
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
<p>{{- partial "wordcount.html" . -}}</p>
</article>
</li>
{{- end }}
</ol>
</section>
</main>
{{ end }}

View file

@ -0,0 +1,29 @@
{{/* All pages are one or two clicks from the navbar. If two clicks, add a breadcrumb list. */}}
{{- if and (not .IsHome) (not .Parent.IsHome) -}}
<hr />
<nav aria-labelledby="bc-label"
itemscope="" itemprop="breadcrumb" itemtype="https://schema.org/BreadcrumbList" itemref="body">
<span id="bc-label">You are here:</span>
<ol>
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ol>
</nav>
{{- end -}}
{{ define "breadcrumbnav" }}
{{ if .p1.Parent }}
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
{{ end }}
{{- if not .p1.IsHome -}}
{{- $isCurrent := eq .p1 .p2 -}}
{{- /* The position is either "1" or "2" since the list is 2 elements long. */ -}}
{{- $position := "1" -}}
{{- if $isCurrent -}}
{{- $position = "2" -}}
{{- end -}}
<li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem">
<a{{ if $isCurrent }} aria-current="page"{{ end }} itemprop="item" href="{{ .p1.Permalink }}">
<span itemprop="name">{{ .p1.Title }}</span></a>
<meta itemprop="position" content="{{ $position }}" />
</li>
{{- end -}}
{{ end }}

View file

@ -35,4 +35,5 @@
{{- end }} {{- end }}
</ul> </ul>
</nav> </nav>
{{ partial "breadcrumblist.html" . }}
</header> </header>

View file

@ -8,6 +8,7 @@
{{- else -}} {{- else -}}
{{- $logURL = $logURL | strings.ReplaceRE `\.md` `.gmi` -}} {{- $logURL = $logURL | strings.ReplaceRE `\.md` `.gmi` -}}
{{- end -}} {{- end -}}
<p>
{{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{ partial "indieweb-author.html" -}} on his <a rel="canonical" itemprop="url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>{{- end -}}. {{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{ partial "indieweb-author.html" -}} on his <a rel="canonical" itemprop="url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>{{- end -}}.
{{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}} {{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}}
<br /> <br />
@ -17,3 +18,4 @@
<br /> <br />
{{ partial "wordcount.html" . -}} {{ partial "wordcount.html" . -}}
{{- end -}} {{- end -}}
</p>

View file

@ -4,6 +4,7 @@
"font-family-no-duplicate-names": [ true, { "ignoreFontFamilyNames": ["monospace"] } ], "font-family-no-duplicate-names": [ true, { "ignoreFontFamilyNames": ["monospace"] } ],
"indentation": "tab", "indentation": "tab",
"max-nesting-depth": 1, "max-nesting-depth": 1,
"selector-max-compound-selectors": 3 "selector-max-compound-selectors": 3,
"no-descending-specificity": null
} }
} }