-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(skins): add Zeus skin — OLED-near-black dark surfaces with default gold accent #3328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
198f23f
54c7a35
98f5751
d47f33f
69ebe52
24ee319
246b9e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ | |
| <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | ||
| <meta name="apple-mobile-web-app-title" content="Hermes"> | ||
| <link rel="apple-touch-icon" sizes="512x512" href="static/apple-touch-icon.png"> | ||
| <script>(function(){try{var themes={light:1,dark:1,system:1},skins={default:1,ares:1,mono:1,slate:1,poseidon:1,sisyphus:1,charizard:1,sienna:1,catppuccin:1,hepburn:1,nous:1,'geist-contrast':1,neon:1},legacy={slate:['dark','slate'],solarized:['dark','poseidon'],monokai:['dark','sisyphus'],nord:['dark','slate'],oled:['dark','default']},t=(localStorage.getItem('hermes-theme')||'dark').toLowerCase(),s=(localStorage.getItem('hermes-skin')||'').toLowerCase(),m=legacy[t],theme=m?m[0]:(themes[t]?t:'dark'),skin=skins[s]?s:(m?m[1]:'default');localStorage.setItem('hermes-theme',theme);localStorage.setItem('hermes-skin',skin);if(theme==='system')theme=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'light';if(theme==='dark')document.documentElement.classList.add('dark');if(skin!=='default')document.documentElement.dataset.skin=skin;}catch(e){document.documentElement.classList.add('dark');}})()</script> | ||
| <script>(function(){try{var themes={light:1,dark:1,system:1},skins={default:1,ares:1,mono:1,slate:1,poseidon:1,sisyphus:1,charizard:1,sienna:1,catppuccin:1,hepburn:1,nous:1,'geist-contrast':1,neon:1,zeus:1},legacy={slate:['dark','slate'],solarized:['dark','poseidon'],monokai:['dark','sisyphus'],nord:['dark','slate'],oled:['dark','default']},t=(localStorage.getItem('hermes-theme')||'dark').toLowerCase(),s=(localStorage.getItem('hermes-skin')||'').toLowerCase(),m=legacy[t],theme=m?m[0]:(themes[t]?t:'dark'),skin=skins[s]?s:(m?m[1]:'default');localStorage.setItem('hermes-theme',theme);localStorage.setItem('hermes-skin',skin);if(theme==='system')theme=window.matchMedia('(prefers-color-scheme:dark)').matches?'dark':'light';if(theme==='dark')document.documentElement.classList.add('dark');if(skin!=='default')document.documentElement.dataset.skin=skin;}catch(e){document.documentElement.classList.add('dark');}})()</script> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarifying the framing: Zeus defines dark-mode overrides only, but light mode is fully functional — it inherits the complete default skin palette rather than landing in a partially styled state. The |
||
| <script>(function(){try{var fs=localStorage.getItem('hermes-font-size');if(fs&&fs!=='default')document.documentElement.dataset.fontSize=fs;}catch(e){}})()</script> | ||
| <!-- theme-color: surfaces the active app chrome color to native status bars (Safari status bar, PWA, native WKWebView wrappers). Updated dynamically by boot.js when theme/skin changes. The light/dark default values match style.css :root --sidebar / :root.dark --sidebar. --> | ||
| <meta name="theme-color" content="#FAF7F0" media="(prefers-color-scheme: light)"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| """Zeus skin registration and dark-surface affordances.""" | ||
|
|
||
| from pathlib import Path | ||
|
|
||
| REPO = Path(__file__).parent.parent | ||
| CSS = (REPO / "static" / "style.css").read_text(encoding="utf-8") | ||
| BOOT_JS = (REPO / "static" / "boot.js").read_text(encoding="utf-8") | ||
| CONFIG_PY = (REPO / "api" / "config.py").read_text(encoding="utf-8") | ||
| INDEX_HTML = (REPO / "static" / "index.html").read_text(encoding="utf-8") | ||
| I18N_JS = (REPO / "static" / "i18n.js").read_text(encoding="utf-8") | ||
|
Comment on lines
+5
to
+10
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Matches the pattern used in every existing skin test in the repo (e.g. |
||
|
|
||
|
|
||
| def test_zeus_skin_is_registered_in_all_files(): | ||
| assert "{name:'Zeus'" in BOOT_JS | ||
| assert "zeus:1" in INDEX_HTML | ||
| assert '"zeus"' in CONFIG_PY | ||
|
|
||
|
|
||
| def test_zeus_dark_surfaces_are_near_black(): | ||
| assert ':root.dark[data-skin="zeus"]' in CSS | ||
| assert "--bg:#0F0F0F" in CSS | ||
| assert "--sidebar:#111111" in CSS | ||
| assert "--surface:#181818" in CSS | ||
|
|
||
|
|
||
| def test_zeus_preserves_default_gold_accent(): | ||
| # Zeus does NOT redefine --accent; it stays with the default gold. | ||
| # Verify gold-tinted border/focus vars are present instead. | ||
| assert "--border2:rgba(255,215,0,0.18)" in CSS | ||
| assert "--focus-ring:rgba(255,215,0,.4)" in CSS | ||
| assert "--hover-bg:rgba(255,215,0,.06)" in CSS | ||
|
|
||
|
|
||
| def test_zeus_active_session_uses_gold_highlight(): | ||
| assert ':root.dark[data-skin="zeus"] .session-item.active' in CSS | ||
| assert "border-left:2px solid #FFD700" in CSS | ||
|
|
||
|
|
||
| def test_zeus_modals_are_not_navy(): | ||
| # Modals/dialogs default to a hardcoded navy gradient — Zeus must override | ||
| assert ':root.dark[data-skin="zeus"] .app-dialog' in CSS | ||
| assert ':root.dark[data-skin="zeus"] .kanban-modal' in CSS | ||
| assert "rgba(24,24,24,.99)" in CSS | ||
|
|
||
|
|
||
| def test_zeus_i18n_lists_skin_in_all_locales(): | ||
| # Zeus is the last skin in each locale's cmd_theme string, so it appears | ||
| # as `…/zeus)` rather than `/zeus/`. There are 10 locales. | ||
| assert I18N_JS.count("zeus)") == 10 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-existing gap not introduced by this PR —
hepburnandneonare already absent fromcmd_themein current master. Addedzeusconsistently with the existing pattern. Happy to fix the broader gap in a separate PR if useful.