From 71af9f1312d58e46950448c4b2f29f57bcbd0c15 Mon Sep 17 00:00:00 2001 From: Mike McKiernan Date: Tue, 16 Apr 2024 13:15:30 -0400 Subject: [PATCH] Add GDPR info to footer Signed-off-by: Mike McKiernan --- docs/source/_static/css/custom.css | 46 ++++++++++++++++++++++++++++++ docs/source/_templates/footer.html | 14 +++++++++ docs/source/conf.py | 10 ++++++- requirements/docs.txt | 6 +--- 4 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 docs/source/_static/css/custom.css create mode 100644 docs/source/_templates/footer.html diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css new file mode 100644 index 000000000..92846f2b2 --- /dev/null +++ b/docs/source/_static/css/custom.css @@ -0,0 +1,46 @@ +.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; +} + +footer div p { + font-size: 80%; +} + +footer div p a { + color: var(--small-font-color); +} + +footer div p a:hover { + color: var(--small-font-color); +} \ No newline at end of file diff --git a/docs/source/_templates/footer.html b/docs/source/_templates/footer.html new file mode 100644 index 000000000..72cae10b7 --- /dev/null +++ b/docs/source/_templates/footer.html @@ -0,0 +1,14 @@ +{% extends '!footer.html' %} +{% block contentinfo %} +

+Privacy Policy | +Manage My Privacy | +Do Not Sell or Share My Data | +Terms of Service | +Accessibility | +Corporate Policies | +Product Security | +Contact +

+{{ super() }} +{% endblock %} \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index b84e45a9c..199e7c21f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,6 +14,7 @@ import re import subprocess import sys +from datetime import datetime from natsort import natsorted @@ -25,8 +26,13 @@ # -- Project information ----------------------------------------------------- +year_range = "2022" +year_now = str(datetime.now().year) +if year_range != year_now: + year_range = year_range + chr(8211) + year_now + project = "Merlin Systems" -copyright = "2022, NVIDIA" # pylint: disable=W0622 +copyright = year_range + ", NVIDIA" # pylint: disable=W0622 author = "NVIDIA" @@ -89,11 +95,13 @@ # 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"] source_suffix = [".rst", ".md"] html_copy_source = False html_show_sourcelink = False +html_show_sphinx = False if os.path.exists(gitdir): tag_refs = subprocess.check_output(["git", "tag", "-l", "v*"]).decode("utf-8").split() diff --git a/requirements/docs.txt b/requirements/docs.txt index 9445871d9..c8ec0eb6c 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,8 +1,4 @@ -r base.txt --r dev.txt - -tritonclient[all] -tensorflow<=2.9.0 Sphinx==3.5.4 sphinx_rtd_theme==1.0.0 @@ -12,9 +8,9 @@ recommonmark==0.7.1 Jinja2<3.1 natsort==8.0.1 myst-nb==0.13.2 +lxml<5.1 linkify-it-py==1.0.3 sphinx-external-toc==0.2.4 -attrs==21.4.0 # keep support for numpy builtin type aliases for previous tags # numpy builtin aliases like np.str were removed in 1.24