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:
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 709 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -97,3 +97,6 @@ configMapGenerator:
|
||||
files:
|
||||
- branding/logo.png
|
||||
- branding/alpenglow.jpg
|
||||
- branding/favicon.ico
|
||||
- branding/favicons/favicon-32x32.png
|
||||
- branding/favicons/favicon-16x16.png
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -66,6 +66,21 @@ spec:
|
||||
- name: branding
|
||||
mountPath: /wiki/assets/img/branding
|
||||
readOnly: true
|
||||
# Favicon (#0050): serve-favicon liest /wiki/assets/favicon.ico; der
|
||||
# Browser-Tab nutzt zusätzlich die PNGs unter /_assets/favicons/. Einzelne
|
||||
# Dateien per subPath überlagern, ohne die restlichen Default-Favicons zu verdecken.
|
||||
- name: branding
|
||||
mountPath: /wiki/assets/favicon.ico
|
||||
subPath: favicon.ico
|
||||
readOnly: true
|
||||
- name: branding
|
||||
mountPath: /wiki/assets/favicons/favicon-32x32.png
|
||||
subPath: favicon-32x32.png
|
||||
readOnly: true
|
||||
- name: branding
|
||||
mountPath: /wiki/assets/favicons/favicon-16x16.png
|
||||
subPath: favicon-16x16.png
|
||||
readOnly: true
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
|
||||
Reference in New Issue
Block a user