Skip to content

Commit dfb584e

Browse files
Security update: (#8956)
For security reasons, Amazon does not allow Webpage loads resources from CDN or domain with public access or elevated risk via link(s). For this reason we host the javascript files locally and reference them in the theme. Signed-off-by: Jacob Weinstock <[email protected]>
1 parent e559414 commit dfb584e

File tree

2 files changed

+89
-2
lines changed

2 files changed

+89
-2
lines changed

docs/patches/0001-Security-update.patch

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
From 510caead5e2dacbf6df5491926a13f609174416c Mon Sep 17 00:00:00 2001
12
From: Jacob Weinstock <[email protected]>
2-
Date: Thu, 31 Oct 2024 10:24:12 -0600
3+
Date: Fri, 1 Nov 2024 09:16:06 -0600
34
Subject: [PATCH] Security update:
45

56
For security reasons, Amazon does not allow
@@ -10,11 +11,32 @@ and reference them in the theme.
1011

1112
Signed-off-by: Jacob Weinstock <[email protected]>
1213
---
14+
assets/scss/rtl/_main.scss | 4 ++--
1315
layouts/partials/head.html | 4 ++--
1416
layouts/partials/scripts.html | 4 ++--
1517
static/js/prism.js | 2 +-
16-
3 files changed, 5 insertions(+), 5 deletions(-)
18+
4 files changed, 7 insertions(+), 7 deletions(-)
1719

20+
diff --git a/assets/scss/rtl/_main.scss b/assets/scss/rtl/_main.scss
21+
index ffe9577..d7ddaff 100644
22+
--- a/assets/scss/rtl/_main.scss
23+
+++ b/assets/scss/rtl/_main.scss
24+
@@ -31,7 +31,7 @@ body:lang(ur) {
25+
}
26+
27+
body:lang(fa) {
28+
- @import url('https://cdn.jsdelivr.net/gh/rastikerdar/[email protected]/dist/font-face.css');
29+
+ @import url('/font/font-face.css');
30+
font-family: 'Vazir', "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
31+
}
32+
33+
@@ -43,4 +43,4 @@ body:lang(he) {
34+
body:lang(ar) {
35+
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');
36+
font-family: 'Tajawal', "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
37+
-}
38+
\ No newline at end of file
39+
+}
1840
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
1941
index a40f447..db9ae40 100644
2042
--- a/layouts/partials/head.html

docs/static/font/font-face.css

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
@font-face {
2+
font-family: Vazir;
3+
src: url('Vazir-Regular.eot');
4+
src: url('Vazir-Regular.eot?#iefix') format('embedded-opentype'),
5+
url('Vazir-Regular.woff2') format('woff2'),
6+
url('Vazir-Regular.woff') format('woff'),
7+
url('Vazir-Regular.ttf') format('truetype');
8+
font-weight: normal;
9+
font-display:swap;
10+
}
11+
12+
@font-face {
13+
font-family: Vazir;
14+
src: url('Vazir-Bold.eot');
15+
src: url('Vazir-Bold.eot?#iefix') format('embedded-opentype'),
16+
url('Vazir-Bold.woff2') format('woff2'),
17+
url('Vazir-Bold.woff') format('woff'),
18+
url('Vazir-Bold.ttf') format('truetype');
19+
font-weight: bold;
20+
font-display:swap;
21+
}
22+
23+
@font-face {
24+
font-family: Vazir;
25+
src: url('Vazir-Thin.eot');
26+
src: url('Vazir-Thin.eot?#iefix') format('embedded-opentype'),
27+
url('Vazir-Thin.woff2') format('woff2'),
28+
url('Vazir-Thin.woff') format('woff'),
29+
url('Vazir-Thin.ttf') format('truetype');
30+
font-weight: 100;
31+
font-display:swap;
32+
}
33+
34+
@font-face {
35+
font-family: Vazir;
36+
src: url('Vazir-Light.eot');
37+
src: url('Vazir-Light.eot?#iefix') format('embedded-opentype'),
38+
url('Vazir-Light.woff2') format('woff2'),
39+
url('Vazir-Light.woff') format('woff'),
40+
url('Vazir-Light.ttf') format('truetype');
41+
font-weight: 300;
42+
font-display:swap;
43+
}
44+
45+
@font-face {
46+
font-family: Vazir;
47+
src: url('Vazir-Medium.eot');
48+
src: url('Vazir-Medium.eot?#iefix') format('embedded-opentype'),
49+
url('Vazir-Medium.woff2') format('woff2'),
50+
url('Vazir-Medium.woff') format('woff'),
51+
url('Vazir-Medium.ttf') format('truetype');
52+
font-weight: 500;
53+
font-display:swap;
54+
}
55+
56+
@font-face {
57+
font-family: Vazir;
58+
src: url('Vazir-Black.eot');
59+
src: url('Vazir-Black.eot?#iefix') format('embedded-opentype'),
60+
url('Vazir-Black.woff2') format('woff2'),
61+
url('Vazir-Black.woff') format('woff'),
62+
url('Vazir-Black.ttf') format('truetype');
63+
font-weight: 900;
64+
font-display:swap;
65+
}

0 commit comments

Comments
 (0)