Search draft - #3
Merged
Merged
Conversation
commit 443e4f4 Merge: 4659e0c 49d6bca Author: Dr Alexander Mikhalev <alex@metacortex.engineer> Date: Wed Dec 4 08:44:10 2024 +0000 Merge pull request #1 from terraphim/watcher_server Watcher server commit 49d6bca Author: AlexMikhalev <alex@metacortex.engineer> Date: Tue Dec 3 15:15:13 2024 +0000 feat: watcher and serve commands added, ugly but working commit b04f213 Author: AlexMikhalev <alex@metacortex.engineer> Date: Tue Dec 3 11:55:07 2024 +0000 feat: watcher and serve commands added
Signed-off-by: AlexMikhalev <alex@metacortex.engineer>
Signed-off-by: AlexMikhalev <alex@metacortex.engineer>
Signed-off-by: Dr Alexander Mikhalev <alex@metacortex.engineer>
AlexMikhalev
added a commit
that referenced
this pull request
Aug 8, 2026
AlexMikhalev
added a commit
that referenced
this pull request
Aug 8, 2026
Completes E1 and implements plan item C3, which the review had assumed was already done. Theme picker: themes.css defined all five themes and theme-switch.js listened for [data-theme-set] clicks, but no template rendered such a control, so only automatic prefers-color-scheme switching worked. The header now carries a <details> picker — keyboard accessible with no script, closing on select — and the root element exposes data-default-theme and data-preferred-dark-theme, so `default-theme` and `preferred-dark-theme` finally take effect. theme-switch.js marks the active entry with aria-current. Browser-verified with agent-browser: selecting Coal sets data-theme=coal, computed background becomes rgb(20,22,23), localStorage persists it, and it survives navigation. Unsupported-key warnings: nine keys parsed and did nothing in silence. config::unsupported_keys_in inspects the parsed document rather than the loaded BookConfig, because a filled default is indistinguishable from a value the author typed — warning on defaults would fire for every book. Messages distinguish "not implemented yet" (syntax-theme, additional-css/js, fold, mathjax-support) from "no Pagefind equivalent" (the elasticlunr scoring knobs) and "out of scope" (playground). Three further defects found while wiring it up: - main.rs had its own copy of the config loader, so the CLI got neither the defaults fill nor the new warnings, and the two copies had already drifted (only main's resolved book.toml from the book directory). Collapsed into config::load_config_from; main.rs delegates. - index.html and print.html never linked themes.css, so they applied data-theme while showing unthemed colours. index.html also loaded neither theme-switch.js nor keyboard.js. - The header GitHub link and the footer link rendered unconditionally, emitting href="" — a link to the page itself — when the URLs were unset. The header's edit link was guarded by the wrong key. Icon links also regained their aria-labels. Refs #3, Refs #5 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.