mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-07-02 09:42:35 +00:00
Enable new mkdocs-material features (#2451)
Signed-off-by: Daniel Gray <dngray@privacyguides.org>
This commit is contained in:
64
theme/partials/content.html
Normal file
64
theme/partials/content.html
Normal file
@ -0,0 +1,64 @@
|
||||
<!--
|
||||
Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com>
|
||||
Copyright (c) 2024 Jonah Aragon <jonah@triplebit.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
{% 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 }}');">
|
||||
<img src="/en/assets/img/cover/{{ page.meta.cover }}" alt="">
|
||||
</div>
|
||||
<h1 style="margin-top: 50px; text-align: center">{{ page.title | d(config.site_name, true)}}</h1>
|
||||
{% endif %}
|
||||
|
||||
<!-- Tags -->
|
||||
{% include "partials/tags.html" %}
|
||||
|
||||
<!-- Actions -->
|
||||
{% 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 -->
|
||||
{{ page.content }}
|
||||
|
||||
<!-- Source file information -->
|
||||
{% include "partials/source-file.html" %}
|
||||
|
||||
<!-- Was this page helpful? -->
|
||||
{% include "partials/feedback.html" %}
|
||||
|
||||
{% set translation_notice = config.extra.privacy_guides.translation_notice %}
|
||||
{% if config.theme.language == "fr" %}
|
||||
<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 translation_notice %}
|
||||
<div class="admonition info">
|
||||
<p>{{ translation_notice.notice }} <strong><a href="https://crowdin.com/project/privacyguides">{{ translation_notice.cta }}</a></strong></p>
|
||||
<p>You're viewing the {{ 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 %}
|
||||
|
||||
<!-- Comment system -->
|
||||
{% include "partials/comments.html" %}
|
@ -1,6 +1,5 @@
|
||||
<!-- {#
|
||||
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
|
||||
Copyright (c) 2023 Jonah Aragon <jonah@triplebit.net>
|
||||
<!--
|
||||
Copyright (c) 2024 Jonah Aragon <jonah@triplebit.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
@ -19,16 +18,26 @@
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
#} -->
|
||||
<footer class="md-footer">
|
||||
<div class="md-footer-meta md-typeset">
|
||||
<div class="md-footer-meta__inner md-grid">
|
||||
{% include "partials/copyright.html" %}
|
||||
-->
|
||||
{% set copyright = config.extra.privacy_guides.footer %}
|
||||
|
||||
<!-- Social links -->
|
||||
{% if config.extra.social %}
|
||||
{% include "partials/social.html" %}
|
||||
{% endif %}
|
||||
<!-- Copyright information -->
|
||||
<div class="md-copyright">
|
||||
{% if copyright %}
|
||||
<div class="md-copyright__highlight">
|
||||
{{ copyright.intro }}
|
||||
<br />
|
||||
{{ copyright.note }}
|
||||
<br />
|
||||
<a href='/license'>
|
||||
{% for icon in copyright.license %}
|
||||
<span class="twemoji">{% include ".icons/" ~ icon ~ ".svg" %}</span>
|
||||
{% endfor %}
|
||||
</a>
|
||||
{{ copyright.copyright.date }} {{ copyright.copyright.author }}
|
||||
<a href='#__consent'>
|
||||
{{ copyright.analytics }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{% endif %}
|
||||
</div>
|
@ -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 %}
|
||||
|
Reference in New Issue
Block a user