From 358c7b06be5ac06de4cc10c85093ffac8044458a Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Tue, 8 Sep 2020 01:08:44 +0300 Subject: Getting rid of le bloat From ~1.3MB on the weblog index to just < 200KB! --- sass/css/_colors.scss | 4 +-- sass/css/_fonts.scss | 54 ++----------------------------- sass/css/yaroslavps.scss | 13 +++++--- static/fonts/BlexMono.ttf | Bin 879096 -> 0 bytes static/fonts/IBMPlexMono-Regular.ttf | Bin 0 -> 113376 bytes static/fonts/IBMPlexSans-Bold.ttf | Bin 153236 -> 0 bytes static/fonts/IBMPlexSans-BoldItalic.ttf | Bin 161500 -> 0 bytes static/fonts/IBMPlexSans-Italic.ttf | Bin 161892 -> 0 bytes static/fonts/IBMPlexSans-Regular.ttf | Bin 153368 -> 0 bytes static/fonts/IBMPlexSerif-Bold.ttf | Bin 161076 -> 0 bytes static/fonts/IBMPlexSerif-BoldItalic.ttf | Bin 170008 -> 0 bytes static/fonts/IBMPlexSerif-Italic.ttf | Bin 170104 -> 0 bytes static/fonts/IBMPlexSerif-Regular.ttf | Bin 160352 -> 0 bytes static/svg/icons/git.svg | 5 +++ static/svg/icons/github.svg | 3 ++ static/svg/icons/rss.svg | 3 ++ templates/base.html | 12 +++++-- templates/index.html | 12 +++++-- 18 files changed, 43 insertions(+), 63 deletions(-) delete mode 100644 static/fonts/BlexMono.ttf create mode 100644 static/fonts/IBMPlexMono-Regular.ttf delete mode 100644 static/fonts/IBMPlexSans-Bold.ttf delete mode 100644 static/fonts/IBMPlexSans-BoldItalic.ttf delete mode 100644 static/fonts/IBMPlexSans-Italic.ttf delete mode 100644 static/fonts/IBMPlexSans-Regular.ttf delete mode 100644 static/fonts/IBMPlexSerif-Bold.ttf delete mode 100644 static/fonts/IBMPlexSerif-BoldItalic.ttf delete mode 100644 static/fonts/IBMPlexSerif-Italic.ttf delete mode 100644 static/fonts/IBMPlexSerif-Regular.ttf create mode 100644 static/svg/icons/git.svg create mode 100644 static/svg/icons/github.svg create mode 100644 static/svg/icons/rss.svg diff --git a/sass/css/_colors.scss b/sass/css/_colors.scss index df32dd0..a24f933 100644 --- a/sass/css/_colors.scss +++ b/sass/css/_colors.scss @@ -1,5 +1,5 @@ -$bg: #000000; -$bg2: #1b1e25; +$bg0: #000000; +$bg1: #1b1e25; $white: #e5e9f0; $gray: #a1a6b2; $magenta: #9c6992; diff --git a/sass/css/_fonts.scss b/sass/css/_fonts.scss index de85b23..686bc1b 100644 --- a/sass/css/_fonts.scss +++ b/sass/css/_fonts.scss @@ -1,56 +1,8 @@ -@font-face { - font-family: "IBM Plex Sans"; - src: url("/fonts/IBMPlexSans-Regular.ttf"); -} - -@font-face { - font-family: "IBM Plex Sans"; - src: url("/fonts/IBMPlexSans-Bold.ttf"); - font-weight: bold; -} - -@font-face { - font-family: "IBM Plex Sans"; - src: url("/fonts/IBMPlexSans-Italic.ttf"); - font-style: italic; -} - -@font-face { - font-family: "IBM Plex Sans"; - src: url("/fonts/IBMPlexSans-BoldItalic.ttf"); - font-style: italic; - font-weight: bold; -} - -@font-face { - font-family: "IBM Plex Serif"; - src: url("/fonts/IBMPlexSerif-Regular.ttf"); -} - -@font-face { - font-family: "IBM Plex Serif"; - src: url("/fonts/IBMPlexSerif-Bold.ttf"); - font-weight: bold; -} - -@font-face { - font-family: "IBM Plex Serif"; - src: url("/fonts/IBMPlexSerif-Italic.ttf"); - font-style: italic; -} - -@font-face { - font-family: "IBM Plex Serif"; - src: url("/fonts/IBMPlexSerif-BoldItalic.ttf"); - font-style: italic; - font-weight: bold; -} - @font-face { font-family: "IBM Plex Mono"; - src: url("/fonts/BlexMono.ttf"); + src: url("/fonts/IBMPlexMono-Regular.ttf"); } -$font_sans: "IBM Plex Sans", Verdana, Helvetica, sans-serif; -$font_serif: "IBM Plex Serif", Georgia, serif; +$font_sans: Verdana, Geneva, sans-serif; +$font_serif: Georgia, serif; $font_mono: "IBM Plex Mono", monospace; diff --git a/sass/css/yaroslavps.scss b/sass/css/yaroslavps.scss index e9f85df..93d87f9 100644 --- a/sass/css/yaroslavps.scss +++ b/sass/css/yaroslavps.scss @@ -5,7 +5,7 @@ html, body { width: 100%; min-height: 100vh; - background-color: $bg2; + background-color: $bg1; } h1, @@ -73,7 +73,12 @@ code { } span.icon { - font-family: $font_mono; + height: 1em; +} + +span.icon > img { + height: 1em; + width: 1em; } .publish-date { @@ -96,7 +101,7 @@ h2 > span.publish-date { margin: 0 auto; min-height: 100vh; height: auto; - background-color: $bg; + background-color: $bg0; } .landing-page-container { @@ -168,7 +173,7 @@ h2 > span.publish-date { display: inline-block; padding: 0.5em; background-color: $cyan; - color: $bg; + color: $bg0; } .paginator a:hover { diff --git a/static/fonts/BlexMono.ttf b/static/fonts/BlexMono.ttf deleted file mode 100644 index 2579b49..0000000 Binary files a/static/fonts/BlexMono.ttf and /dev/null differ diff --git a/static/fonts/IBMPlexMono-Regular.ttf b/static/fonts/IBMPlexMono-Regular.ttf new file mode 100644 index 0000000..f99c8e9 Binary files /dev/null and b/static/fonts/IBMPlexMono-Regular.ttf differ diff --git a/static/fonts/IBMPlexSans-Bold.ttf b/static/fonts/IBMPlexSans-Bold.ttf deleted file mode 100644 index 28cd4a2..0000000 Binary files a/static/fonts/IBMPlexSans-Bold.ttf and /dev/null differ diff --git a/static/fonts/IBMPlexSans-BoldItalic.ttf b/static/fonts/IBMPlexSans-BoldItalic.ttf deleted file mode 100644 index 147dd86..0000000 Binary files a/static/fonts/IBMPlexSans-BoldItalic.ttf and /dev/null differ diff --git a/static/fonts/IBMPlexSans-Italic.ttf b/static/fonts/IBMPlexSans-Italic.ttf deleted file mode 100644 index 044173e..0000000 Binary files a/static/fonts/IBMPlexSans-Italic.ttf and /dev/null differ diff --git a/static/fonts/IBMPlexSans-Regular.ttf b/static/fonts/IBMPlexSans-Regular.ttf deleted file mode 100644 index b43625f..0000000 Binary files a/static/fonts/IBMPlexSans-Regular.ttf and /dev/null differ diff --git a/static/fonts/IBMPlexSerif-Bold.ttf b/static/fonts/IBMPlexSerif-Bold.ttf deleted file mode 100644 index 8a7a786..0000000 Binary files a/static/fonts/IBMPlexSerif-Bold.ttf and /dev/null differ diff --git a/static/fonts/IBMPlexSerif-BoldItalic.ttf b/static/fonts/IBMPlexSerif-BoldItalic.ttf deleted file mode 100644 index 1d42cc8..0000000 Binary files a/static/fonts/IBMPlexSerif-BoldItalic.ttf and /dev/null differ diff --git a/static/fonts/IBMPlexSerif-Italic.ttf b/static/fonts/IBMPlexSerif-Italic.ttf deleted file mode 100644 index 61d5c1f..0000000 Binary files a/static/fonts/IBMPlexSerif-Italic.ttf and /dev/null differ diff --git a/static/fonts/IBMPlexSerif-Regular.ttf b/static/fonts/IBMPlexSerif-Regular.ttf deleted file mode 100644 index aa79e5c..0000000 Binary files a/static/fonts/IBMPlexSerif-Regular.ttf and /dev/null differ diff --git a/static/svg/icons/git.svg b/static/svg/icons/git.svg new file mode 100644 index 0000000..f2cbb02 --- /dev/null +++ b/static/svg/icons/git.svg @@ -0,0 +1,5 @@ + + + diff --git a/static/svg/icons/github.svg b/static/svg/icons/github.svg new file mode 100644 index 0000000..c9f372e --- /dev/null +++ b/static/svg/icons/github.svg @@ -0,0 +1,3 @@ + diff --git a/static/svg/icons/rss.svg b/static/svg/icons/rss.svg new file mode 100644 index 0000000..7b96e49 --- /dev/null +++ b/static/svg/icons/rss.svg @@ -0,0 +1,3 @@ + diff --git a/templates/base.html b/templates/base.html index 824f129..c64b27d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -45,9 +45,15 @@ {% endif %} {% endblock %}

Navigation