1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-07-02 01:32:41 +00:00

Enable new mkdocs-material features (#2451)

Signed-off-by: Daniel Gray <dngray@privacyguides.org>
This commit is contained in:
2024-04-05 10:44:23 +00:00
committed by Daniel Gray
parent cca4759612
commit cf43545f57
25 changed files with 599 additions and 359 deletions

View File

@ -69,66 +69,17 @@
<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" %}
<meta http-equiv="onion-location" content="{{ "http://www.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/" ~ config.theme.language ~ "/" ~ page.url }}" />
{% elif config.extra.deploy %}
<meta http-equiv="onion-location" content="{{ "http://" ~ config.extra.deploy ~ ".netlify.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/" ~ config.theme.language ~ "/" ~ page.url }}" />
{% endif %}
{% if page and page.meta and page.meta.schema %}
<script type="application/ld+json">
{{ page.meta.schema|tojson }}
</script>
{% endif %}{% endblock %}
{% block content %}
{% if page and page.meta and page.meta.cover %}
<div class="center-cropped" style="background-image:linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/en/assets/img/cover/{{ page.meta.cover }}');">
<h1>{{ page.title | d(config.site_name, true)}}</h1>
<img src="/en/assets/img/cover/{{ page.meta.cover }}" alt="">
</div>
{% endif %}
{% if "material/tags" in config.plugins %}
{% include "partials/tags.html" %}
{% endif %}
{% include "partials/actions.html" %}
{% if "\x3ch1" not in page.content and not page.meta.cover %}
<h1>{{ page.title | d(config.site_name, true)}}</h1>
{% endif %}
{{ page.content }}
{% include "partials/source-file.html" %}
{% include "partials/feedback.html" %}
{% if config.theme.language == "en" %}
<hr>
<h2 class="md-feedback__title">Share this website and spread privacy knowledge</h2>
<p><input class="admonition quote social-share-text" id="share" type="text" value="Privacy Guides: https://www.privacyguides.org - Cybersecurity resources and privacy-focused tools to protect yourself online" onclick="select()" readonly=""></p>
<p><em>Copy this text to easily share Privacy Guides with your friends and family on any social network!</em></p>
{% elif config.extra.translation_notice %}
<div class="admonition info">
<p>{{ config.extra.translation_notice }} <strong><a href="https://crowdin.com/project/privacyguides">{{ config.extra.translation_notice_cta }}</a></strong></p>
<p>You're viewing the {{ config.extra.translation_notice_language }} copy of Privacy Guides, translated by our fantastic language team on <a href="https://crowdin.com/project/privacyguides">Crowdin</a>. If you notice an error, or see any untranslated sections on this page, please consider <a href="https://matrix.to/#/#pg-i18n:aragon.sh">helping out!</a></p>
</div>
{% endif %}
{% include "partials/comments.html" %}
<meta name="robots" content="max-snippet:-1, max-image-preview:large">
{% if config.extra.context == "production" %}
<meta http-equiv="onion-location" content="{{ "http://www.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/" ~ config.theme.language ~ "/" ~ page.url }}" />
{% elif config.extra.deploy %}
<meta http-equiv="onion-location" content="{{ "http://" ~ config.extra.deploy ~ ".netlify.xoe4vn5uwdztif6goazfbmogh6wh5jc4up35bqdflu6bkdc5cas5vjqd.onion/" ~ config.theme.language ~ "/" ~ page.url }}" />
{% endif %}
{% if page and page.meta and page.meta.schema %}
<script type="application/ld+json">
{{ page.meta.schema|tojson }}
</script>
{% endif %}
{% endblock %}