From c0f43d67e1d6c6b06883d3e6ef74e5e4fb9a4f8c Mon Sep 17 00:00:00 2001 From: Mike McKiernan Date: Thu, 25 Apr 2024 09:16:31 -0400 Subject: [PATCH] Add GDPR info into footer (#1096) Signed-off-by: Mike McKiernan --- docs/source/_static/css/custom.css | 13 +++++++++++++ docs/source/_templates/footer.html | 10 ++++++++++ docs/source/conf.py | 15 +++++++++++---- 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 docs/source/_templates/footer.html diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css index 7287e4921..11179bfd2 100644 --- a/docs/source/_static/css/custom.css +++ b/docs/source/_static/css/custom.css @@ -470,3 +470,16 @@ dd p:first-child { margin-top: 0px; } + +footer div p { + font-size: 80%; + padding-top: 1em; +} + +footer div p a { + color: var(--small-font-color); +} + +footer div p a:hover { + color: var(--small-font-color); +} diff --git a/docs/source/_templates/footer.html b/docs/source/_templates/footer.html new file mode 100644 index 000000000..67c31217d --- /dev/null +++ b/docs/source/_templates/footer.html @@ -0,0 +1,10 @@ +

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

\ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index aa8311c81..58d1b12f1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,6 +3,7 @@ import re import subprocess import sys +from datetime import datetime from natsort import natsorted @@ -12,8 +13,13 @@ # -- Project information ----------------------------------------------------- +year_range = "2023" +year_now = str(datetime.now().year) +if year_range != year_now: + year_range = year_range + chr(8211) + year_now + project = "Merlin" -copyright = "2023, NVIDIA" # pylint: disable=redefined-builtin +copyright = year_range + ", NVIDIA" # pylint: disable=redefined-builtin author = "NVIDIA" # -- General configuration --------------------------------------------------- @@ -75,8 +81,7 @@ html_theme_options = { "repository_url": "https://github.com/NVIDIA-Merlin/Merlin", "use_repository_button": True, - "footer_content_items": ["copyright.html", "last-updated.html"], - "extra_footer": "", + "footer_content_items": ["copyright.html", "footer.html"], "logo": {"text": "NVIDIA Merlin", "alt_text": "NVIDIA Merlin"}, } html_sidebars = { @@ -100,7 +105,9 @@ # repo (a Git repo) vs SMV reading conf.py from an archive of the repo # at a commit (not a Git repo). if os.path.exists(gitdir): - tag_refs = subprocess.check_output(["git", "tag", "-l", "v*"]).decode("utf-8").split() + tag_refs = ( + subprocess.check_output(["git", "tag", "-l", "v*"]).decode("utf-8").split() + ) tag_refs = [tag for tag in tag_refs if re.match(r"^v[0-9]+.[0-9]+.[0-9]+$", tag)] tag_refs = natsorted(tag_refs)[-6:] smv_tag_whitelist = r"^(" + r"|".join(tag_refs) + r")$"