This is an automated email from the ASF dual-hosted git repository. skrawcz pushed a commit to branch add_footer in repository https://gitbox.apache.org/repos/asf/hamilton.git
commit 448af4799b18c990d5e728b9f1a67d85abe5f2f0 Author: Stefan Krawczyk <[email protected]> AuthorDate: Sat Jul 5 20:31:09 2025 -0700 Adds incubator logo and ASF info for #1346 This implements #1346 in the quickest way possible. This shoves things into the footer, and then also into the left hand nav-bar. There is a way to create a splash page with the sphinx furo theme, but I didn't explore that. --- docs/_static/apache-incubator-logo.svg | 1 + docs/_static/custom.css | 59 ++++++++++++++++++++++++++++++++++ docs/_templates/layout.html | 8 ----- docs/asf/index.rst | 29 +++++++++++++++++ docs/conf.py | 21 ++++++++++++ docs/index.md | 7 ++++ 6 files changed, 117 insertions(+), 8 deletions(-) diff --git a/docs/_static/apache-incubator-logo.svg b/docs/_static/apache-incubator-logo.svg new file mode 100644 index 00000000..072ab8c2 --- /dev/null +++ b/docs/_static/apache-incubator-logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 473.26 110.22"><defs><style>.cls-1,.cls-2{fill:#fff;}.cls-1{fill-rule:evenodd;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><polygon class="cls-1" points="445.81 13.29 467.03 13.29 467.03 15.29 448.03 15.29 448.03 27.09 465.11 27.09 465.11 29.09 448.03 29.09 448.03 41.1 467.24 41.1 467.24 43.11 445.81 43.11 445.81 13.29"/><polygon class="cls-1" points="377.65 13.29 379.86 13.29 379.86 27.13 3 [...] diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 00000000..ab045a25 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,59 @@ +/* Custom styles for the Apache footer */ +.apache-footer { + background-color: var(--color-background-secondary) !important; + color: var(--color-foreground-secondary) !important; + padding: 1.5rem; + margin-top: 2rem; + border-top: 1px solid var(--color-background-border); +} + +.apache-footer p { + color: var(--color-foreground-secondary) !important; + margin: 0.5rem 0; + font-size: 0.9em; +} + +.apache-footer a { + color: var(--color-link) !important; + text-decoration: none; + border-bottom: 1px solid var(--color-link-underline); +} + +.apache-footer a:hover { + color: var(--color-link--hover) !important; + border-bottom-color: var(--color-link-underline--hover); +} + +/* Base styles that apply to all modes */ +.apache-footer .apache-incubator-logo { + width: 200px !important; + height: auto !important; + margin: 0 auto 1rem auto; + display: block; +} + +/* Light mode - make logo dark */ +[data-theme="light"] .apache-footer .apache-incubator-logo { + filter: invert(0.9) brightness(0.2) contrast(1.2); +} + +/* Dark mode - use original colors */ +[data-theme="dark"] .apache-footer .apache-incubator-logo { + filter: none !important; +} + +/* Override bottom page icons */ +.bottom-of-page .icons svg { + width: 1.5rem !important; + height: 1.5rem !important; + color: var(--color-foreground-muted) !important; +} + +/* Dark mode overrides */ +[data-theme="dark"] .apache-footer { + background-color: var(--color-background-secondary) !important; +} + +[data-theme="dark"] .apache-footer a { + color: var(--color-link) !important; +} diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html deleted file mode 100644 index ba460dcb..00000000 --- a/docs/_templates/layout.html +++ /dev/null @@ -1,8 +0,0 @@ -{# _templates/layout.html #} - -{% extends "!layout.html" %} - -{% block extrahead %} - {{ super() }} - <meta http-equiv="Content-Security-Policy" content="img-src 'self' data: https://www.apache.org/ https://www.apachecon.com/ https://img.shields.io/ https://pepy.tech/ https://static.pepy.tech/;"> -{% endblock %} diff --git a/docs/asf/index.rst b/docs/asf/index.rst new file mode 100644 index 00000000..88e9ef25 --- /dev/null +++ b/docs/asf/index.rst @@ -0,0 +1,29 @@ +================ +ASF +================ + +Apache Software Foundation links. + +.. toctree:: + :maxdepth: 1 + :caption: ASF Links + :glob: + :hidden: + + Apache Software Foundation <https://www.apache.org/> + License <https://www.apache.org/licenses/> + Events <https://www.apache.org/events/current-event.html> + Privacy <https://privacy.apache.org/policies/privacy-policy-public.html> + Security <https://www.apache.org/security/> + Sponsorship <https://www.apache.org/foundation/sponsorship.html> + Thanks <https://www.apache.org/foundation/thanks.html> + Code of Conduct <https://www.apache.org/foundation/policies/conduct.html> + +- `Foundation <https://www.apache.org/>`_ +- `License <https://www.apache.org/licenses/>`_ +- `Events <https://www.apache.org/events/current-event.html>`_ +- `Privacy <https://privacy.apache.org/policies/privacy-policy-public.html>`_ +- `Security <https://www.apache.org/security/>`_ +- `Sponsorship <https://www.apache.org/foundation/sponsorship.html>`_ +- `Thanks <https://www.apache.org/foundation/thanks.html>`_ +- `Code of Conduct <https://www.apache.org/foundation/policies/conduct.html>`_ diff --git a/docs/conf.py b/docs/conf.py index 74eee205..44681b6b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,6 +6,19 @@ import sys # required to get reference documentation to be built sys.path.insert(0, os.path.abspath("..")) +apache_footer = """ +<div class="apache-footer"> + <img width="200" src="/_static/apache-incubator-logo.svg" alt="Apache Incubator Logo" class="apache-incubator-logo"> + <div class="apache-notice"> + <p>Apache Hamilton is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that [...] + </div> + <div class="apache-copyright"> + <p>Apache, the names of Apache projects, and the feather logo are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries.</p> + </div> +</div> +""" + +copyright = "The Apache Software Foundation, Licensed under the Apache License, Version 2.0." project = "Hamilton" html_theme = "furo" @@ -24,12 +37,20 @@ html_theme_options = { "color-announcement-background": "#ffba00", "color-announcement-text": "#091E42", }, + "footer_icons": [ + { + "name": "Apache Stuff", + "html": apache_footer, + "url": "https://incubator.apache.org/", + }, + ], } html_static_path = ["_static"] templates_path = ['_templates'] html_css_files = [ "testimonials.css", + "custom.css", ] extensions = [ "sphinx.ext.autodoc", diff --git a/docs/index.md b/docs/index.md index 1005734b..b88d3b61 100644 --- a/docs/index.md +++ b/docs/index.md @@ -45,6 +45,13 @@ reference/dataflows/index reference/disabling-telemetry.md ``` +```{toctree} +:hidden: True +:caption: ASF + +asf/index +``` + ```{toctree} :hidden: True :caption: EXTERNAL RESOURCES
