From f3908a51aa9654f7049a5a5f74f89439d076924e Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Thu, 12 Mar 2020 18:27:25 +0300 Subject: added fonts, fixed jinja indenting --- config.toml | 1 + static/css/fonts.css | 53 +++++++++++++++++++++++++++++++ static/css/yaroslavps.css | 36 +++++++++++++++------ static/fonts/BlexMono.ttf | Bin 0 -> 879096 bytes static/fonts/IBMPlexSans-Bold.ttf | Bin 0 -> 153236 bytes static/fonts/IBMPlexSans-BoldItalic.ttf | Bin 0 -> 161500 bytes static/fonts/IBMPlexSans-Italic.ttf | Bin 0 -> 161892 bytes static/fonts/IBMPlexSans-Regular.ttf | Bin 0 -> 153368 bytes static/fonts/IBMPlexSerif-Bold.ttf | Bin 0 -> 161076 bytes static/fonts/IBMPlexSerif-BoldItalic.ttf | Bin 0 -> 170008 bytes static/fonts/IBMPlexSerif-Italic.ttf | Bin 0 -> 170104 bytes static/fonts/IBMPlexSerif-Regular.ttf | Bin 0 -> 160352 bytes templates/base.html | 16 +++++----- templates/index.html | 4 +-- templates/weblog.html | 34 ++++++++++---------- 15 files changed, 107 insertions(+), 37 deletions(-) create mode 100644 static/css/fonts.css create mode 100644 static/fonts/BlexMono.ttf create mode 100644 static/fonts/IBMPlexSans-Bold.ttf create mode 100644 static/fonts/IBMPlexSans-BoldItalic.ttf create mode 100644 static/fonts/IBMPlexSans-Italic.ttf create mode 100644 static/fonts/IBMPlexSans-Regular.ttf create mode 100644 static/fonts/IBMPlexSerif-Bold.ttf create mode 100644 static/fonts/IBMPlexSerif-BoldItalic.ttf create mode 100644 static/fonts/IBMPlexSerif-Italic.ttf create mode 100644 static/fonts/IBMPlexSerif-Regular.ttf diff --git a/config.toml b/config.toml index 0399481..e31e91d 100644 --- a/config.toml +++ b/config.toml @@ -6,6 +6,7 @@ compile_sass = false highlight_code = true build_search_index = true +default_language = "en" languages = [ {code = "es", search = true}, {code = "ru", search = true}, diff --git a/static/css/fonts.css b/static/css/fonts.css new file mode 100644 index 0000000..be3d523 --- /dev/null +++ b/static/css/fonts.css @@ -0,0 +1,53 @@ +@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"); +} + diff --git a/static/css/yaroslavps.css b/static/css/yaroslavps.css index c65b2d4..f4f722f 100644 --- a/static/css/yaroslavps.css +++ b/static/css/yaroslavps.css @@ -1,3 +1,5 @@ +@import url("/css/fonts.css"); + html, body { width: 100%; min-height: 100vh; @@ -26,16 +28,7 @@ li, a, p { line-height: 1.3; - font-family: Cantarell, Verdana, sans-serif; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: Georgia, serif; + font-family: "IBM Plex Sans", Verdana, Helvetica, sans-serif; } a, a:visited { @@ -47,6 +40,25 @@ a:hover { color: #81acc1; } +h1, +h2, +h3, +h4, +h5, +h6, +h1 > a, +h2 > a, +h3 > a, +h4 > a, +h5 > a, +h6 > a { + font-family: "IBM Plex Serif", Georgia, serif; +} + +span.icon { + font-family: "IBM Plex Mono"; +} + .main-container { display: grid; grid-template-columns: 3fr 1fr; @@ -58,3 +70,7 @@ a:hover { grid-column-start: 1; grid-column-end: 3; } + +.sidebar-container { + padding: 1em; +} diff --git a/static/fonts/BlexMono.ttf b/static/fonts/BlexMono.ttf new file mode 100644 index 0000000..2579b49 Binary files /dev/null and b/static/fonts/BlexMono.ttf differ diff --git a/static/fonts/IBMPlexSans-Bold.ttf b/static/fonts/IBMPlexSans-Bold.ttf new file mode 100644 index 0000000..28cd4a2 Binary files /dev/null and b/static/fonts/IBMPlexSans-Bold.ttf differ diff --git a/static/fonts/IBMPlexSans-BoldItalic.ttf b/static/fonts/IBMPlexSans-BoldItalic.ttf new file mode 100644 index 0000000..147dd86 Binary files /dev/null and b/static/fonts/IBMPlexSans-BoldItalic.ttf differ diff --git a/static/fonts/IBMPlexSans-Italic.ttf b/static/fonts/IBMPlexSans-Italic.ttf new file mode 100644 index 0000000..044173e Binary files /dev/null and b/static/fonts/IBMPlexSans-Italic.ttf differ diff --git a/static/fonts/IBMPlexSans-Regular.ttf b/static/fonts/IBMPlexSans-Regular.ttf new file mode 100644 index 0000000..b43625f Binary files /dev/null and b/static/fonts/IBMPlexSans-Regular.ttf differ diff --git a/static/fonts/IBMPlexSerif-Bold.ttf b/static/fonts/IBMPlexSerif-Bold.ttf new file mode 100644 index 0000000..8a7a786 Binary files /dev/null and b/static/fonts/IBMPlexSerif-Bold.ttf differ diff --git a/static/fonts/IBMPlexSerif-BoldItalic.ttf b/static/fonts/IBMPlexSerif-BoldItalic.ttf new file mode 100644 index 0000000..1d42cc8 Binary files /dev/null and b/static/fonts/IBMPlexSerif-BoldItalic.ttf differ diff --git a/static/fonts/IBMPlexSerif-Italic.ttf b/static/fonts/IBMPlexSerif-Italic.ttf new file mode 100644 index 0000000..61d5c1f Binary files /dev/null and b/static/fonts/IBMPlexSerif-Italic.ttf differ diff --git a/static/fonts/IBMPlexSerif-Regular.ttf b/static/fonts/IBMPlexSerif-Regular.ttf new file mode 100644 index 0000000..aa79e5c Binary files /dev/null and b/static/fonts/IBMPlexSerif-Regular.ttf differ diff --git a/templates/base.html b/templates/base.html index f03965f..f689bf3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -16,14 +16,14 @@

Yaroslav de la Peña Smirnov

{% block page %} -
- {% block content %} - {% endblock %} -
- +
+ {% block content %} + {% endblock %} +
+ {% endblock %} diff --git a/templates/index.html b/templates/index.html index 0d9fb7c..4e009e3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,5 +1,5 @@ {% extends "base.html" %} {% block page %} -

Welcome to my site!

-Go to weblog +

Welcome to my site!

+ Go to weblog {% endblock %} diff --git a/templates/weblog.html b/templates/weblog.html index 11c0d2a..a20f356 100644 --- a/templates/weblog.html +++ b/templates/weblog.html @@ -2,26 +2,26 @@ {% block content %}
{% for post in paginator.pages %} -
-

{{ post.title }}

- {% if post.summary %} - {{ post.summary | safe }} - {% endif %} -
+
+

{{ post.title }}

+ {% if post.summary %} + {{ post.summary | safe }} + {% endif %} +
{% endfor %}
{% if paginator %} -{% if paginator.number_pagers > 1 %} -
- {% if paginator.previous %} - First - Previous page: {{ paginator.current_index - 1 }} - {% endif %} - {% if paginator.next %} - Next page: {{ paginator.current_index + 1 }} - Last + {% if paginator.number_pagers > 1 %} +
+ {% if paginator.previous %} + First + Previous page: {{ paginator.current_index - 1 }} + {% endif %} + {% if paginator.next %} + Next page: {{ paginator.current_index + 1 }} + Last + {% endif %} +
{% endif %} -
-{% endif %} {% endif %} {% endblock %} -- cgit v1.2.3