From 6f843ba1fa3e59f2c4caf4dbb291254d5c6ae2ea Mon Sep 17 00:00:00 2001 From: Pedro Brochado Date: Wed, 10 Apr 2024 17:46:54 -0300 Subject: [PATCH] Add deprecation banner in legacy docs. [noissue] --- docs/_static/css/custom.css | 43 +++++++++++++++++++++++++++++++++++++ docs/_templates/layout.html | 22 +++++++++++++++++++ docs/conf.py | 1 + 3 files changed, 66 insertions(+) create mode 100644 docs/_static/css/custom.css create mode 100644 docs/_templates/layout.html diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css new file mode 100644 index 000000000..b204c4484 --- /dev/null +++ b/docs/_static/css/custom.css @@ -0,0 +1,43 @@ +.banner { + background: #ffe2c9; + height: 50px; + border-top: 5px solid #ffad67; + width: 100%; + position: fixed; + z-index: 9999; + box-shadow: 0 3px 10px -5px rgb(0 0 0 / 0.2); + } + +.banner__content { + padding: 16px; + max-width: 1120px; + margin: 0; + display: flex; + align-items: center; + height: 100%; + } + +.banner__text { + flex-grow: 1; + line_height: 1.4em; + text-align: center; + font-weight: bold; + font-family: Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif; + color: #505050; +} + + +@media (min-width: 768px){ + .wy-side-nav-search { + padding-top: 60px; + } +} + +@media (max-width: 768px){ + .wy-nav-top { + margin-top: 50px; + } + .wy-side-nav-search { + margin-top: 50px; + } +} diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 000000000..8ea4a9eb2 --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,22 @@ +{# + classic/layout.html + ~~~~~~~~~~~~~~~~~~~ + + Sphinx layout template for the classic theme. + + :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- extends "sphinx_rtd_theme/layout.html" %} + +{%- block extrabody %} + +{%- endblock %} diff --git a/docs/conf.py b/docs/conf.py index 8963b5406..a3e7d5ee0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -133,6 +133,7 @@ # 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 = ['_static'] +html_css_files = ['css/custom.css'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format.