aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-04-07 18:01:37 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2022-04-07 19:00:30 +0200
commit47acc9f083cd1d7dcb553e02a0d20dc41a4417e4 (patch)
treed2ad54dc3cd714bdddf0fbd0897e2eb0b1cb1124
parentcss: add class .text-monospace (diff)
downloadjekyll-theme-47acc9f083cd1d7dcb553e02a0d20dc41a4417e4.tar.gz
jekyll-theme-47acc9f083cd1d7dcb553e02a0d20dc41a4417e4.zip
sidebar: wrap post-header, don't shrink post-date
-rw-r--r--_includes/jekyll-theme/sidebar.html2
-rw-r--r--_includes/jekyll-theme/sidebar/latest-posts.html2
-rw-r--r--assets/css/jekyll-theme/posts.css7
3 files changed, 9 insertions, 2 deletions
diff --git a/_includes/jekyll-theme/sidebar.html b/_includes/jekyll-theme/sidebar.html
index 2ffe91b..89d660d 100644
--- a/_includes/jekyll-theme/sidebar.html
+++ b/_includes/jekyll-theme/sidebar.html
@@ -1,5 +1,5 @@
{% unless site.settings.sidebar.hide or page.sidebar.hide %}
-<div class="row">
+<div class="row sidebar">
{% include jekyll-theme/sidebar/latest-posts.html %}
{% include custom-sidebar.html %}
{% include jekyll-theme/sidebar/about.html %}
diff --git a/_includes/jekyll-theme/sidebar/latest-posts.html b/_includes/jekyll-theme/sidebar/latest-posts.html
index a2ac843..17251e3 100644
--- a/_includes/jekyll-theme/sidebar/latest-posts.html
+++ b/_includes/jekyll-theme/sidebar/latest-posts.html
@@ -10,7 +10,7 @@
<a class="list-group-item" href="{{ post.url | relative_url }}">
<h5 class="list-group-item-heading post-header">
<span>{{ post.title }}</span>
- <small><span class="glyphicon glyphicon-time"></span>&nbsp;{{ post.date | date: '%-d %b %Y' }}</small>
+ <small class="post-date"><span class="glyphicon glyphicon-time"></span>&nbsp;{{ post.date | date: '%-d %b %Y' }}</small>
</h5>
</a>
{% endfor %}
diff --git a/assets/css/jekyll-theme/posts.css b/assets/css/jekyll-theme/posts.css
index 2635075..c90454c 100644
--- a/assets/css/jekyll-theme/posts.css
+++ b/assets/css/jekyll-theme/posts.css
@@ -14,6 +14,13 @@
margin-right: .5em;
}
+.sidebar .post-header {
+ flex-wrap: nowrap;
+}
+.sidebar .post-date {
+ flex-shrink: 0;
+}
+
.post-entry {
margin-bottom: 15px;
/* The color of <hr>. */