-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use local static files for ASF CSP rule (#395)
* refactor: use local static files for ASF CSP rule TODO: 1. find jquery 2. google fonts (if we need) * add google fonts & css files
- Loading branch information
Showing
25 changed files
with
151 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,19 +30,13 @@ | |
{{ template "_internal/schema.html" . -}} | ||
{{ template "_internal/twitter_cards.html" . -}} | ||
{{ partialCached "head-css.html" . "asdf" -}} | ||
<script | ||
src="https://code.jquery.com/jquery-3.5.1.min.js" | ||
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" | ||
crossorigin="anonymous"></script> | ||
<script src='{{ "/js/jquery.min.js" | relURL }}'></script> | ||
{{ if .Site.Params.offlineSearch -}} | ||
<script | ||
src="https://unpkg.com/[email protected]/lunr.min.js" | ||
integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY" | ||
crossorigin="anonymous"></script> | ||
<script src='{{ "/js/lunr.min.js" | relURL }}'></script> | ||
{{ end -}} | ||
|
||
{{ if .Site.Params.prism_syntax_highlighting -}} | ||
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/> | ||
<link rel="stylesheet" href='{{ "/css/prism.css" | relURL }}'/> | ||
{{ end -}} | ||
|
||
{{ partial "hooks/head-end.html" . -}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" | ||
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" | ||
crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" | ||
integrity="sha512-UR25UO94eTnCVwjbXozyeVd6ZqpaAE9naiEUBK/A+QDbfSTQFhPGj5lOR6d8tsgbBk84Ggb5A3EkjsOgPRPcKA==" | ||
crossorigin="anonymous"></script> | ||
<script src='{{ "/js/popper.min.js" | relURL }}'></script> | ||
<script src='{{ "/js/bootstrap.min.js" | relURL }}'></script> | ||
|
||
|
||
{{ if .Site.Params.mermaid.enable }} | ||
<script src="https://cdn.jsdelivr.net/npm/mermaid@8.13.4/dist/mermaid.min.js" integrity="sha512-JERecFUBbsm75UpkVheAuDOE8NdHjQBrPACfEQYPwvPG+fjgCpHAz1Jw2ci9EXmd3DdfiWth3O3CQvcfEg8gsA==" crossorigin="anonymous"></script> | ||
<script src='{{ "/js/mermaid.min.js" | relURL }}'></script> | ||
{{ end }} | ||
|
||
{{ if .Site.Params.markmap.enable }} | ||
|
@@ -48,7 +45,7 @@ | |
{{ end }} | ||
<!-- To automatically render math in text elements, include the auto-render extension: --> | ||
<script defer src='https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js' | ||
integrity='sha512-ZA/RPrAo88DlwRnnoNVqKINnQNcWERzRK03PDaA4GIJiVZvGFIWQbdWCsUebMZfkWohnfngsDjXzU6PokO4jGw==' crossorigin='anonymous' | ||
integrity='sha512-ZA/RPrAo88DlwRnnoNVqKINnQNcWERzRK03PDaA4GIJiVZvGFIWQbdWCsUebMZfkWohnfngsDjXzU6PokO4jGw==' crossorigin='anonymous' | ||
{{ printf "onload='renderMathInElement(%s, %s);'" (( .Site.Params.katex.html_dom_element | default "document.body" ) | safeJS ) ( printf "%s" ( $.Site.Params.katex.options | jsonify )) | safeHTMLAttr }}></script> | ||
{{ end }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* open-sans-300 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 300; | ||
src: url('../webfonts/open-sans/open-sans-v40-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* open-sans-300italic - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Open Sans'; | ||
font-style: italic; | ||
font-weight: 300; | ||
src: url('../webfonts/open-sans/open-sans-v40-latin-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* open-sans-regular - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url('../webfonts/open-sans/open-sans-v40-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* open-sans-italic - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Open Sans'; | ||
font-style: italic; | ||
font-weight: 400; | ||
src: url('../webfonts/open-sans/open-sans-v40-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* open-sans-700 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Open Sans'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: url('../webfonts/open-sans/open-sans-v40-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* open-sans-700italic - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Open Sans'; | ||
font-style: italic; | ||
font-weight: 700; | ||
src: url('../webfonts/open-sans/open-sans-v40-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* rubik-300 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Rubik'; | ||
font-style: normal; | ||
font-weight: 300; | ||
src: url('../webfonts/rubik/rubik-v28-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* rubik-regular - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Rubik'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url('../webfonts/rubik/rubik-v28-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* rubik-500 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Rubik'; | ||
font-style: normal; | ||
font-weight: 500; | ||
src: url('../webfonts/rubik/rubik-v28-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* rubik-600 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Rubik'; | ||
font-style: normal; | ||
font-weight: 600; | ||
src: url('../webfonts/rubik/rubik-v28-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* rubik-700 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Rubik'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: url('../webfonts/rubik/rubik-v28-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* tajawal-300 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Tajawal'; | ||
font-style: normal; | ||
font-weight: 300; | ||
src: url('../webfonts/tajawal/tajawal-v10-latin-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* tajawal-regular - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Tajawal'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url('../webfonts/tajawal/tajawal-v10-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* tajawal-500 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Tajawal'; | ||
font-style: normal; | ||
font-weight: 500; | ||
src: url('../webfonts/tajawal/tajawal-v10-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} | ||
/* tajawal-700 - latin */ | ||
@font-face { | ||
font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ | ||
font-family: 'Tajawal'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: url('../webfonts/tajawal/tajawal-v10-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file added
BIN
+18.9 KB
themes/docsy/static/webfonts/open-sans/open-sans-v40-latin-300italic.woff2
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+18.4 KB
themes/docsy/static/webfonts/open-sans/open-sans-v40-latin-700italic.woff2
Binary file not shown.
Binary file added
BIN
+18.8 KB
themes/docsy/static/webfonts/open-sans/open-sans-v40-latin-italic.woff2
Binary file not shown.
Binary file added
BIN
+18.2 KB
themes/docsy/static/webfonts/open-sans/open-sans-v40-latin-regular.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.