Skip to content

Commit

Permalink
header
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Mar 29, 2024
1 parent 509c753 commit 28c84a9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 19 deletions.
1 change: 0 additions & 1 deletion config/mkdocs-offline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ nav:
- About:
- 'about/index.md'
- 'about/criteria.md'
- 'about/statistics.md'
- 'about/notices.md'
- 'about/privacy-policy.md'
- Community:
Expand Down
19 changes: 1 addition & 18 deletions theme/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,7 @@
<title>{{ config.site_name }}</title>
{% endif %}
{% endblock %}
{% block announce %}{% if config.extra.offline %}
You're viewing an offline copy of Privacy Guides built on {{ build_date_utc }}.
<a href="https://www.privacyguides.org/">
<strong>Visit privacyguides.org for the latest version.</strong>
</a>
{% elif config.extra.context == "deploy-preview" %}
You're viewing an <strong>unreviewed preview</strong> of Privacy Guides built on {{ build_date_utc }}.
These previews are <strong>user-submitted</strong> and may not necessarily reflect the opinion of the site.
<a href="https://www.privacyguides.org/">
<strong>Visit privacyguides.org for current advice.</strong>
</a>
{% elif config.extra.context == "branch-deploy" %}
You're viewing a <strong>staging branch</strong> 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.
<a href="https://www.privacyguides.org/">
<strong>Visit privacyguides.org for current advice.</strong>
</a>
{% else %}{% endif %}{% endblock %}

{% block extrahead %}
<meta name="robots" content="max-snippet:-1, max-image-preview:large">
{% if config.extra.context == "production" %}
Expand Down
29 changes: 29 additions & 0 deletions theme/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}.
<a href="https://www.privacyguides.org/">
<strong>Visit privacyguides.org for the latest version.</strong>
</a>
{% elif config.extra.context == "deploy-preview" %}
You're viewing an <strong>unreviewed preview</strong> of Privacy Guides built on {{ build_date_utc.strftime('%B %d, %Y at %I:%M%p') }}.
These previews are <strong>user-submitted</strong> and may not necessarily reflect the opinion of the site.
<a href="https://www.privacyguides.org/">
<strong>Visit privacyguides.org for current advice.</strong>
</a>
{% elif config.extra.context == "branch-deploy" %}
You're viewing a <strong>staging branch</strong> 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.
<a href="https://www.privacyguides.org/">
<strong>Visit privacyguides.org for current advice.</strong>
</a>
{% else %}{% endif %}{% endmacro %}

{% if notice() %}
<div data-md-color-scheme="default" data-md-component="outdated">
<aside class="md-banner md-banner--warning">
<div class="md-banner__inner md-grid md-typeset">
{{ notice() }}
</div>
</aside>
</div>
{% endif %}

<!-- Determine classes -->
{% set class = "md-header" %}
{% if "navigation.tabs.sticky" in features %}
Expand Down

0 comments on commit 28c84a9

Please sign in to comment.