diff --git a/.mcp.json b/.mcp.json index 045baea18..bf5d3c14d 100644 --- a/.mcp.json +++ b/.mcp.json @@ -1,8 +1,8 @@ { "mcpServers": { "chrome-devtools": { - "command": "npx", - "args": ["-y", "chrome-devtools-mcp@latest"] + "command": "just", + "args": ["mcp-chrome-devtools"] } } } diff --git a/docs/guide/html-template/dark-mode.md b/docs/guide/html-template/dark-mode.md index 4d4deb777..c863e946a 100644 --- a/docs/guide/html-template/dark-mode.md +++ b/docs/guide/html-template/dark-mode.md @@ -4,32 +4,23 @@ slug: dark-mode # Dark Mode -Emanote includes built-in dark mode support using Tailwind CSS. The dark mode feature automatically detects and follows your system's color scheme preference. +Emanote ships with a manual light/dark theme toggle. The user's choice is persisted in `localStorage` and applied before first paint, so there's no flash of the wrong theme on reload. If the user has never toggled, the site falls back to the OS `prefers-color-scheme` preference. -## Features +## How it works -- **Automatic Detection**: Respects your system's dark mode preference by default -- **Tailwind Integration**: Uses Tailwind CSS's `prefers-color-scheme` media query strategy -- **Comprehensive Coverage**: All page elements adapt to dark mode including content, navigation, and UI components - -## Controlling Dark Mode - -Dark mode automatically follows your system's color scheme preference. To manually toggle dark mode, we recommend using a browser extension like: - -- **Chrome**: [Dark Mode Toggle](https://chromewebstore.google.com/detail/chrome-dark-mode-toggle/idnbggfpadjhjicgjmhlpeilafaplnhd?hl=en) - - Note: You may need to enable the "Experimental Web Platform Features" flag at `chrome://flags` for the extension to work properly -- **Firefox**: Similar extensions available in Firefox Add-ons - -These extensions override the system preference and allow you to toggle dark mode for any website. +- The toggle button lives in the sidebar (next to the search icon), and also in the top-right corner of the no-sidebar "neuron-style" layout. +- Clicking the toggle flips a `.dark` class on `` and stores the choice in `localStorage` under the key `emanote-theme`. +- An inline ` <ema:titleFull /> diff --git a/emanote/default/templates/components/backlinks.tpl b/emanote/default/templates/components/backlinks.tpl index 0ff652f02..0ece59b06 100644 --- a/emanote/default/templates/components/backlinks.tpl +++ b/emanote/default/templates/components/backlinks.tpl @@ -1,10 +1,10 @@ -
+ - \ No newline at end of file + diff --git a/emanote/default/templates/components/breadcrumbs.tpl b/emanote/default/templates/components/breadcrumbs.tpl index 1b4cfc557..218f5f8b0 100644 --- a/emanote/default/templates/components/breadcrumbs.tpl +++ b/emanote/default/templates/components/breadcrumbs.tpl @@ -1,18 +1,18 @@ - diff --git a/emanote/default/templates/components/checkbox-checked.tpl b/emanote/default/templates/components/checkbox-checked.tpl index 417623965..3ac28a68d 100644 --- a/emanote/default/templates/components/checkbox-checked.tpl +++ b/emanote/default/templates/components/checkbox-checked.tpl @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/emanote/default/templates/components/checkbox-unchecked.tpl b/emanote/default/templates/components/checkbox-unchecked.tpl index c14c3f60d..aebdcf8ce 100644 --- a/emanote/default/templates/components/checkbox-unchecked.tpl +++ b/emanote/default/templates/components/checkbox-unchecked.tpl @@ -1,4 +1,4 @@ - + diff --git a/emanote/default/templates/components/context.tpl b/emanote/default/templates/components/context.tpl index 01a160b86..8592c83ff 100644 --- a/emanote/default/templates/components/context.tpl +++ b/emanote/default/templates/components/context.tpl @@ -1,9 +1,9 @@ -
+
-
+
- - + + diff --git a/emanote/default/templates/components/note-title.tpl b/emanote/default/templates/components/note-title.tpl index 522ffe128..a14d08fa4 100644 --- a/emanote/default/templates/components/note-title.tpl +++ b/emanote/default/templates/components/note-title.tpl @@ -1,3 +1,3 @@ -

+

-

\ No newline at end of file + diff --git a/emanote/default/templates/components/pandoc.tpl b/emanote/default/templates/components/pandoc.tpl index 00fcf8ebe..b6dada23a 100644 --- a/emanote/default/templates/components/pandoc.tpl +++ b/emanote/default/templates/components/pandoc.tpl @@ -29,7 +29,6 @@

- @@ -76,24 +75,21 @@ -
-
Footnotes
- -
-
- . -
-
+
-
-
-
+ + + +
-
    +
    • @@ -102,21 +98,21 @@
    -
      +
        -
      1. +
      2. -
    +

    - - - + + + diff --git a/emanote/default/templates/components/sidebar.tpl b/emanote/default/templates/components/sidebar.tpl index 62f43a8e9..977e6b30d 100644 --- a/emanote/default/templates/components/sidebar.tpl +++ b/emanote/default/templates/components/sidebar.tpl @@ -1,5 +1,5 @@