|
50 | 50 | _k: (_v[0], _v[1]) |
51 | 51 | for _k, _v in _ix_json.loads(_ix_os.environ.get("OASIS_INTERSPHINX_MAP", "{}")).items() |
52 | 52 | }) |
| 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 | + '⌂ 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