Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions docs/src/_static/deprecated-banner.css
Original file line number Diff line number Diff line change
@@ -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;
}
}
7 changes: 7 additions & 0 deletions docs/src/_templates/deprecated_banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="deprecated-docs-banner" role="note" aria-label="Deprecated documentation notice">
<span class="deprecated-docs-banner__label">Deprecated</span>
<p class="deprecated-docs-banner__message">
This Splice documentation site is deprecated. Use the current Canton Network docs.
</p>
<a class="deprecated-docs-banner__link" href="https://docs.canton.network/">Open current docs</a>
</div>
5 changes: 5 additions & 0 deletions docs/src/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- extends "!layout.html" %}
{% block document %}
{% include "deprecated_banner.html" %}
{{ super() }}
{% endblock %}
2 changes: 2 additions & 0 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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")
Expand Down