From d409a1ba58fdd4cecba8faf28fb14ccdf52aca45 Mon Sep 17 00:00:00 2001
From: Rohan Kumar
Date: Tue, 24 May 2022 16:33:16 -0700
Subject: [PATCH] Add "notes"
Short-form posts for microblogging. TODO: implement POSSE.
---
config.toml | 18 ++++++++++++++----
content/notes/dark-theme-woes.md | 14 ++++++++++++++
content/notes/hello-notes.md | 7 +++++++
layouts/_default/list.html | 4 ++++
layouts/_default/notes.html | 29 +++++++++++++++++++++++++++++
layouts/archetypes/notes.md | 5 +++++
layouts/notes/single.html | 9 +++++++++
layouts/partials/head.html | 2 ++
layouts/partials/post-meta.html | 4 +++-
layouts/partials/posts.html | 9 ++++++---
layouts/partials/prev-next.html | 6 +++++-
layouts/partials/webmentions.html | 2 +-
12 files changed, 99 insertions(+), 10 deletions(-)
create mode 100644 content/notes/dark-theme-woes.md
create mode 100644 content/notes/hello-notes.md
create mode 100644 layouts/_default/notes.html
create mode 100644 layouts/archetypes/notes.md
create mode 100644 layouts/notes/single.html
diff --git a/config.toml b/config.toml
index 729f0f5..6b38004 100644
--- a/config.toml
+++ b/config.toml
@@ -1,6 +1,8 @@
baseURL = "https://seirdy.one/" # just the default, I have mirrors
languageCode = "en-us"
title = "Seirdy's Home"
+timeZone = "UTC"
+summaryLength = 150
enableInlineShortcodes = true
enableGitInfo = true
@@ -37,36 +39,44 @@ nick = "Seirdy"
url = "/posts.html"
weight = 10
+ [[menu.main]]
+ identifier = "notes"
+ name = "Notes"
+ title = "notes"
+ url = "/notes.html"
+ weight = 15
+
[[menu.main]]
identifier = "bookmarks"
name = "Bookmarks"
title = "bookmarks"
url = "/bookmarks.html"
- weight = 11
+ weight = 20
[[menu.main]]
identifier = "about"
name = "About"
title = "about"
url = "/about.html"
- weight = 20
+ weight = 30
[[menu.main]]
identifier = "resume"
name = "Resume"
title = "resume"
url = "/resume.html"
- weight = 30
+ weight = 40
[[menu.main]]
identifier = "rss"
name = "RSS feed"
title = "rss feed"
url = "/posts/index.xml"
- weight = 40
+ weight = 50
[permalinks]
posts = "/:year/:month/:day/:filename"
+notes = "/notes/:year/:month/:day/:filename"
[markup.goldmark.renderer]
# Allows HTML in Markdown
diff --git a/content/notes/dark-theme-woes.md b/content/notes/dark-theme-woes.md
new file mode 100644
index 0000000..73654f8
--- /dev/null
+++ b/content/notes/dark-theme-woes.md
@@ -0,0 +1,14 @@
+---
+title: "Dark theme woes"
+date: 2022-05-25T00:00:32-07:00
+---
+I try to have limited reliance on CSS media queries in favor of being inclusive by as many people as possible by default, including fingerprinting-averse readers. Unfortunately, I have concluded that it is impossible to set one single website color palette that ticks all of the following boxes:
+
+- Familiar: colors aren't particularly "novel" and don't impose a learning curve. The difference between a visited and unvisited link should be clear enough from the get-go.
+- Friendly to various types of color blindness
+- Sufficient contrast for high-contrast needs
+- Autism-friendly, anxiety-friendly colors that do not trigger overstimulation or imply a warning.
+- Related: sensitive to cultural norms (is red actually a "warning" to everyone?).
+
+I set a custom palette for my site's dark theme. Since its contrast is a bit high, I made it respond to the `prefers-contrast: less` media query. Now, My 108% body text typically renders at 17.4 px, which should have an absolute value [below 90 Lc on the APCA lookup table](https://www.myndex.com/APCA/). I dropped my link contrast to 90 Lc and my body text to something slightly higher (article body text should have at least as much contrast as link text and buttons to avoid the "piercing glare" effect interactive elements can have; I should add that to my website best practices article sometime).
+
diff --git a/content/notes/hello-notes.md b/content/notes/hello-notes.md
new file mode 100644
index 0000000..19f131d
--- /dev/null
+++ b/content/notes/hello-notes.md
@@ -0,0 +1,7 @@
+---
+title: Hello notes
+date: "2022-05-24T23:34:50-00:00"
+---
+This is first "note" on my IndieWeb Site. Notes will be shorter and less formal than typical blog posts; this is a microblog, not a typical weblog.
+
+Once this is working correctly, I'll need to figure out a solution to POSSE these notes to the Fediverse.
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 97af0e3..3161f9f 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,3 +1,7 @@
{{ define "main" }}
+{{- if eq .Page.Section "notes" -}}
+{{- partial "notes.html" . -}}
+{{- else -}}
{{- partial "posts.html" . -}}
+{{- end -}}
{{ end }}
diff --git a/layouts/_default/notes.html b/layouts/_default/notes.html
new file mode 100644
index 0000000..98676b7
--- /dev/null
+++ b/layouts/_default/notes.html
@@ -0,0 +1,29 @@
+{{ define "main" }}
+
+
Notes
+
This is my microblog. These are my short informal posts, sorted by date (newest first). For longer posts, see my blog.
+
+ Timestamp format: YYYY-MM-DD HH:MM:SS, as per RFC 3339
+