diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-10-24 12:49:57 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-10-25 11:41:35 +0200 |
commit | 37c72b707a73637ea0948de0c4956d263128c78b (patch) | |
tree | c0536844b13878c502c3023db2d219169af127ec | |
parent | README: update (diff) | |
download | jekyll-theme-37c72b707a73637ea0948de0c4956d263128c78b.tar.gz jekyll-theme-37c72b707a73637ea0948de0c4956d263128c78b.zip |
posts: redesign feed
* No more lame post excerpts.
* Smaller and cooler title font.
-rw-r--r-- | _includes/jekyll-theme/posts/feed.html | 1 | ||||
-rw-r--r-- | _includes/jekyll-theme/posts/header.html | 7 | ||||
-rw-r--r-- | assets/css/jekyll-theme/posts.css | 32 | ||||
-rw-r--r-- | 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 %} <a href="{{ post.url | relative_url }}" class="feed-entry"> {% include jekyll-theme/posts/header.html feed=true %} - <div class="text-muted">{{ post.excerpt | markdownify }}</div> </a> {% 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 @@ <div class="post-header"> - {% assign h = 'h1' %} {% if include.feed %} - {% assign h = 'h3' %} + <h5 class="text-monospace">{{ include.title }}</h5> {% else %} {% assign post = page %} + <h1><span class="font-size-90">{{ post.title }}</span></h1> {% endif %} - <{{ h }}><span class="font-size-90">{{ post.title }}</span></{{ h }}> <div class="post-date"> <p class="text-muted font-size-90"> {%- comment -%} @@ -26,7 +25,7 @@ </a> {%- endif -%} {%- endif -%} - <span class="glyphicon glyphicon-time"></span> <span class="text-monospace">{{ post.date | date: '%-d-%b-%Y' }}</span> + <span class="glyphicon glyphicon-time"></span> <span class="text-monospace">{{ post.date | date: '%d-%b-%Y' }}</span> </p> </div> </div> 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 <hr>, it's margins are too big, use a border instead. * The color of <hr>. */ - 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 %} |