From c9050e55b16988cbafa09b81fa6a4859336737a9 Mon Sep 17 00:00:00 2001 From: danielporterda Date: Thu, 7 May 2026 10:53:33 -0400 Subject: [PATCH] Add deprecated docs banner --- docs/src/_static/deprecated-banner.css | 67 ++++++++++++++++++++++ docs/src/_templates/deprecated_banner.html | 7 +++ docs/src/_templates/layout.html | 5 ++ docs/src/conf.py | 2 + 4 files changed, 81 insertions(+) create mode 100644 docs/src/_static/deprecated-banner.css create mode 100644 docs/src/_templates/deprecated_banner.html create mode 100644 docs/src/_templates/layout.html diff --git a/docs/src/_static/deprecated-banner.css b/docs/src/_static/deprecated-banner.css new file mode 100644 index 0000000000..ad30eefc3a --- /dev/null +++ b/docs/src/_static/deprecated-banner.css @@ -0,0 +1,67 @@ +.deprecated-docs-banner { + box-sizing: border-box; + display: flex; + align-items: center; + gap: 1rem; + width: min(100%, calc(100vw - 2rem)); + max-width: 100%; + margin: 0 0 1.5rem; + padding: 0.875rem 1rem; + border: 1px solid #d8ccff; + border-radius: 0.375rem; + background: #f7f4ff; + color: #2f2358; + font-size: 0.9375rem; + line-height: 1.45; +} + +.deprecated-docs-banner__label { + flex: 0 0 auto; + display: inline-flex; + align-items: center; + justify-content: center; + min-height: 1.5rem; + padding: 0.125rem 0.625rem; + border-radius: 999px; + background: #734be2; + color: #ffffff; + font-size: 0.75rem; + font-weight: 700; + letter-spacing: 0; + line-height: 1.2; +} + +.deprecated-docs-banner__message { + flex: 1 1 auto; + min-width: 0; + margin: 0; + overflow-wrap: anywhere; +} + +.deprecated-docs-banner__link { + flex: 0 0 auto; + color: #5c3db8; + font-weight: 700; + text-decoration: underline; + text-underline-offset: 0.15em; +} + +.deprecated-docs-banner__link:hover, +.deprecated-docs-banner__link:focus { + color: #2f2358; +} + +@media screen and (max-width: 768px) { + .deprecated-docs-banner { + align-items: flex-start; + flex-direction: column; + gap: 0.5rem; + margin-bottom: 1.25rem; + padding: 0.875rem; + font-size: 0.875rem; + } + + .deprecated-docs-banner__link { + align-self: flex-start; + } +} diff --git a/docs/src/_templates/deprecated_banner.html b/docs/src/_templates/deprecated_banner.html new file mode 100644 index 0000000000..df0dbccae8 --- /dev/null +++ b/docs/src/_templates/deprecated_banner.html @@ -0,0 +1,7 @@ +
+ Deprecated +

+ This Splice documentation site is deprecated. Use the current Canton Network docs. +

+ Open current docs +
diff --git a/docs/src/_templates/layout.html b/docs/src/_templates/layout.html new file mode 100644 index 0000000000..a3152320df --- /dev/null +++ b/docs/src/_templates/layout.html @@ -0,0 +1,5 @@ +{%- extends "!layout.html" %} +{% block document %} +{% include "deprecated_banner.html" %} +{{ super() }} +{% endblock %} diff --git a/docs/src/conf.py b/docs/src/conf.py index 94f4332a5e..600ba86b58 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -87,6 +87,7 @@ def make_id(string): # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] +html_static_path = ["_static"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -121,6 +122,7 @@ def make_id(string): "conf_py_path": "/docs/src/", } +html_css_files = ["deprecated-banner.css"] html_js_files = ["script.js"] SPLICE_ROOT = os.getenv("SPLICE_ROOT")