From 28c84a9e0325eaf9647079988543684912c41355 Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Thu, 28 Mar 2024 22:33:11 -0500 Subject: [PATCH] header --- config/mkdocs-offline.yml | 1 - theme/main.html | 19 +------------------ theme/partials/header.html | 29 +++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/config/mkdocs-offline.yml b/config/mkdocs-offline.yml index 384dc69fd4..431bd59afe 100644 --- a/config/mkdocs-offline.yml +++ b/config/mkdocs-offline.yml @@ -145,7 +145,6 @@ nav: - About: - 'about/index.md' - 'about/criteria.md' - - 'about/statistics.md' - 'about/notices.md' - 'about/privacy-policy.md' - Community: diff --git a/theme/main.html b/theme/main.html index 9eb5ccd7b5..cc2054da74 100644 --- a/theme/main.html +++ b/theme/main.html @@ -69,24 +69,7 @@ {{ config.site_name }} {% endif %} {% endblock %} -{% block announce %}{% if config.extra.offline %} - You're viewing an offline copy of Privacy Guides built on {{ build_date_utc }}. - - Visit privacyguides.org for the latest version. - -{% elif config.extra.context == "deploy-preview" %} - You're viewing an unreviewed preview of Privacy Guides built on {{ build_date_utc }}. - These previews are user-submitted and may not necessarily reflect the opinion of the site. - - Visit privacyguides.org for current advice. - -{% elif config.extra.context == "branch-deploy" %} - You're viewing a staging branch of Privacy Guides built on {{ build_date_utc }}. - The information on this page may be incomplete or otherwise not yet meet our editorial release standards. - - Visit privacyguides.org for current advice. - -{% else %}{% endif %}{% endblock %} + {% block extrahead %} {% if config.extra.context == "production" %} diff --git a/theme/partials/header.html b/theme/partials/header.html index 2ce3b75982..b4516c3bc6 100644 --- a/theme/partials/header.html +++ b/theme/partials/header.html @@ -21,6 +21,35 @@ IN THE SOFTWARE. --> +{% macro notice() %}{% if config.extra.offline %} + You're viewing an offline copy of Privacy Guides built on {{ build_date_utc.strftime('%B %d, %Y at %I:%M%p') }}. + + Visit privacyguides.org for the latest version. + +{% elif config.extra.context == "deploy-preview" %} + You're viewing an unreviewed preview of Privacy Guides built on {{ build_date_utc.strftime('%B %d, %Y at %I:%M%p') }}. + These previews are user-submitted and may not necessarily reflect the opinion of the site. + + Visit privacyguides.org for current advice. + +{% elif config.extra.context == "branch-deploy" %} + You're viewing a staging branch of Privacy Guides built on {{ build_date_utc.strftime('%B %d, %Y at %I:%M%p') }}. + The information on this page may be incomplete or otherwise not yet meet our editorial release standards. + + Visit privacyguides.org for current advice. + +{% else %}{% endif %}{% endmacro %} + +{% if notice() %} +
+ +
+{% endif %} + {% set class = "md-header" %} {% if "navigation.tabs.sticky" in features %}