diff --git a/.gitignore b/.gitignore index e663fe2..701f925 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ index.html venv/ /backups/ .ccls-cache/ +/blog_json_hash.txt diff --git a/content/fonts/Hack.css b/content/fonts/Hack.css new file mode 100644 index 0000000..f1bffc3 --- /dev/null +++ b/content/fonts/Hack.css @@ -0,0 +1,31 @@ +@font-face { + font-family: Hack; + src: url(/content/fonts/hack-regular.woff2) format("woff2"), + url(/content/fonts/hack-regular.woff) format("woff"); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: Hack; + src: url(/content/fonts/hack-bold.woff2) format("woff2"), + url(/content/fonts/hack-bold.woff) format("woff"); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: Hack; + src: url(/content/fonts/hack-italic.woff2) format("woff2"), + url(/content/fonts/hack-italic.woff) format("woff"); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: Hack; + src: url(/content/fonts/hack-bolditalic.woff2) format("woff2"), + url(/content/fonts/hack-bolditalic.woff) format("woff"); + font-weight: 700; + font-style: italic; +} diff --git a/content/fonts/LICENSE b/content/fonts/LICENSE new file mode 100644 index 0000000..08927e5 --- /dev/null +++ b/content/fonts/LICENSE @@ -0,0 +1,45 @@ +The work in the Hack project is Copyright 2018 Source Foundry Authors and licensed under the MIT License + +The work in the DejaVu project was committed to the public domain. + +Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera" + +### MIT License + +Copyright (c) 2018 Source Foundry Authors + +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 NONINFRINGEMENT. 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. + +### BITSTREAM VERA LICENSE + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: + +The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". + +This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. + +The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org. diff --git a/content/fonts/README b/content/fonts/README new file mode 100644 index 0000000..ce8b535 --- /dev/null +++ b/content/fonts/README @@ -0,0 +1,3 @@ +Hack typeface: https://github.com/source-foundry/Hack +License: https://github.com/source-foundry/Hack/blob/master/LICENSE.md + https://blog.ari-web.xyz/content/fonts/LICENSE diff --git a/content/fonts/hack-bold.woff b/content/fonts/hack-bold.woff new file mode 100644 index 0000000..368b913 Binary files /dev/null and b/content/fonts/hack-bold.woff differ diff --git a/content/fonts/hack-bold.woff2 b/content/fonts/hack-bold.woff2 new file mode 100644 index 0000000..1155477 Binary files /dev/null and b/content/fonts/hack-bold.woff2 differ diff --git a/content/fonts/hack-bolditalic.woff b/content/fonts/hack-bolditalic.woff new file mode 100644 index 0000000..ce87fe2 Binary files /dev/null and b/content/fonts/hack-bolditalic.woff differ diff --git a/content/fonts/hack-bolditalic.woff2 b/content/fonts/hack-bolditalic.woff2 new file mode 100644 index 0000000..46ff1c4 Binary files /dev/null and b/content/fonts/hack-bolditalic.woff2 differ diff --git a/content/fonts/hack-italic.woff b/content/fonts/hack-italic.woff new file mode 100644 index 0000000..bd545e4 Binary files /dev/null and b/content/fonts/hack-italic.woff differ diff --git a/content/fonts/hack-italic.woff2 b/content/fonts/hack-italic.woff2 new file mode 100644 index 0000000..1e7630c Binary files /dev/null and b/content/fonts/hack-italic.woff2 differ diff --git a/content/fonts/hack-regular.woff b/content/fonts/hack-regular.woff new file mode 100644 index 0000000..e835381 Binary files /dev/null and b/content/fonts/hack-regular.woff differ diff --git a/content/fonts/hack-regular.woff2 b/content/fonts/hack-regular.woff2 new file mode 100644 index 0000000..524465c Binary files /dev/null and b/content/fonts/hack-regular.woff2 differ diff --git a/content/styles.css b/content/styles.css index 3739c3f..c734ffc 100644 --- a/content/styles.css +++ b/content/styles.css @@ -1,4 +1,4 @@ -@import url("https://cdn.jsdelivr.net/npm/hack-font@3/build/web/hack.min.css"); +@import url("/content/fonts/Hack.min.css"); :root { color-scheme: dark; diff --git a/scripts/blog b/scripts/blog index 43540db..d2dedd2 100755 --- a/scripts/blog +++ b/scripts/blog @@ -16,7 +16,7 @@ from shutil import rmtree from tempfile import gettempdir from threading import Thread from timeit import default_timer as code_timer -from typing import Dict, List, Optional, Set, Tuple +from typing import Callable, Dict, List, Optional, Set, Tuple from warnings import filterwarnings as filter_warnings import ujson # type: ignore @@ -145,7 +145,9 @@ BLOG_HTML_TEMPLATE: str = f"""