Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix external resource errors #2066

Merged
merged 2 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "mkdocs-material-insiders"]
path = modules/mkdocs-material
url = git@github.com:privacyguides/mkdocs-material-insiders.git
[submodule "theme/assets/brand"]
path = theme/assets/brand
url = https://github.com/privacyguides/brand.git
[submodule "modules/mkdocs-material"]
path = modules/mkdocs-material
url = git@github.com:privacyguides/mkdocs-material-insiders.git
2 changes: 1 addition & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdoc

1. Clone this repository and submodules: `git clone --recurse-submodules https://github.com/privacyguides/privacyguides.org.git`
2. Enable SSH commit verification with our local [`.allowed_signers`](/.allowed_signers) file: `git config gpg.ssh.allowedSignersFile .allowed_signers`
3. Install Python **3.10**
3. Install Python **3.8**, this is the only version supported by Netlify.
4. Install **pipenv**: `pip install pipenv`
5. Install dependencies: `pipenv install --dev` (install [Pillow and CairoSVG](https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#dependencies) as well to generate social cards)
6. Serve the site locally: `pipenv run mkdocs serve --config-file config/mkdocs.en.yml` (set `CARDS=true` to generate social cards)
Expand Down
3 changes: 1 addition & 2 deletions config/mkdocs.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ repo_name: ""
theme:
name: material
custom_dir: ../theme
favicon: assets/img/brand/PNG/Favicon/favicon-32x32.png
favicon: assets/brand/png/favicon/favicon-32x32.png
icon:
logo: octicons/shield-lock-16
repo: simple/github
font: false
features:
- navigation.tracking
- navigation.tabs
Expand Down
6 changes: 5 additions & 1 deletion config/mkdocs.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ extra:

theme:
language: en
font:
text: Public Sans
code: DM Mono
palette:
- media: "(prefers-color-scheme)"
scheme: default
Expand Down Expand Up @@ -60,7 +63,8 @@ plugins:
fill: "#FFD06F"
text: "#2d2d2d"
cards_dir: assets/img/social
cards_font: 'Public Sans'
cards_font: Public Sans
cache_dir: .cache/plugin/social-en

nav:
- Home: 'index.md'
Expand Down
13 changes: 13 additions & 0 deletions config/mkdocs.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ extra:

theme:
language: fr
font:
text: Public Sans
code: DM Mono
palette:
- media: "(prefers-color-scheme)"
scheme: default
Expand All @@ -53,6 +56,16 @@ theme:
icon: material/brightness-5
name: "Basculer en mode sombre"

plugins:
social:
cards: !ENV [NETLIFY, false]
cards_color:
fill: "#FFD06F"
text: "#2d2d2d"
cards_dir: assets/img/social
cards_font: Public Sans
cache_dir: .cache/plugin/social-fr

nav:
- Accueil: 'index.md'
- Base de connaissances:
Expand Down
17 changes: 17 additions & 0 deletions config/mkdocs.he.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ extra:
data: Needs Improvement
note: "תודה על המשוב שלך! Help us improve this page by opening a <a href='https://discuss.privacyguides.net/'>discussion on our forum</a>."

extra_css:
- assets/stylesheets/extra.css?v=3.2.0
- assets/stylesheets/lang-he.css?v=3.4.0

theme:
language: he
font:
text: Open Sans
code: Cousine
palette:
- media: "(prefers-color-scheme)"
scheme: default
Expand All @@ -53,6 +60,16 @@ theme:
icon: material/brightness-5
name: "עבור למצב כהה"

plugins:
social:
cards: !ENV [NETLIFY, false]
cards_color:
fill: "#FFD06F"
text: "#2d2d2d"
cards_dir: assets/img/social
cards_font: Suez One
cache_dir: .cache/plugin/social-he

nav:
- "דף הבית": 'index.md'
- "ידע בסיסי":
Expand Down
10 changes: 10 additions & 0 deletions config/mkdocs.nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ theme:
icon: material/brightness-5
name: "Verander naar donker thema"

plugins:
social:
cards: !ENV [NETLIFY, false]
cards_color:
fill: "#FFD06F"
text: "#2d2d2d"
cards_dir: assets/img/social
cards_font: Public Sans
cache_dir: .cache/plugin/social-nl

nav:
- Home: 'index.md'
- Kennisbank:
Expand Down
2 changes: 1 addition & 1 deletion modules/mkdocs-material
9 changes: 7 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://*.privacyguides.net; frame-ancestors 'none'"

[[headers]]
for = "/about/donate/"
for = "/:lang/about/donate/"
[headers.values]
Content-Security-Policy = "default-src 'none'; script-src https://opencollective.com https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src https://opencollective.com data: 'self'; connect-src https://api.github.com https://api.privacyguides.net 'self'; frame-src https://opencollective.com; frame-ancestors 'none'"
Content-Security-Policy = "default-src 'none'; script-src https://opencollective.com https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src https://opencollective.com data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://opencollective.com; frame-ancestors 'none'"

[[headers]]
for = "/:lang/tor/"
[headers.values]
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src data: 'self'; connect-src https://api.github.com https://*.privacyguides.net 'self'; frame-src https://snowflake.torproject.org; frame-ancestors 'none'"

[[redirects]]
from = "/.well-known/matrix/*"
Expand Down
60 changes: 0 additions & 60 deletions theme/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,6 @@
font-display: swap;
}

@font-face {
font-family: 'Public Sans';
src: url('/en/assets/brand/WOFF/public_sans/PublicSans-Bold.woff2') format('woff2');
font-weight: bold;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Public Sans';
src: url('/en/assets/brand/WOFF/public_sans/PublicSans-BoldItalic.woff2') format('woff2');
font-weight: bold;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Public Sans';
src: url('/en/assets/brand/WOFF/public_sans/PublicSans-Light.woff2') format('woff2');
font-weight: 300;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'Public Sans';
src: url('/en/assets/brand/WOFF/public_sans/PublicSans-Italic.woff2') format('woff2');
font-weight: normal;
font-style: italic;
font-display: swap;
}

@font-face {
font-family: 'Public Sans';
src: url('/en/assets/brand/WOFF/public_sans/PublicSans-Regular.woff2') format('woff2');
font-weight: normal;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'DM Mono';
src: url('/en/assets/brand/WOFF/dm_mono/DMMono-Regular.woff2') format('woff2');
font-weight: normal;
font-style: normal;
font-display: swap;
}

@font-face {
font-family: 'DM Mono';
src: url('/en/assets/brand/WOFF/dm_mono/DMMono-Medium.woff2') format('woff2');
font-weight: 500;
font-style: normal;
font-display: swap;
}

/* Define brand */
:root, [data-md-color-scheme="default"] {
--md-default-bg-color: rgb(247, 247, 252);
Expand All @@ -69,8 +13,6 @@
--md-primary-bg-color: rgba(0,0,0,.75);
--md-primary-bg-color--light: rgba(0,0,0,.54);
--md-accent-fg-color: #4e30e6;
--md-text-font: "Public Sans", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
--md-code-font: "DM Mono", SFMono-Regular, Consolas, Menlo, monospace;
--pg-light-border: rgb(229, 231, 235);
--pg-hero-color: rgb(45, 45, 45);
--pg-purple: #603aa0;
Expand All @@ -90,8 +32,6 @@
--md-primary-bg-color: rgba(0,0,0,.75);
--md-primary-bg-color--light: rgba(0,0,0,.54);
--md-accent-fg-color: #ffdb57;
--md-text-font: "Public Sans", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
--md-code-font: "DM Mono", SFMono-Regular, Consolas, Menlo, monospace;
--pg-light-border: rgb(47, 47, 47);
--pg-hero-color: #FFD06F;
--pg-purple: #af94de;
Expand Down
33 changes: 33 additions & 0 deletions theme/assets/stylesheets/lang-he.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* hebrew */
@font-face {
font-family: 'Suez One';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.bunny.net/suez-one/files/suez-one-hebrew-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/suez-one/files/suez-one-hebrew-400-normal.woff) format('woff');
unicode-range: U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;
}

/* latin */
@font-face {
font-family: 'Suez One';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.bunny.net/suez-one/files/suez-one-latin-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/suez-one/files/suez-one-latin-400-normal.woff) format('woff');
unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* latin-ext */
@font-face {
font-family: 'Suez One';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.bunny.net/suez-one/files/suez-one-latin-ext-400-normal.woff2) format('woff2'), url(https://fonts.bunny.net/suez-one/files/suez-one-latin-ext-400-normal.woff) format('woff');
unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

h1, h2, h3, .md-header__topic {
font-family: "Bagnard", "Suez One", serif;
}