From 525a2c1137f36170f8ba14892305dc3e76c44a78 Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Thu, 28 Mar 2024 15:09:58 -0500 Subject: [PATCH] Update mkdocs-material-insiders (#2449) --- .cache/plugin/social/fonts/Bagnard/Bold.woff | 1 - .github/dependabot.yml | 4 +- .github/workflows/crowdin-upload.yml | 2 +- .github/workflows/release.yml | 2 +- .gitignore | 20 ++--- Pipfile | 2 +- Pipfile.lock | 46 +++++------ config/.cache/plugin/social/fonts | 1 + config/layouts/home.yml | 4 +- config/layouts/page.yml | 2 +- config/layouts/pride.yml | 4 +- config/mkdocs-common.yml | 8 +- config/mkdocs-offline.yml | 4 +- config/mkdocs.en.yml | 4 +- docs/about/index.md | 4 +- docs/index.md | 2 +- modules/mkdocs-material | 2 +- theme/assets/brand | 2 +- theme/assets/files/meta/browserconfig.xml | 2 +- theme/assets/files/meta/site.webmanifest | 4 +- theme/assets/stylesheets/extra.css | 18 +++-- theme/main.html | 2 +- theme/partials/alternate.html | 51 +++++++++++++ theme/partials/header.html | 80 ++++---------------- theme/partials/logo.html | 8 +- 25 files changed, 142 insertions(+), 137 deletions(-) delete mode 120000 .cache/plugin/social/fonts/Bagnard/Bold.woff create mode 120000 config/.cache/plugin/social/fonts create mode 100644 theme/partials/alternate.html diff --git a/.cache/plugin/social/fonts/Bagnard/Bold.woff b/.cache/plugin/social/fonts/Bagnard/Bold.woff deleted file mode 120000 index 6b5e0b8a5b..0000000000 --- a/.cache/plugin/social/fonts/Bagnard/Bold.woff +++ /dev/null @@ -1 +0,0 @@ -../../../../../theme/assets/brand/WOFF/bagnard/Bagnard.woff \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 729929ef9d..30be8a1871 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -34,7 +34,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" schedule: - interval: "daily" + interval: "monthly" assignees: - "jonaharagon" reviewers: @@ -48,7 +48,7 @@ updates: registries: - github-privacyguides schedule: - interval: "daily" + interval: "monthly" labels: - "fix:submodules" diff --git a/.github/workflows/crowdin-upload.yml b/.github/workflows/crowdin-upload.yml index 994d54aab5..aa8d49857a 100644 --- a/.github/workflows/crowdin-upload.yml +++ b/.github/workflows/crowdin-upload.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v4 - name: crowdin action - uses: crowdin/github-action@v1.20.0 + uses: crowdin/github-action@v1.20.1 with: upload_sources: true upload_sources_args: '--auto-update --delete-obsolete' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 341e13c715..1fea9be0ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,7 +105,7 @@ jobs: image: ghcr.io/openzim/zim-tools:3.1.3 options: -v ${{ github.workspace }}:/data run: | - zimwriterfs -w index.html -I assets/brand/PNG/Square/pg-yellow.png -l eng -t "Privacy Guides" -d "Your central privacy and security resource to protect yourself online." -c "Privacy Guides" -p "Jonah Aragon" -n "Privacy Guides" -e "https://github.com/privacyguides/privacyguides.org" /data/site /data/privacy_guides.zim + zimwriterfs -w index.html -I assets/brand/logos/png/square/pg-yellow.png -l eng -t "Privacy Guides" -d "Your central privacy and security resource to protect yourself online." -c "Privacy Guides" -p "Jonah Aragon" -n "Privacy Guides" -e "https://github.com/privacyguides/privacyguides.org" /data/site /data/privacy_guides.zim - name: Upload ZIM file uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore index da2ca3d285..03882f4d98 100644 --- a/.gitignore +++ b/.gitignore @@ -6,17 +6,17 @@ site !/static/i18n/*.en.* /theme/overrides/* !/theme/overrides/*.en.* -# include Bagnard font in social card -# (not available in Google Fonts) +# commit social card fonts to repo +# see: https://github.com/squidfunk/mkdocs-material/issues/6983 # ridiculous hide-and-seek https://stackoverflow.com/a/72380673 -/.cache/* -!/.cache/plugin -/.cache/plugin/* -!/.cache/plugin/social -/.cache/plugin/social/* -!/.cache/plugin/social/fonts -/.cache/plugin/social/fonts/* -!/.cache/plugin/social/fonts/Bagnard +.cache/* +!/config/.cache +/config/.cache/* +!/config/.cache/plugin +/config/.cache/plugin/* +!/config/.cache/plugin/social +/config/.cache/plugin/social/* +!/config/.cache/plugin/social/fonts # Editor settings .vscode/* diff --git a/Pipfile b/Pipfile index 89500095c9..55e418b4d1 100644 --- a/Pipfile +++ b/Pipfile @@ -27,7 +27,7 @@ name = "pypi" mkdocs-material = {path = "./modules/mkdocs-material"} mkdocs-git-revision-date-localized-plugin = "~=1.2" mkdocs-git-committers-plugin-2 = "~=1.1" -mkdocs-macros-plugin = "~=0.7" +mkdocs-macros-plugin = "~=1.0" pillow = "~=10.0" cairosvg = "~=2.7" diff --git a/Pipfile.lock b/Pipfile.lock index 87d57949ff..ccadb0e78d 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "03df3173072f5e381b83f41c792a9add45bf2c18f0dfcb7073673fbb6e21063c" + "sha256": "fd39f7100d809e16f8cc4d8a332f0c2b41f10db166678f87c06e23c795383768" }, "pipfile-spec": 6, "requires": { @@ -275,11 +275,11 @@ }, "importlib-metadata": { "hashes": [ - "sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e", - "sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc" + "sha256:30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", + "sha256:b78938b926ee8d5f020fc4772d487045805a55ddbad2ecf21c6d60938dc7fcd2" ], "markers": "python_version < '3.10'", - "version": "==7.0.1" + "version": "==7.1.0" }, "jinja2": { "hashes": [ @@ -375,11 +375,11 @@ }, "markdown": { "hashes": [ - "sha256:d43323865d89fc0cb9b20c75fc8ad313af307cc087e84b657d9eec768eddeadd", - "sha256:e1ac7b3dc550ee80e602e71c1d168002f062e49f1b11e26a36264dafd4df2ef8" + "sha256:48f276f4d8cfb8ce6527c8f79e2ee29708508bf4d40aa410fbc3b4ee832c850f", + "sha256:ed4f41f6daecbeeb96e576ce414c41d2d876daa9a16cb35fa8ed8c2ddfad0224" ], "markers": "python_version >= '3.8'", - "version": "==3.5.2" + "version": "==3.6" }, "markupsafe": { "hashes": [ @@ -481,15 +481,15 @@ }, "mkdocs-macros-plugin": { "hashes": [ - "sha256:96bdabeb98b96139544f0048ea2f5cb80c7befde6b21e94c6d4596c22774cbcf", - "sha256:9e64e1cabcf6925359de29fe54f62d5847fb455c2528c440b87f8f1240650608" + "sha256:f60e26f711f5a830ddf1e7980865bf5c0f1180db56109803cdd280073c1a050a", + "sha256:fe348d75f01c911f362b6d998c57b3d85b505876dde69db924f2c512c395c328" ], "index": "pypi", - "version": "==0.7.0" + "version": "==1.0.5" }, "mkdocs-material": { "path": "./modules/mkdocs-material", - "version": "==9.4.5+insiders.4.42.1" + "version": "==9.5.15+insiders.4.53.3" }, "mkdocs-material-extensions": { "hashes": [ @@ -501,11 +501,11 @@ }, "packaging": { "hashes": [ - "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5", - "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7" + "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5", + "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9" ], "markers": "python_version >= '3.7'", - "version": "==23.2" + "version": "==24.0" }, "paginate": { "hashes": [ @@ -620,19 +620,19 @@ }, "pymdown-extensions": { "hashes": [ - "sha256:6ca215bc57bc12bf32b414887a68b810637d039124ed9b2e5bd3325cbb2c050c", - "sha256:c0d64d5cf62566f59e6b2b690a4095c931107c250a8c8e1351c1de5f6b036deb" + "sha256:c70e146bdd83c744ffc766b4671999796aba18842b268510a329f7f64700d584", + "sha256:f5cc7000d7ff0d1ce9395d216017fa4df3dde800afb1fb72d1c7d3fd35e710f4" ], "markers": "python_version >= '3.8'", - "version": "==10.7" + "version": "==10.7.1" }, "python-dateutil": { "hashes": [ - "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", - "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" + "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", + "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.8.2" + "version": "==2.9.0.post0" }, "pytz": { "hashes": [ @@ -906,11 +906,11 @@ }, "zipp": { "hashes": [ - "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31", - "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0" + "sha256:206f5a15f2af3dbaee80769fb7dc6f249695e940acca08dfb2a4769fe61e538b", + "sha256:2884ed22e7d8961de1c9a05142eb69a247f120291bc0206a00a7642f09b5b715" ], "markers": "python_version >= '3.8'", - "version": "==3.17.0" + "version": "==3.18.1" } }, "develop": { diff --git a/config/.cache/plugin/social/fonts b/config/.cache/plugin/social/fonts new file mode 120000 index 0000000000..cabf5b9b97 --- /dev/null +++ b/config/.cache/plugin/social/fonts @@ -0,0 +1 @@ +../../../../theme/assets/brand/fonts \ No newline at end of file diff --git a/config/layouts/home.yml b/config/layouts/home.yml index 8429d9f1e4..a859b4532d 100644 --- a/config/layouts/home.yml +++ b/config/layouts/home.yml @@ -23,7 +23,7 @@ definitions: - &page_title_with_site_name >- {{ page.meta.get("title", page.title) }} - + - &page_description >- {{ config.extra.homepage_description or "A socially motivated website which provides information about protecting your online data privacy and security." }} @@ -83,7 +83,7 @@ layers: font: family: *title_font_family style: Bold - + # Page description - size: { width: 864, height: 192 } offset: { x: 64, y: 320 } diff --git a/config/layouts/page.yml b/config/layouts/page.yml index 5142259d96..3223f747ad 100644 --- a/config/layouts/page.yml +++ b/config/layouts/page.yml @@ -56,7 +56,7 @@ definitions: - &logo >- {%- if page.meta.cover -%} - theme/assets/brand/SVG/Logo/privacy-guides-logo-notext.svg + theme/assets/brand/logos/svg/logo/privacy-guides-logo-notext.svg {%- elif config.theme.logo -%} {{ config.docs_dir }}/{{ config.theme.logo }} {%- endif -%} diff --git a/config/layouts/pride.yml b/config/layouts/pride.yml index 785269159c..d245510e4d 100644 --- a/config/layouts/pride.yml +++ b/config/layouts/pride.yml @@ -4,7 +4,7 @@ definitions: {%- if page.meta.cover -%} theme/assets/img/cover/{{ page.meta.cover }} {%- else -%} - {{ layout.background_image or "theme/assets/brand/PNG/Banner/cover-progress-notext-blur.png" }} + {{ layout.background_image or "theme/assets/brand/images/png/cover-progress-notext-blur.png" }} {%- endif -%} - &background_color >- @@ -51,7 +51,7 @@ definitions: {{ page.meta.icon or "" }} - &logo >- - theme/assets/brand/SVG/Logo/privacy-guides-logo-notext.svg + theme/assets/brand/logos/svg/logo/privacy-guides-logo-notext.svg # Meta tags tags: diff --git a/config/mkdocs-common.yml b/config/mkdocs-common.yml index 84f688465b..67c832675f 100644 --- a/config/mkdocs-common.yml +++ b/config/mkdocs-common.yml @@ -77,8 +77,8 @@ repo_name: "" theme: name: material custom_dir: ../theme - logo: ../../theme/assets/brand/SVG/Logo/privacy-guides-logo-notext-colorbg.svg - favicon: assets/brand/png/favicon/favicon-32x32.png + logo: ../../theme/assets/brand/logos/svg/logo/privacy-guides-logo-notext-colorbg.svg + favicon: assets/brand/logos/png/favicon-32x32.png icon: repo: simple/github features: @@ -156,8 +156,8 @@ markdown_extensions: meta: {} abbr: {} pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg tables: {} footnotes: {} toc: diff --git a/config/mkdocs-offline.yml b/config/mkdocs-offline.yml index 9d0ac14072..384dc69fd4 100644 --- a/config/mkdocs-offline.yml +++ b/config/mkdocs-offline.yml @@ -43,7 +43,7 @@ extra: theme: language: en # this logo needs to be set separately because the relative path is different - logo: ../theme/assets/brand/SVG/Logo/privacy-guides-logo-notext-colorbg.svg + logo: ../theme/assets/brand/logos/svg/logo/privacy-guides-logo-notext-colorbg.svg font: text: Public Sans code: DM Mono @@ -82,7 +82,7 @@ plugins: markdown_extensions: pymdownx.snippets: - auto_append: + auto_append: - includes/abbreviations.en.txt nav: diff --git a/config/mkdocs.en.yml b/config/mkdocs.en.yml index 2570ed61af..f0dc606ec3 100644 --- a/config/mkdocs.en.yml +++ b/config/mkdocs.en.yml @@ -40,7 +40,7 @@ extra: theme: language: en # ENGLISH ONLY: this logo needs to be set separately because the relative path is different - logo: ../theme/assets/brand/SVG/Logo/privacy-guides-logo-notext-colorbg.svg + logo: ../theme/assets/brand/logos/svg/logo/privacy-guides-logo-notext-colorbg.svg font: text: Public Sans code: DM Mono @@ -66,7 +66,7 @@ theme: markdown_extensions: pymdownx.snippets: - auto_append: + auto_append: - includes/abbreviations.en.txt nav: diff --git a/docs/about/index.md b/docs/about/index.md index 2015965576..bcbf465963 100644 --- a/docs/about/index.md +++ b/docs/about/index.md @@ -7,7 +7,7 @@ schema: "@id": https://www.privacyguides.org/ name: Privacy Guides url: https://www.privacyguides.org/en/about/ - logo: https://www.privacyguides.org/en/assets/brand/png/square/pg-yellow.png + logo: https://www.privacyguides.org/en/assets/brand/logos/png/square/pg-yellow.png sameAs: - https://twitter.com/privacy_guides - https://github.com/privacyguides @@ -16,7 +16,7 @@ schema: - https://www.youtube.com/@privacyguides - https://mastodon.neat.computer/@privacyguides --- -![Privacy Guides logo](../assets/brand/PNG/Square/pg-yellow.png){ align=right } +![Privacy Guides logo](../assets/brand/logos/png/square/pg-yellow.png){ align=right } **Privacy Guides** is a socially motivated website that provides [information](/kb) for protecting your data security and privacy. Our mission is to inform the public about the value of digital privacy, and global government initiatives which aim to monitor your online activity. We are a non-profit collective operated entirely by volunteer [team members](https://discuss.privacyguides.net/g/team) and contributors. Our website is free of advertisements and not affiliated with any of the listed providers. diff --git a/docs/index.md b/docs/index.md index e359cae5e0..3a02513ba6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,7 +14,7 @@ schema: "@id": https://www.privacyguides.org/ name: Privacy Guides url: https://www.privacyguides.org/en/about/ - logo: https://www.privacyguides.org/en/assets/brand/png/square/pg-yellow.png + logo: https://www.privacyguides.org/en/assets/brand/logos/png/square/pg-yellow.png sameAs: - https://twitter.com/privacy_guides - https://github.com/privacyguides diff --git a/modules/mkdocs-material b/modules/mkdocs-material index 4e376c447e..4ff6a57215 160000 --- a/modules/mkdocs-material +++ b/modules/mkdocs-material @@ -1 +1 @@ -Subproject commit 4e376c447edc27d62b0980c152d4c877ff75689d +Subproject commit 4ff6a572151f684fe2e21527582e1096a88805d0 diff --git a/theme/assets/brand b/theme/assets/brand index 3a142da11d..67166ed8b6 160000 --- a/theme/assets/brand +++ b/theme/assets/brand @@ -1 +1 @@ -Subproject commit 3a142da11d7a1e784d18011134510933fd2406f0 +Subproject commit 67166ed8b641d8ac1837d0b75329e02ed4056704 diff --git a/theme/assets/files/meta/browserconfig.xml b/theme/assets/files/meta/browserconfig.xml index 8576713b0d..0fad9b38a7 100644 --- a/theme/assets/files/meta/browserconfig.xml +++ b/theme/assets/files/meta/browserconfig.xml @@ -2,7 +2,7 @@ - + #ffd06f diff --git a/theme/assets/files/meta/site.webmanifest b/theme/assets/files/meta/site.webmanifest index 58ff8a1bf5..1e7e6d38a2 100644 --- a/theme/assets/files/meta/site.webmanifest +++ b/theme/assets/files/meta/site.webmanifest @@ -3,12 +3,12 @@ "short_name": "Privacy Guides", "icons": [ { - "src": "/assets/brand/PNG/Favicon/android-chrome-192x192.png", + "src": "/en/assets/brand/logos/png/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { - "src": "/assets/brand/PNG/Favicon/android-chrome-512x512.png", + "src": "/en/assets/brand/logos/png/android-chrome-192x192.png", "sizes": "512x512", "type": "image/png" } diff --git a/theme/assets/stylesheets/extra.css b/theme/assets/stylesheets/extra.css index d84c22610e..c4c7e46390 100644 --- a/theme/assets/stylesheets/extra.css +++ b/theme/assets/stylesheets/extra.css @@ -22,7 +22,7 @@ @font-face { font-family: 'Bagnard'; - src: url("/en/assets/brand/WOFF/bagnard/Bagnard.woff") format("woff"); + src: url("/en/assets/brand/fonts/Bagnard/Bold.woff") format("woff"); font-display: swap; } @@ -263,7 +263,7 @@ details[class="downloads annotate"] > p .md-annotation span span::before { .yt-embed { position: relative; width: 100%; - padding-bottom: 56.25%; + padding-bottom: 56.25%; height: 0; } @@ -319,9 +319,17 @@ details[class="downloads annotate"] > p .md-annotation span span::before { margin-right: 1%; } +.md-select__inner { + left: 0%; +} + +.md-select__inner:after { + display: none; +} + /* Custom header + nav */ .md-header >*, .md-tabs { - background: none; + background: none; } [data-md-color-scheme="slate"] .md-header >*, [data-md-color-scheme="slate"] .md-tabs { @@ -365,7 +373,7 @@ details[class="downloads annotate"] > p .md-annotation span span::before { color: var(--md-typeset-a-color) } -@media screen and (max-width: 59.9375em) { +@media screen and (max-width: 59.9375em) { .md-nav__source { display: none; } @@ -487,7 +495,7 @@ path[d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l- text-align: center; border-radius: 0.5em; } - + /* Set the image to fill its parent and make transparent */ .center-cropped img { min-height: 100%; diff --git a/theme/main.html b/theme/main.html index 45d8d886b3..9eb5ccd7b5 100644 --- a/theme/main.html +++ b/theme/main.html @@ -103,7 +103,7 @@ {% if page and page.meta and page.meta.cover %}

{{ page.title | d(config.site_name, true)}}

- {{ page.title | d(config.site_name, true)}} cover image +
{% endif %} {% if "material/tags" in config.plugins %} diff --git a/theme/partials/alternate.html b/theme/partials/alternate.html new file mode 100644 index 0000000000..807b9818cd --- /dev/null +++ b/theme/partials/alternate.html @@ -0,0 +1,51 @@ + + + +
+
+ {% for alt in config.extra.alternate %} + {% if alt.lang == config.theme.language %} + + {% endif %} + {% endfor %} +
+ +
+
+
diff --git a/theme/partials/header.html b/theme/partials/header.html index 0b9ff3f153..2ce3b75982 100644 --- a/theme/partials/header.html +++ b/theme/partials/header.html @@ -1,6 +1,6 @@ - - +--> + + {% set class = "md-header" %} {% if "navigation.tabs.sticky" in features %} {% set class = class ~ " md-header--shadow md-header--lifted" %} @@ -48,7 +49,8 @@ @@ -81,7 +83,8 @@ {% if "material/search" in config.plugins %} @@ -90,70 +93,13 @@ {% if config.extra.alternate %} -
-
- {% for alt in config.extra.alternate %} - {% if alt.lang == config.theme.language %} - - {% endif %} - {% endfor %} -
- -
-
-
+ {% include "partials/alternate.html" %} {% endif %} - + {% if config.theme.palette %} {% if not config.theme.palette is mapping %} -
- {% for option in config.theme.palette %} - {% set scheme = option.scheme | d("default", true) %} - {% set primary = option.primary | d("indigo", true) %} - {% set accent = option.accent | d("indigo", true) %} - - {% if option.toggle %} - - {% endif %} - {% endfor %} -
+ {% include "partials/palette.html" %} {% endif %} {% endif %} diff --git a/theme/partials/logo.html b/theme/partials/logo.html index cec4f0b461..e102470b75 100644 --- a/theme/partials/logo.html +++ b/theme/partials/logo.html @@ -20,8 +20,8 @@ IN THE SOFTWARE. #} --> -logo -logo +logo +logo