1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-07-25 04:41:13 +00:00

Merge branch 'privacyguides:main' into main

This commit is contained in:
oppressor1761
2024-03-29 14:37:21 +08:00
committed by GitHub
31 changed files with 516 additions and 137 deletions

View File

@@ -1 +0,0 @@
../../../../../theme/assets/brand/WOFF/bagnard/Bagnard.woff

View File

@@ -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"

104
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,104 @@
# 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.
name: Build Website
on:
workflow_call:
inputs:
ref:
required: true
type: string
repo:
required: true
type: string
lang:
required: true
type: string
i18n:
required: true
type: boolean
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ inputs.i18n }}
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
persist-credentials: 'false'
- uses: actions/download-artifact@v4
with:
path: modules
- run: |
rmdir modules/mkdocs-material
mv modules/mkdocs-material-insiders modules/mkdocs-material
rmdir theme/assets/brand
mv modules/brand theme/assets/brand
- if: inputs.i18n
run: |
cp -rl modules/i18n/i18n .
cp -rl modules/i18n/includes .
cp -rl modules/i18n/theme .
- name: Python setup
uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: 'pipenv'
- name: Cache files
uses: actions/cache@v4.0.2
with:
key: ${{ inputs.ref }}
path: .cache
- name: Install Python dependencies
run: |
pip install pipenv
pipenv install
sudo apt install pngquant
- name: Build website
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARDS: false
CONTEXT: deploy-preview
NETLIFY: true
run: |
pipenv run mkdocs build --config-file config/mkdocs.${{ inputs.lang }}.yml
cp -r static/* site/
pipenv run mkdocs --version
tar -czvf site-build-${{ inputs.lang }}.tar.gz site
- name: Upload tar.gz file
uses: actions/upload-artifact@v4
with:
name: site-build-${{ inputs.lang }}.tar.gz
path: site-build-${{ inputs.lang }}.tar.gz

49
.github/workflows/cleanup.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
# 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.
name: Cleanup Artifacts
on:
workflow_call:
jobs:
brand:
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: brand
failOnError: false
i18n:
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: i18n
failOnError: false
mkdocs-material-insiders:
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: mkdocs-material-insiders
failOnError: false

View File

@@ -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'

72
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,72 @@
# 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.
name: Cleanup Artifacts
on:
workflow_call:
inputs:
netlify:
type: boolean
netlify_alias:
type: string
outputs:
netlify_address:
value: ${{ jobs.netlify.outputs.address }}
secrets:
NETLIFY_TOKEN:
jobs:
netlify:
if: inputs.netlify
runs-on: ubuntu-latest
outputs:
address: ${{ steps.deployment.outputs.address }}
environment:
name: preview-netlify
url: ${{ steps.deployment.outputs.address }}
steps:
- uses: actions/download-artifact@v4
with:
pattern: site-build-*
merge-multiple: true
- run: |
for file in *.tar.gz; do tar -zxf "$file"; done
wget https://raw.githubusercontent.com/privacyguides/privacyguides.org/main/netlify.toml
ls -la site/
- uses: actions/setup-node@v4
- run: |
npm install netlify-cli -g
- name: Limit length of Netlify alias to 12
run: echo "SHORT_ALIAS=`echo ${{ inputs.netlify_alias }} | cut -c1-12`" >> $GITHUB_ENV
- id: deployment
env:
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
run: |
netlify deploy --dir=site --alias=${{ env.SHORT_ALIAS }}
echo "address=https://${{ env.SHORT_ALIAS }}--${{ vars.NETLIFY_SITE }}.netlify.app/" >> "$GITHUB_OUTPUT"

50
.github/workflows/download-repo.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
# 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.
name: Download repository
on:
workflow_call:
inputs:
repo:
required: true
type: string
secrets:
ACTIONS_SSH_KEY:
required: true
jobs:
download:
runs-on: ubuntu-latest
environment:
name: actions-ssh
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: 'privacyguides/${{ inputs.repo }}'
path: ${{ inputs.repo }}
ssh-key: ${{ secrets.ACTIONS_SSH_KEY }}
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.repo }}
path: ${{ inputs.repo }}
retention-days: 1

View File

@@ -29,6 +29,9 @@ concurrency:
jobs:
gitlab:
runs-on: ubuntu-latest
environment:
name: actions-ssh
url: https://gitlab.com/privacyguides/privacyguides.org
steps:
- name: Mirror to GitLab
uses: wearerequired/git-mirror-action@v1
@@ -40,6 +43,9 @@ jobs:
codeberg:
runs-on: ubuntu-latest
environment:
name: actions-ssh
url: https://codeberg.org/privacyguides/privacyguides.org
steps:
- name: Mirror to Codeberg
uses: wearerequired/git-mirror-action@v1
@@ -51,6 +57,9 @@ jobs:
sourcehut:
runs-on: ubuntu-latest
environment:
name: actions-ssh
url: https://git.sr.ht/~jonaharagon/privacyguides.org
steps:
- name: Mirror to SourceHut
uses: wearerequired/git-mirror-action@v1

86
.github/workflows/preview-pr.yml vendored Normal file
View File

@@ -0,0 +1,86 @@
# 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.
name: Build Pull Request Preview
on:
pull_request_target:
permissions:
pull-requests: write
contents: read
jobs:
downloadSubmodules:
strategy:
matrix:
repo: [mkdocs-material-insiders, brand, i18n]
uses: ./.github/workflows/download-repo.yml
with:
repo: ${{ matrix.repo }}
secrets:
ACTIONS_SSH_KEY: ${{ secrets.ACTIONS_SSH_KEY }}
build:
needs: downloadSubmodules
strategy:
matrix:
lang: [es, fr, he, it, nl, ru, zh-Hant]
i18n: [true]
include:
- lang: en
i18n: false
fail-fast: false
permissions:
contents: read
uses: ./.github/workflows/build.yml
with:
ref: ${{github.event.pull_request.head.ref}}
repo: ${{github.event.pull_request.head.repo.full_name}}
lang: ${{ matrix.lang }}
i18n: ${{ matrix.i18n }}
deploy:
needs: build
uses: ./.github/workflows/deploy.yml
with:
netlify: true
netlify_alias: ${{ github.event.pull_request.head.sha }}
secrets:
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
comment:
permissions:
pull-requests: write
needs: deploy
runs-on: ubuntu-latest
env:
address: ${{ needs.deploy.outputs.netlify_address }}
steps:
- uses: thollander/actions-comment-pull-request@v2
with:
message: |
This is a test :eyes: ${{ env.address }}
comment_tag: deployment
cleanup:
needs: deploy
uses: ./.github/workflows/cleanup.yml

View File

@@ -29,6 +29,8 @@ jobs:
production:
name: Push release to production
runs-on: ubuntu-latest
environment:
name: actions-ssh
permissions:
contents: write
@@ -47,6 +49,8 @@ jobs:
build:
name: Create release packages
runs-on: ubuntu-latest
environment:
name: actions-ssh
steps:
- name: Checkout repository
@@ -105,7 +109,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

20
.gitignore vendored
View File

@@ -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/*

View File

@@ -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"

46
Pipfile.lock generated
View File

@@ -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": {

View File

@@ -0,0 +1 @@
../../../../theme/assets/brand/fonts

View File

@@ -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 }

View File

@@ -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 -%}

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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.

View File

@@ -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

View File

@@ -2,7 +2,7 @@
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/assets/brand/PNG/Favicon/mstile-150x150.png"/>
<square150x150logo src="/en/assets/brand/logos/png/mstile-150x150.png"/>
<TileColor>#ffd06f</TileColor>
</tile>
</msapplication>

View File

@@ -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"
}

View File

@@ -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%;

View File

@@ -103,7 +103,7 @@
{% 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="{{ page.title | d(config.site_name, true)}} cover image" title="{{ page.title | d(config.site_name, true)}}">
<img src="/en/assets/img/cover/{{ page.meta.cover }}" alt="">
</div>
{% endif %}
{% if "material/tags" in config.plugins %}

View File

@@ -0,0 +1,51 @@
<!--
Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com>
Copyright (c) 2023-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.
-->
<!-- Site language selector -->
<div class="md-header__option">
<div class="md-select">
{% for alt in config.extra.alternate %}
{% if alt.lang == config.theme.language %}
<button class="md-header__button md-icon" aria-label="{{ lang.t('select.language') }}">
<img alt="{{ config.theme.language }}" class="twemoji" src="{{ alt.icon }}">
</button>
{% endif %}
{% endfor %}
<div class="md-select__inner">
<ul class="md-select__list">
{% for alt in config.extra.alternate %}
<li class="md-select__item">
<a
href="{{ "/" ~ alt.lang ~ "/" ~ page.url }}"
hreflang="{{ alt.lang }}"
class="md-select__link"
>
<img alt="{{ alt.lang }}" class="twemoji" src="{{ alt.icon }}">
{{ alt.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
<!-- {#
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
Copyright (c) 2023 Jonah Aragon <jonah@triplebit.net>
<!--
Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com>
Copyright (c) 2023-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,8 +19,9 @@
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.
#} -->
<!-- Determine base classes -->
-->
<!-- Determine classes -->
{% set class = "md-header" %}
{% if "navigation.tabs.sticky" in features %}
{% set class = class ~ " md-header--shadow md-header--lifted" %}
@@ -48,7 +49,8 @@
<!-- Button to open drawer -->
<label class="md-header__button md-icon" for="__drawer">
{% include ".icons/material/menu" ~ ".svg" %}
{% set icon = config.theme.icon.menu or "material/menu" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</label>
<!-- Header title -->
@@ -81,7 +83,8 @@
<!-- Button to open search modal -->
{% if "material/search" in config.plugins %}
<label class="md-header__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %}
{% set icon = config.theme.icon.search or "material/magnify" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</label>
<!-- Search interface -->
@@ -90,70 +93,13 @@
<!-- Site language selector -->
{% if config.extra.alternate %}
<div class="md-header__option">
<div class="md-select">
{% for alt in config.extra.alternate %}
{% if alt.lang == config.theme.language %}
<button class="md-header__button md-icon" aria-label="{{ lang.t('select.language') }}">
<img alt="{{ config.theme.language }}" class="twemoji" src="{{ alt.icon }}">
</button>
{% endif %}
{% endfor %}
<div class="md-select__inner">
<ul class="md-select__list">
{% for alt in config.extra.alternate %}
<li class="md-select__item">
<a
href="{{ "/" ~ alt.lang ~ "/" ~ page.url }}"
hreflang="{{ alt.lang }}"
class="md-select__link"
>
<img alt="{{ alt.lang }}" class="twemoji" src="{{ alt.icon }}">
{{ alt.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% include "partials/alternate.html" %}
{% endif %}
<!-- Color palette -->
<!-- Color palette toggle -->
{% if config.theme.palette %}
{% if not config.theme.palette is mapping %}
<form class="md-header__option" data-md-component="palette">
{% 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) %}
<input
class="md-option"
data-md-color-media="{{ option.media }}"
data-md-color-scheme="{{ scheme | replace(' ', '-') }}"
data-md-color-primary="{{ primary | replace(' ', '-') }}"
data-md-color-accent="{{ accent | replace(' ', '-') }}"
{% if option.toggle %}
aria-label="{{ option.toggle.name }}"
{% else %}
aria-hidden="true"
{% endif %}
type="radio"
name="__palette"
id="__palette_{{ loop.index0 }}"
/>
{% if option.toggle %}
<label
class="md-header__button md-icon"
title="{{ option.toggle.name }}"
for="__palette_{{ loop.index % loop.length }}"
hidden
>
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
</label>
{% endif %}
{% endfor %}
</form>
{% include "partials/palette.html" %}
{% endif %}
{% endif %}

View File

@@ -20,8 +20,8 @@
IN THE SOFTWARE.
#} -->
<!-- {#
<img src="{{ 'assets/brand/SVG/Logo/privacy-guides-rainbow-logo-notext.svg#only-light' | url }}" alt="logo">
<img src="{{ 'assets/brand/SVG/Logo/privacy-guides-rainbow-logo-notext-darkbg.svg#only-dark' | url }}" alt="logo">
<img src="{{ 'assets/brand/logos/svg/logo/privacy-guides-rainbow-logo-notext.svg#only-light' | url }}" alt="logo">
<img src="{{ 'assets/brand/logos/svg/logo/privacy-guides-rainbow-logo-notext-darkbg.svg#only-dark' | url }}" alt="logo">
#} -->
<img src="{{ 'assets/brand/SVG/Logo/privacy-guides-logo-notext.svg#only-light' | url }}" alt="logo">
<img src="{{ 'assets/brand/SVG/Logo/privacy-guides-logo-notext-darkbg.svg#only-dark' | url }}" alt="logo">
<img src="{{ 'assets/brand/logos/svg/logo/privacy-guides-logo-notext.svg#only-light' | url }}" alt="logo">
<img src="{{ 'assets/brand/logos/svg/logo/privacy-guides-logo-notext-darkbg.svg#only-dark' | url }}" alt="logo">