website

Personal website
git clone https://git.michaelneuper.com/website.git
README | Files | Log | Refs

commit 9e907864317757b9c221ef8992917c0b5b100dc2
parent 7c01e25e84e69b4f4f06f112d89a4267a541847c
Author: Michael Neuper <michael@michaelneuper.com>
Date:   Mon, 26 Oct 2026 16:57:41 +0200

add solarized themes

Diffstat:
Msrc/layouts/Base.astro | 2+-
Msrc/scripts/emacs/tips.js | 2+-
Msrc/scripts/themes.js | 1+
Msrc/styles/themes.css | 10++++++++++
4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro @@ -49,7 +49,7 @@ const { var t = localStorage.getItem("theme"); // Themes saved before the doom- prefix was dropped (all but doom-one). if (t && t !== "doom-one") t = t.replace(/^doom-/, ""); - var known = /^(gruvbox|gruvbox-light|doom-one|atom-one-dark|modus-vivendi|modus-operandi|dracula|nord|catppuccin|tokyo-night|solarized-light)$/; + var known = /^(gruvbox|gruvbox-light|doom-one|atom-one-dark|modus-vivendi|modus-operandi|dracula|nord|catppuccin|tokyo-night|solarized-dark|solarized-light)$/; if (!known.test(t || "")) t = matchMedia("(prefers-color-scheme: light)").matches ? "gruvbox-light" : ""; if (t) document.documentElement.dataset.theme = t; } catch (e) {} diff --git a/src/scripts/emacs/tips.js b/src/scripts/emacs/tips.js @@ -21,7 +21,7 @@ const unlocked = () => listCommands().some((c) => c.name === "butterfly" && !c.h const TIPS = [ { id: "search", text: "/ searches this page, and n and N step through the matches." }, { id: "motions", text: "j and k scroll, and gg and G go to the top and bottom, as in evil." }, - { id: "themes", text: "SPC h t tries the 11 themes with a live preview; :colorscheme picks one by name." }, + { id: "themes", text: "SPC h t tries the 12 themes with a live preview; :colorscheme picks one by name." }, { id: "help", text: "? lists every key and command on this page." }, { id: "quit", text: "Try :q, or SPC q q." }, { id: "morse", text: "Select some text, then M-x morse-region turns it into Morse code.", when: cmd("morse-region") }, diff --git a/src/scripts/themes.js b/src/scripts/themes.js @@ -13,6 +13,7 @@ export const THEMES = [ { id: "nord", desc: "Nord, arctic and north-bluish" }, { id: "catppuccin", desc: "Catppuccin, Mocha flavour" }, { id: "tokyo-night", desc: "Tokyo Night" }, + { id: "solarized-dark", desc: "Solarized dark" }, { id: "solarized-light", desc: "Solarized light" }, ]; diff --git a/src/styles/themes.css b/src/styles/themes.css @@ -112,6 +112,16 @@ --dim-mix: 70%; } +/* doom's foreground, #839496, is only 4.1:1 on the modeline's base02, under + what --dim needs even unmixed. So the text is lightened a fifth towards + base3 (#fdf6e3), the same step solarized-light takes the other way. */ +:root[data-theme="solarized-dark"] { + --bg: #002b36; --bg-alt: #073642; --fg: #9ba8a5; + --red: #dc322f; --orange: #cb4b16; --yellow: #b58900; --green: #859900; + --cyan: #2aa198; --blue: #268bd2; --magenta: #d33682; + --dim-mix: 94%; +} + /* doom's foreground, #556b72, is only 5.2:1 on this cream, which leaves no room for a lighter --dim that still reads. So the text is darkened a fifth towards base03 (#002b36), and --dim lands about where the old text colour was. */