Dilip's Log

Preferences

6 min read (1273 words)

Contents

Everything on this site that you can change and have personalized experience.

Source
github.com/idlip/hakimacs (the readme, and the whole thing)

Try everything at once#

Each button does exactly what it says, and a small note pops up to tell you what changed. Only Random page navigates away, so click the rest freely and watch the page change under you.

The same controls sit as icons in the second row of the header, on every page.

Wander My Small Web is a separate feature, not a theme preference: it launches a small-web console that drops you on a random site from a curated list of personal blogs.

Launch Wander Console browse random sites from this network


This paragraph is here on purpose, as something long enough to actually watch change. Cycle the font and the letterforms change under you; cycle the width and the measure gets narrower or wider. The colours come from the scheme you picked (Haki if you never did), and dark/light flips the whole palette without touching the scheme itself.


The cycles#

Two settings are cycles: each press advances one step and wraps around at the end. The step you land on is remembered.

Font mode#

Five modes, and Mixed is the default for a first visit.

Mode Prose Structure, meta, UI Code
Mixed serif sans mono
Serif serif serif mono
Sans sans sans mono
Mono mono mono mono
Browser default your browser's font your browser's font mono

Two things never move. Code, verbatim, and preformatted blocks are always monospace, in every mode. And headings always use the display face, outside the cycle entirely. Browser default is for readers who have set a font they like in their own browser: the site steps aside and uses it.

Content width#

Steps: Normal (default, about 830px), then Wide, Full and Narrow.

Normal is a comfortable measure for prose. Wide and Full help with wide code blocks and tables; Narrow suits a large screen if you like short lines. Browser zoom still works on top of any of them.

Dark / light#

This flips the variant, not the scheme. Until you press it, the site follows your system setting; once you press it, your choice wins and is remembered.

If the scheme you are on has both a dark and a light palette, it swaps. If it has only one, nothing pretends to work: the page tells you there is no such variant and opens the scheme list, so you can pick one that has it.

Colour schemes#

Where they come from#

Three different sources, deliberately:

  • Haki is mine, hand-written as CSS, and it is the default.
  • Modus follows Protesilaos Stavrou's Modus themes for Emacs, with both a dark (Vivendi) and a light (Operandi) variant.
  • Everything else comes straight from tinted-theming/schemes, the base16 community collection, unmodified.

Only readable ones#

Every scheme is checked when the site is built. Body text needs a contrast of at least 7:1 against the background, links 4.5:1, and headings 3:1. Schemes that fail are left out rather than patched, so 140 of the 306 make it into the list.

The list opens with my curated families, marked light and dark: Haki, Modus, Gruvbox and Tokyo Night have both variants, the rest are dark only. All the other readable schemes follow, by name.

How the whole thing works#

Every scheme is just sixteen colours, base00 through base0F, and the entire UI is built from a handful of semantic names that point at those sixteen. So --link means "base0D", and swapping a scheme means swapping sixteen values while every rule in the stylesheet keeps working untouched.

That is the reason hundreds of imported editor themes can drive a website they were never designed for. It also means schemes cost almost nothing: the curated ones are plain CSS, and the rest are fetched only when you open the list.

Open the list with the scheme icon in the header, or open the command palette and type t followed by a space. Moving through the list with the arrow keys previews each scheme on the real page, and closing the list puts it back.

The command palette#

One dialog does search and every command. Open it with the M-x button in the header, or with x, Ctrl-K, Ctrl-S, or Alt-x (Emacs M-x), whichever your fingers already know.

Type this Get
anything pages, tags, commands, and full-text results
t then space every readable colour scheme, by name

Esc closes it. Backspace at an empty prefix goes back to the default list.

Palette shortcut on / off turns the x key off if you need your browser's own x back, or use voice input where a stray letter fires a command. The other open-palette keys keep working either way. This is WCAG 2.1.4 Character Key Shortcuts.

Lists#

Every list on the site (the Log, tags, Wander, Media, Quotes and more) has a filter box on top. Type to narrow it down, #emacs to match a tag, / to jump into the box and Esc to clear it. Next to it, List and Grid change how the list is laid out, and the site remembers your pick.

Reading a post#

  • Headings get a # link on hover, so any section is directly linkable.
  • References are collected automatically from the links in the post and numbered at the end. See Also fills the leftover space with related posts, and only when there is room.
  • Comments have no backend at all. The box composes a pre-filled email and hands it to your mail client. Embrace email!
  • Pose entries are folded under their date and title; the newest one starts open, and a link to an entry opens it.
  • The site title has a small secret if you hover over it, or click it. Easter egg shows random quote in popup toast.

What gets stored#

A few keys in localStorage, all starting with emacs-, and no cookies.

Key Holds
emacs-theme dark or light, once you have pressed it
emacs-scheme-fixed the curated scheme you picked
emacs-custom-palette any other scheme you picked from the list
emacs-font-mode the font mode
emacs-width the content width
emacs-list-view list or grid
emacs-keys-off palette shortcut disabled
emacs-wander-colors your scheme's colours, for the Wander console

Clearing site data resets everything to defaults. Nothing here identifies you, and none of it leaves your browser. The site does load one analytics script, Umami, which counts visits without cookies or personal data.

How my site is put/designed together#

Written down mostly because people ask.

  • Content is Org-mode, written in Emacs and built with Denden: Emacs Lisp SSG based on org-publish, my own small static site generator on top of Org's ox-publish.
  • One stylesheet, in cascade layers, styling plain HTML elements first and a short list of shared pieces for the rest.
  • One small deferred script. The site reads fine without it; it only adds the controls above.
  • Your scheme, font and width are applied before the first paint, so there is no flash of the wrong colours on load.
  • prefers-reduced-motion is respected: nothing spins or sways unless motion is welcome, and then only on hover or focus.
  • Every interactive thing is reachable by keyboard and has a visible focus ring.

More detail on the stack is on the Colophon page, and the whole source is on GitHub if you would rather just read it.

References#

  1. github.com/idlip/hakimacs github.com
  2. Wander My Small Web
  3. Launch Wander Console
  4. Modus themes protesilaos.com
  5. tinted-theming/schemes github.com
  6. WCAG 2.1.4 Character Key Shortcuts w3.org
  7. Umami umami.is
  8. Denden: Emacs Lisp SSG based on org-publish
  9. cascade layers developer.mozilla.org
  10. Colophon
Opens your email client. No public comments here.