From 37c72b707a73637ea0948de0c4956d263128c78b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 24 Oct 2022 12:49:57 +0200 Subject: posts: redesign feed * No more lame post excerpts. * Smaller and cooler title font. --- _includes/jekyll-theme/posts/feed.html | 1 - _includes/jekyll-theme/posts/header.html | 7 +++---- assets/css/jekyll-theme/posts.css | 32 ++++++++++++++++---------------- feed/index.html | 3 ++- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/_includes/jekyll-theme/posts/feed.html b/_includes/jekyll-theme/posts/feed.html index 629e4ee..7f5c0c6 100644 --- a/_includes/jekyll-theme/posts/feed.html +++ b/_includes/jekyll-theme/posts/feed.html @@ -4,7 +4,6 @@ {% for post in paginator.posts %} {% include jekyll-theme/posts/header.html feed=true %} -
{{ post.excerpt | markdownify }}
{% endfor %} {% include jekyll-theme/posts/paginator.html %} diff --git a/_includes/jekyll-theme/posts/header.html b/_includes/jekyll-theme/posts/header.html index c59f12c..eabb22c 100644 --- a/_includes/jekyll-theme/posts/header.html +++ b/_includes/jekyll-theme/posts/header.html @@ -1,11 +1,10 @@
- {% assign h = 'h1' %} {% if include.feed %} - {% assign h = 'h3' %} +
{{ include.title }}
{% else %} {% assign post = page %} +

{{ post.title }}

{% endif %} - <{{ h }}>{{ post.title }}
diff --git a/assets/css/jekyll-theme/posts.css b/assets/css/jekyll-theme/posts.css index b24cbb7..901f1dd 100644 --- a/assets/css/jekyll-theme/posts.css +++ b/assets/css/jekyll-theme/posts.css @@ -26,7 +26,18 @@ flex: none; } .post-date .category { - margin-right: .5em; + margin-right: 1em; +} + +/* Add some margin after the last .feed-entry. */ +.feed-entry { + margin-bottom: 11px; +} +.feed-entry + .feed-entry { + margin-top: -11px; +} +.pagination { + margin-top: 11px; } .feed-entry { @@ -36,7 +47,7 @@ color: inherit !important; /* Don't use an actual
, it's margins are too big, use a border instead. * The color of
. */ - border-bottom: 3px solid #eee; + border-bottom: 1px solid #eee; } @media (min-width: 480px) { /* If the screen width allows for it, add some padding on the sides. */ @@ -56,23 +67,12 @@ background-color: #f5f5f5; } -.feed-entry h3 { +.feed-entry h5 { /* This is pretty funny and tragic, as is always the case with CSS. * Android's Chrome thinks that it's not necessary to highlight the top * margin (reproducible by long-pressing the link), _but_ it does highlight * the top padding. This is obviously a browser bug. */ - /* Also, set the value to a lower one, it's better that way. */ - margin-top: 0; - padding-top: 16px; -} -.feed-entry { - /* Add some padding on the bottom to match the top value. */ - padding-bottom: 5px; -} - -.pagination { - /* In my layout, there's always something under the paginator, and it always - * has a top margin, and the margins _never_ collapse. */ - margin-bottom: 0; + margin: 0; + padding: 15px 0 11px; } diff --git a/feed/index.html b/feed/index.html index 0288344..5baa951 100644 --- a/feed/index.html +++ b/feed/index.html @@ -6,6 +6,7 @@ navbar: priority: 2 paginated: true sidebar: - hide: true + latest_posts: + hide: true --- {% include jekyll-theme/posts/feed.html %} -- cgit v1.2.3