From 21117cfc4c113b30036afcb97b6daa5f377996db Mon Sep 17 00:00:00 2001 From: mikemckiernan Date: Fri, 18 Nov 2022 08:37:54 -0500 Subject: [PATCH] docs: Add semver to calver banner (#1699) All Merlin projects are switching from semantic versioning, like `0.4.0`, to calendar versioning, like `23.01`. The change is planned for January 2023. Temporarily add a banner to all pages to prepare our consumers for the change. --- docs/source/_static/css/custom.css | 34 ++++++++++++++++++++++++++++++ docs/source/_templates/layout.html | 9 ++++++++ docs/source/conf.py | 3 ++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docs/source/_static/css/custom.css create mode 100644 docs/source/_templates/layout.html diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css new file mode 100644 index 00000000000..319ddff89a0 --- /dev/null +++ b/docs/source/_static/css/custom.css @@ -0,0 +1,34 @@ +.wy-nav-content { + margin: 0; + background: #fcfcfc; + padding-top: 40px; +} + +.wy-side-nav-search { + display: block; + width: 300px; + padding: .809em; + padding-top: 0.809em; + margin-bottom: .809em; + z-index: 200; + background-color: #2980b9; + text-align: center; + color: #fcfcfc; + padding-top: 40px; +} + +div.banner { + position: fixed; + top: 10px; + left: 20px; + margin: 0; + z-index: 1000; + width: 1050px; + text-align: center; +} + +p.banner { + border-radius: 4px; + color: #004831; + background: #76b900; +} \ No newline at end of file diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html new file mode 100644 index 00000000000..76917f64c1f --- /dev/null +++ b/docs/source/_templates/layout.html @@ -0,0 +1,9 @@ +{% extends "!layout.html" %} +{% block extrabody %} + +{% endblock %} diff --git a/docs/source/conf.py b/docs/source/conf.py index b3f4ec0c2d8..79b71195e09 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -95,7 +95,8 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [] +html_static_path = ["_static"] +html_css_files = ["css/custom.css"] source_suffix = [".rst", ".md"]