Skip to content

Commit ac9ea2f

Browse files
sstruzikclaude
andcommitted
docs: shared Oasis branding (logo, palette, home link)
Add the Oasis logo (light/dark, always visible in the Furo sidebar), the maroon/red Raleway palette matching oasislmf.github.io, and a persistent 'Oasis documentation home' link (rewritten to page-relative by the aggregator) so you can return to the top of the aggregated site from anywhere. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7fb2231 commit ac9ea2f

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

86.7 KB
Loading
77.2 KB
Loading

docs/source/conf.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,28 @@
5050
_k: (_v[0], _v[1])
5151
for _k, _v in _ix_json.loads(_ix_os.environ.get("OASIS_INTERSPHINX_MAP", "{}")).items()
5252
})
53+
# -- Oasis shared branding (logo, palette, home link) -----------------------
54+
import os as _os_brand
55+
if globals().get("html_theme") == "furo":
56+
if "_static" not in (globals().get("html_static_path") or []):
57+
html_static_path = list(globals().get("html_static_path") or []) + ["_static"]
58+
try:
59+
html_theme_options
60+
except NameError:
61+
html_theme_options = {}
62+
html_theme_options.setdefault("light_logo", "OASIS_LMF_COLOUR.png")
63+
html_theme_options.setdefault("dark_logo", "OASIS_LMF_WHITE.png")
64+
_lcv = html_theme_options.setdefault("light_css_variables", {})
65+
_lcv.setdefault("color-brand-primary", "#862633")
66+
_lcv.setdefault("color-brand-content", "#d22630")
67+
_lcv.setdefault("font-stack", "Raleway, sans-serif")
68+
_dcv = html_theme_options.setdefault("dark_css_variables", {})
69+
_dcv.setdefault("color-brand-primary", "#e2919b")
70+
_dcv.setdefault("color-brand-content", "#ef8b93")
71+
_home = _os_brand.environ.get("OASIS_DOCS_HOME", "https://oasislmf.github.io/index.html")
72+
html_theme_options.setdefault(
73+
"announcement",
74+
'<a href="' + _home + '" style="color:inherit;font-weight:600;text-decoration:none">'
75+
'&#8962; Oasis documentation home</a>')
76+
if "https://fonts.googleapis.com/css?family=Raleway" not in (globals().get("html_css_files") or []):
77+
html_css_files = list(globals().get("html_css_files") or []) + ["https://fonts.googleapis.com/css?family=Raleway"]

0 commit comments

Comments
 (0)