feat(wiki): accent color + favicon (#0050)

Set the blue Docusaurus-style accent (#2b6cb0 light / #63b3ed dark) via injectCSS
on the app UI — the login page is excluded because Wiki.js renders it without
custom CSS, so a dark login card is not themeable and is left as-is. Mount the
ThreadNet favicon (favicon.ico + favicon-16/32 PNGs the browser tab uses) from the
platform-branding ConfigMap via subPath, overlaying only those files.
This commit is contained in:
Thore Cimbal
2026-08-13 12:00:00 +00:00
parent 32ca547be3
commit ece80a8153
7 changed files with 33 additions and 1 deletions
+12 -1
View File
@@ -47,6 +47,17 @@ ADMIN_PERMS = [
]
READER_PERMS = ["read:pages", "read:assets", "read:comments"]
# Akzentfarbe fürs App-/Inhalts-UI (#0050): blau wie das alte Docusaurus.
# Gilt NICHT für die Login-Seite — die rendert Wiki.js ohne Custom-CSS.
ACCENT_CSS = (
".v-application a{color:#2b6cb0}"
".v-application .primary--text{color:#2b6cb0!important;caret-color:#2b6cb0!important}"
".v-application .primary{background-color:#2b6cb0!important;border-color:#2b6cb0!important}"
".theme--dark.v-application a{color:#63b3ed}"
".theme--dark.v-application .primary--text{color:#63b3ed!important;caret-color:#63b3ed!important}"
".theme--dark.v-application .primary{background-color:#63b3ed!important;border-color:#63b3ed!important}"
)
def log(msg: str) -> None:
print(f"[wikijs-config] {msg}", flush=True)
@@ -195,7 +206,7 @@ def ensure_theming(jwt: str):
'theming{setConfig(theme:$t,iconset:$i,darkMode:$d,tocPosition:$tp,injectCSS:$c,injectHead:$h,'
'injectBody:$b){responseResult{succeeded message}}}}',
jwt, {"t": tc["theme"], "i": tc["iconset"], "d": True, "tp": tc["tocPosition"],
"c": tc["injectCSS"], "h": tc["injectHead"], "b": tc["injectBody"]})
"c": ACCENT_CSS, "h": tc["injectHead"], "b": tc["injectBody"]})
# Site-Titel (oben links / Browser-Tab) aus der Deployment-Variable — nicht mehr
# das hartkodierte "Wiki.js". Reproduzierbar über WIKI_SITE_TITLE.
title = os.environ.get("WIKI_SITE_TITLE", "Wiki").strip() or "Wiki"