mirror of https://github.com/luizdepra/hugo-coder.git

Nico Alt
02.09.2019 bd8f61093656f2804c0175b49ae01f70866d8b5a
refs
author Nico Alt <nicoalt@posteo.org>
Monday, September 2, 2019 01:09 +0200
committer Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
Monday, September 2, 2019 01:09 +0200
commitbd8f61093656f2804c0175b49ae01f70866d8b5a
tree 5a4cff9de2025ab632c976daf1d01ac5bdcacd34 tree | zip | gz
parent 2fa8ce9cdb053afdab85f0e7b854405482c7d0c9 view | diff
Host stuff locally (#194)

This commit includes the following things to host them locally:
* fonts (formerly from Google Fonts)
* fontawesome
* normalize

For a reasoning on why this is good to do, see below.

Everything is now included in Sass code. This means not only we no more
have requests to third-party sites, but also reduced the amount of
requests necessary to access the page by three.

I mainly downloaded all necessary stuff and put it at appropriate
places. I also ran `make release` to regenerate all CSS files.

Sites that helped me doing this:
* https://switching.social/ethical-alternatives-to-google-fonts/
* https://google-webfonts-helper.herokuapp.com/fonts
* https://google-webfonts-helper.herokuapp.com/fonts/lato?subsets=latin-ext,latin
* https://google-webfonts-helper.herokuapp.com/fonts/merriweather?subsets=vietnamese,cyrillic-ext,latin-ext,latin,cyrillic
* https://google-webfonts-helper.herokuapp.com/fonts/source-code-pro?subsets=latin-ext,latin
* https://fontawesome.com/how-to-use/on-the-web/using-with/sass
* https://github.com/JohnAlbin/normalize-scss

---------------

Currently, this theme opens many connections to third-party sites.

I hope I don't have to explain all too much why not exposing all visitors to Google etc. is a good thing, but I'll do list some advantages:

* Pretty strong CSP: `content-security-policy: default-src https://nico.dorfbrunnen.eu:443`
* Increased autonomy of webpage; if Google or other CDNs goes down, website still looks good
* When building locally without Internet, everything works fine
* Google is all about surveillance capitalism, they want to collect as much data about people as possible
* With this change, we stop helping them on all websites using this theme
* Google (and the other sites might too) is censored in quite some countries; in all of them, this theme would look not as beautiful as it could

Regarding licensing issues:

> first I need to understand if there is any license problem if we distribute these fonts with the theme.

Sure! Here's what I've found out:

According to [the CSS file we pull from Google](https://fonts.googleapis.com/css?family=Lato:400,700%7CMerriweather:300,700%7CSource+Code+Pro:400,700) we're using three fonts: [Lato](https://fonts.google.com/specimen/Lato), [Merriweather](https://fonts.google.com/specimen/Merriweather) and [Source Code Pro](https://fonts.google.com/specimen/Source+Code+Pro). On the bottom right of those pages it says for all fonts that they are licensed under the [Open Font License ](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web). In its preamble, it says:
> The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works.

So I think we're good to go and can include those fonts with the theme.
69 files added
8 files modified
17287 ■■■■■ changed files
CONTRIBUTORS.md 1 ●●●● diff | view | raw | blame | history
assets/scss/_fonts.scss 87 ●●●●● diff | view | raw | blame | history
assets/scss/_variables.scss 3 ●●●●● diff | view | raw | blame | history
assets/scss/coder-inverted.scss 6 ●●●●● diff | view | raw | blame | history
assets/scss/coder-rtl.scss 6 ●●●●● diff | view | raw | blame | history
assets/scss/coder.scss 6 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_animated.scss 20 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_bordered-pulled.scss 20 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_core.scss 21 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_fixed-width.scss 6 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_icons.scss 1388 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_larger.scss 23 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_list.scss 18 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_mixins.scss 56 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_rotated-flipped.scss 24 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_screen-reader.scss 5 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_shims.scss 2062 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_stacked.scss 31 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/_variables.scss 1405 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/brands.scss 22 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/fontawesome.scss 16 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/regular.scss 23 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/solid.scss 24 ●●●●● diff | view | raw | blame | history
assets/scss/fontawesome/v4-shims.scss 6 ●●●●● diff | view | raw | blame | history
assets/scss/normalize/_normalize.scss 3 ●●●●● diff | view | raw | blame | history
assets/scss/normalize/normalize/_import-now.scss 11 ●●●●● diff | view | raw | blame | history
assets/scss/normalize/normalize/_normalize-mixin.scss 666 ●●●●● diff | view | raw | blame | history
assets/scss/normalize/normalize/_variables.scss 36 ●●●●● diff | view | raw | blame | history
assets/scss/normalize/normalize/_vertical-rhythm.scss 61 ●●●●● diff | view | raw | blame | history
layouts/_default/baseof.html 4 ●●●● diff | view | raw | blame | history
resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.content 6 ●●●● diff | view | raw | blame | history
resources/_gen/assets/scss/scss/coder.scss_5e1eb8e37c42cdfb6215b61e44dcfa5f.json 2 ●●● diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-700.eot diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-700.svg 438 ●●●●● diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-700.ttf diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-700.woff diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-700.woff2 diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-regular.eot diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-regular.svg 435 ●●●●● diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-regular.ttf diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-regular.woff diff | view | raw | blame | history
static/assets/fonts/lato/lato-v16-latin_latin-ext-regular.woff2 diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-300.eot diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-300.svg 374 ●●●●● diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-300.ttf diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-300.woff diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-300.woff2 diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-700.eot diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-700.svg 375 ●●●●● diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-700.ttf diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-700.woff diff | view | raw | blame | history
static/assets/fonts/merriweather/merriweather-v21-cyrillic_latin_latin-ext_cyrillic-ext_vietnamese-700.woff2 diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-700.eot diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-700.svg 344 ●●●●● diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-700.ttf diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-700.woff diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-700.woff2 diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-regular.eot diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-regular.svg 350 ●●●●● diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-regular.ttf diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-regular.woff diff | view | raw | blame | history
static/assets/fonts/source-code-pro/source-code-pro-v10-latin_latin-ext-regular.woff2 diff | view | raw | blame | history
static/assets/webfonts/fa-brands-400.eot diff | view | raw | blame | history
static/assets/webfonts/fa-brands-400.svg 3451 ●●●●● diff | view | raw | blame | history
static/assets/webfonts/fa-brands-400.ttf diff | view | raw | blame | history
static/assets/webfonts/fa-brands-400.woff diff | view | raw | blame | history
static/assets/webfonts/fa-brands-400.woff2 diff | view | raw | blame | history
static/assets/webfonts/fa-regular-400.eot diff | view | raw | blame | history
static/assets/webfonts/fa-regular-400.svg 803 ●●●●● diff | view | raw | blame | history
static/assets/webfonts/fa-regular-400.ttf diff | view | raw | blame | history
static/assets/webfonts/fa-regular-400.woff diff | view | raw | blame | history
static/assets/webfonts/fa-regular-400.woff2 diff | view | raw | blame | history
static/assets/webfonts/fa-solid-900.eot diff | view | raw | blame | history
static/assets/webfonts/fa-solid-900.svg 4649 ●●●●● diff | view | raw | blame | history
static/assets/webfonts/fa-solid-900.ttf diff | view | raw | blame | history
static/assets/webfonts/fa-solid-900.woff diff | view | raw | blame | history
static/assets/webfonts/fa-solid-900.woff2 diff | view | raw | blame | history