diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-10-25 12:25:42 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-10-25 12:39:01 +0200 |
commit | 7cfef661469ffed7d77973adb3f9ecef5fd27668 (patch) | |
tree | 4c944f45e3c9e52ff823a0ff2a6f7ff0d6676406 | |
parent | remove post excerpts, they are useless now (diff) | |
download | jekyll-theme-7cfef661469ffed7d77973adb3f9ecef5fd27668.tar.gz jekyll-theme-7cfef661469ffed7d77973adb3f9ecef5fd27668.zip |
posts: right-align the date
Also, don't wrap if not necessary.
Diffstat (limited to '')
-rw-r--r-- | assets/css/jekyll-theme/posts.css | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/assets/css/jekyll-theme/posts.css b/assets/css/jekyll-theme/posts.css index 901f1dd..af3674a 100644 --- a/assets/css/jekyll-theme/posts.css +++ b/assets/css/jekyll-theme/posts.css @@ -1,29 +1,19 @@ -/* On the sidebar, the date is always beside the header. - * On smaller devices, the date is always beneath the header. - * On the post page, the date is beside the header or wraps to the next line on - * larger devices. - * In the feed, the date is always beside the header on larger devices. */ -@media (min-width: 768px) { - .post-header { - display: flex; - align-items: baseline; - justify-content: space-between; - column-gap: 1em; - } - :not(.feed-entry) > .post-header { - flex-wrap: wrap; - } -} -.list-group-item .post-header { +/* Wrap the post date to the next line if necessary. */ +.post-header { display: flex; - flex-wrap: nowrap; + flex-wrap: wrap; align-items: baseline; justify-content: space-between; - column-gap: 1em; + column-gap: 1.5em; +} +.list-group-item .post-header { + flex-wrap: nowrap; } .post-date { flex: none; + /* Right-align the post date if on the next line. */ + margin-left: auto; } .post-date .category { margin-right: 1em; |