From 66efe4a27fe9ff45aff5aad5e9de2594fd3745c1 Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Mon, 27 Feb 2023 22:17:50 -0600 Subject: [PATCH] Adjust mobile width issues (#2051) --- docs/assets/stylesheets/extra.css | 4 ++-- docs/assets/stylesheets/home.css | 33 +++++++++++++++++++++++++++++++ docs/index.en.md | 29 ++++++++++----------------- mkdocs.yml | 1 + theme/overrides/home.en.html | 2 +- theme/partials/header.html | 28 +++++++++++++------------- 6 files changed, 61 insertions(+), 36 deletions(-) diff --git a/docs/assets/stylesheets/extra.css b/docs/assets/stylesheets/extra.css index 7f62409f..0113f9a5 100644 --- a/docs/assets/stylesheets/extra.css +++ b/docs/assets/stylesheets/extra.css @@ -319,8 +319,8 @@ details[class="downloads annotate"] > p .md-annotation span span::before { color: var(--pg-blue-gray); } -/* Make light/dark mode icon smaller */ -label[class="md-header__button md-icon"] svg { +/* Make header icons smaller */ +.md-header__button.md-icon svg { height: 1rem; width: 1rem; } diff --git a/docs/assets/stylesheets/home.css b/docs/assets/stylesheets/home.css index e2ccd870..2d11f0f1 100644 --- a/docs/assets/stylesheets/home.css +++ b/docs/assets/stylesheets/home.css @@ -67,3 +67,36 @@ nav[class="md-tabs"] { border-bottom: none; } + +/* Homepage Body */ +.md-typeset a.headerlink { + display: none; +} +article.md-content__inner { + max-width: 50rem; + margin: auto; + padding-bottom: 3rem; +} +article.md-content__inner > * { + max-width: 38rem; +} +article.md-content__inner > *:nth-child(n+7):nth-child(-n+11) { + margin-left: auto; + margin-right: 0; + text-align: right; +} +article.md-content__inner > hr { + margin: 3rem; +} +article.md-content__inner > *:nth-child(n+12) { + margin-left: auto; + margin-right: auto; + text-align: center; +} +article.md-content__inner > *:nth-child(n+12) a:has(.twemoji) { + display: inline-block; +} +article.md-content__inner > *:nth-child(n+12) .twemoji { + --md-icon-size: 1.8em; + margin: 0.4rem; +} diff --git a/docs/index.en.md b/docs/index.en.md index e18fdcdd..888d64f4 100644 --- a/docs/index.en.md +++ b/docs/index.en.md @@ -6,8 +6,6 @@ hide: - feedback --- -
-
## Why should I care? ##### “I have nothing to hide. Why should I care about my privacy?” @@ -17,9 +15,7 @@ Much like the right to interracial marriage, woman's suffrage, freedom of speech You shouldn't confuse privacy with secrecy. We know what happens in the bathroom, but you still close the door. That's because you want privacy, not secrecy. **Everyone** has something to protect. Privacy is something that makes us human. [:material-target-account: Common Internet Threats](basics/common-threats.md){ .md-button .md-button--primary } -
-
## What should I do? ##### First, you need to make a plan @@ -29,24 +25,19 @@ Trying to protect all your data from everyone all the time is impractical, expen ==This process of identifying threats and defining countermeasures is called **threat modeling**==, and it forms the basis of every good security and privacy plan. [:material-book-outline: Learn More About Threat Modeling](basics/threat-modeling.md){ .md-button .md-button--primary } -
-
-
+--- + ## We need you! Here's how to get involved: +[:simple-discourse:](https://discuss.privacyguides.net/){ title="Join our Forum" } +[:simple-mastodon:](https://mastodon.neat.computer/@privacyguides){ rel=me title="Follow us on Mastodon" } +[:material-book-edit:](https://github.com/privacyguides/privacyguides.org){ title="Contribute to this website" } +[:material-translate:](https://matrix.to/#/#pg-i18n:aragon.sh){ title="Help translate this website" } +[:simple-matrix:](https://matrix.to/#/#privacyguides:matrix.org){ title="Chat with us on Matrix" } +[:material-information-outline:](about/index.md){ title="Learn more about us" } +[:material-hand-coin-outline:](about/donate.md){ title="Support the project" } + It's important for a website like Privacy Guides to always stay up-to-date. We need our audience to keep an eye on software updates for the applications listed on our site and follow recent news about providers that we recommend. It's hard to keep up with the fast pace of the internet, but we try our best. If you spot an error, think a provider should not be listed, notice a qualified provider is missing, believe a browser plugin is no longer the best choice, or uncover any other issue, please let us know. -
- -- [:simple-discourse: Join our forum](https://discuss.privacyguides.net/) -- [:simple-mastodon: Follow us on Mastodon](https://mastodon.neat.computer/@privacyguides){ rel=me } -- [:material-book-edit: Contribute to this website](https://github.com/privacyguides/privacyguides.org) -- [:simple-matrix: Chat with us on Matrix](https://matrix.to/#/#privacyguides:matrix.org) -- [:material-information-outline: Learn more about us](about/index.md) -- [:material-hand-coin-outline: Support the project](about/donate.md) - -
-
- --8<-- "includes/abbreviations.en.txt" diff --git a/mkdocs.yml b/mkdocs.yml index 6df097f7..f2f5ac59 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -53,6 +53,7 @@ watch: plugins: i18n: default_language: en + default_language_only: !ENV [FAST, false] material_alternate: true languages: en: diff --git a/theme/overrides/home.en.html b/theme/overrides/home.en.html index 5851b396..bf86298b 100644 --- a/theme/overrides/home.en.html +++ b/theme/overrides/home.en.html @@ -1,6 +1,6 @@ {% extends "main.html" %} {% block extrahead %} - + {{ super() }} {% endblock %} {% block tabs %} diff --git a/theme/partials/header.html b/theme/partials/header.html index 08ba6a89..e9c65992 100644 --- a/theme/partials/header.html +++ b/theme/partials/header.html @@ -39,20 +39,6 @@ {% include "partials/search.html" %} {% endif %} - {% if not config.theme.palette is mapping %} -
- {% for option in config.theme.palette %} - {% set primary = option.primary | replace(" ", "-") | lower %} - {% set accent = option.accent | replace(" ", "-") | lower %} - - {% if option.toggle %} - - {% endif %} - {% endfor %} -
- {% endif %} {% if config.extra.alternate %}
@@ -74,6 +60,20 @@
{% endif %} + {% if not config.theme.palette is mapping %} +
+ {% for option in config.theme.palette %} + {% set primary = option.primary | replace(" ", "-") | lower %} + {% set accent = option.accent | replace(" ", "-") | lower %} + + {% if option.toggle %} + + {% endif %} + {% endfor %} +
+ {% endif %} {% if "navigation.tabs.sticky" in features %} {% if "navigation.tabs" in features %}