From d62120cffa8f0c244a85799665e3506f41c91003 Mon Sep 17 00:00:00 2001 From: -k Date: Tue, 21 Jan 2025 14:00:08 -0500 Subject: [PATCH 1/5] fix: improve navigation container fixes #37 --- sass/_search.scss | 35 +---------------------------------- sass/_site.scss | 34 +++++++++++++++++++++------------- templates/base.html | 26 ++++++++++++++------------ 3 files changed, 36 insertions(+), 59 deletions(-) diff --git a/sass/_search.scss b/sass/_search.scss index c6e569a..feb497b 100644 --- a/sass/_search.scss +++ b/sass/_search.scss @@ -1,9 +1,8 @@ .search-container { - position: absolute; font-size: 12px; top: 20px; left: 26px; - width: 20vw; + width: 42%; max-width: 300px; z-index: 2; input { @@ -59,38 +58,6 @@ } } -@media screen and (max-width: 960px) { - .search-container { - width: 30vw; - } - - .search-results { - width: 65vw; - right: unset; - margin-right: -50%; - } -} - -@media screen and (max-width: 640px) { - .search-container { - width: 65vw; - max-width: 325px; - top: 70px; - left: 50%; - right: unset; - margin-right: -50%; - transform: translate(-50%, 0); - } - - .search-results { - width: 75vw; - left: 25%; - right: unset; - margin-right: -25%; - transform: translate(-30%, 0); - } -} - @media (prefers-color-scheme: dark) { .search-container { input { diff --git a/sass/_site.scss b/sass/_site.scss index e2bb79d..ca39ae7 100644 --- a/sass/_site.scss +++ b/sass/_site.scss @@ -11,8 +11,10 @@ width: 65%; float: right; overflow-y: auto; + text-align: justify; .content { - padding: 120px 10% 60px; + margin-bottom: auto; + padding: 0px 10% 0px; } } @@ -44,9 +46,8 @@ align-items: center; } .content { - padding: 120px 60px 60px; + padding: 0px 60px 0px; max-width: 600px; - min-height: 94%; } } } @@ -62,12 +63,23 @@ } nav.nav-bar { - position: absolute; + display: flex; + gap: 20px; + flex-direction: row-reverse; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + flex: 1 1 22px; top: 20px; - right: 26px; z-index: 2; } +#nav-container { + margin: 20px; + display: flex; + flex-direction: row-reverse; +} + nav.nav-bar ul { font-size: 12px; text-transform: uppercase; @@ -807,13 +819,14 @@ a.zola-anchor { } .footer-content { + vertical-align: bottom; + margin-top: auto; position: relative; display: flex; justify-content: center; align-items: center; height: auto; line-height: 0.6rem; - bottom: 0; } .footer-links { @@ -868,12 +881,6 @@ a.zola-anchor { grid-template-rows: repeat(4, auto); } } - nav.nav-bar { - left: 50%; - right: unset; - margin-right: -50%; - transform: translate(-50%, 0); - } .inner-post { h1 { line-height: 36px; @@ -907,7 +914,8 @@ a.zola-anchor { } .block-right { .content { - padding: 145px 20px 40px; + height: 100%; + padding: 0px 20px 0px; } } .projects { diff --git a/templates/base.html b/templates/base.html index f3dd2d9..4010d66 100644 --- a/templates/base.html +++ b/templates/base.html @@ -39,19 +39,10 @@

{%- block page_title %}{% if page.title %}{{ page.titl
- {% if config.build_search_index == true %} - - - - {% endif %} + {% block nav %} + + {% endblock nav %} {% block right %}
{% block date %}
{% if page.date %}{{ page.date | date(format="%d %b %Y") }}{% else %}x{% endif %}
{% endblock date %} From 2b80b40c17717dc797be019c10dbcaaa49765f0a Mon Sep 17 00:00:00 2001 From: -k Date: Wed, 22 Jan 2025 15:12:51 -0500 Subject: [PATCH 2/5] fix: improve content layout --- sass/_site.scss | 35 +++++++++++++++++++++-------------- templates/page.html | 3 ++- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/sass/_site.scss b/sass/_site.scss index ca39ae7..8bf4353 100644 --- a/sass/_site.scss +++ b/sass/_site.scss @@ -13,8 +13,10 @@ overflow-y: auto; text-align: justify; .content { + display: flex; + flex-direction: column; margin-bottom: auto; - padding: 0px 10% 0px; + padding: 0px 10% 52px; } } @@ -43,11 +45,15 @@ display: block; > div { display: flex; + text-align: justify; align-items: center; } .content { - padding: 0px 60px 0px; - max-width: 600px; + display: flex; + padding: 0px 10% 52px; + margin-bottom: auto; + align-items: center; + justify-content: center; } } } @@ -58,7 +64,7 @@ } .content { - margin: 0 auto; + margin: 0 20px; overflow-wrap: break-word; } @@ -384,14 +390,21 @@ a.zola-anchor { } } +.post-info { + text-align: start; + display: flex; + align-items: flex-start; +} + #posts { .block-right { - display: block; + display: flex; + flex-direction: column; height: 100%; .content { height: auto; - min-height: 94%; - display: block; + display: flex; + flex-direction: column; } } .logo { @@ -425,7 +438,6 @@ a.zola-anchor { } .posts-list { - margin: 50px 0; > li { margin-bottom: 23px; padding-bottom: 20px; @@ -564,7 +576,6 @@ a.zola-anchor { .post-music { justify-content: center; align-items: center; - height: 100%; position: relative; padding: 6px 10px; display: inline-flex; @@ -646,7 +657,7 @@ a.zola-anchor { .date-highlight { text-align: center; font-size: 16px; - margin: 0 0 50px; + margin: 50px 0 50px; color: $overlay-color; display: -webkit-box; display: -moz-box; @@ -810,10 +821,6 @@ a.zola-anchor { } } -.toc-block { - margin-bottom: 26px; -} - .toc-anchor { font-size: 15px; } diff --git a/templates/page.html b/templates/page.html index 57be1fa..c072ac8 100644 --- a/templates/page.html +++ b/templates/page.html @@ -21,7 +21,7 @@

{{ page.title | safe }}

{% if page.extra.subtitle %}

{{ page.extra.subtitle | safe}}

{% endif %} {% if current_path is starting_with("/posts/") %} {% if config.extra.read_time == true or page.updated %} -
+