From fdfed03411884c7c6da48f08e38f75c9ab2f35f7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 8 Nov 2021 09:05:51 +0300 Subject: put post dates beside the headers --- _includes/posts/posts.html | 18 +++++++++++++----- _layouts/post.html | 18 +++++++++++++----- assets/css/common/misc.css | 13 +++++++++++++ 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/_includes/posts/posts.html b/_includes/posts/posts.html index 39dd858..c20ad69 100644 --- a/_includes/posts/posts.html +++ b/_includes/posts/posts.html @@ -3,11 +3,19 @@
{% else %} {% for post in paginator.posts %} -

{{ post.title }}

-

-  Posted on {{ post.date | date: '%-d %B %Y' }} - {%- if post.category %} in  {{ post.category }}{% endif %} -

+
+ + +
{{ post.excerpt | markdownify }}
{% endfor %} diff --git a/_layouts/post.html b/_layouts/post.html index 6c4737d..8ec7626 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,10 +1,18 @@ --- layout: default --- -

{{ page.title }}

-

-  Posted on {{ page.date | date: '%-d %B %Y' }} - {%- if page.category %} in  {{ page.category }}{% endif %} -

+
+
+

{{ page.title }}

+
+ +
{{ content }}
diff --git a/assets/css/common/misc.css b/assets/css/common/misc.css index 492a186..f5a1e95 100644 --- a/assets/css/common/misc.css +++ b/assets/css/common/misc.css @@ -39,3 +39,16 @@ pre code { .text-muted a.category { color: inherit; } + +/* This is a relatively popular workaround to align side-by-side columns. + * I use it for post headers. */ +.post-header { + display: flex; + flex-wrap: wrap; + align-items: baseline; +} +@media (min-width: 768px) { + .post-date { + text-align: right; + } +} -- cgit v1.2.3