From 7b43ee60e5e64c8621c3f89e07290e24f0b9ea63 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Fri, 22 May 2020 12:25:50 +0200 Subject: [PATCH] template: compare lastmod and publishdate Most of blog posts have the lastmod displayed even if the publishdate is the same day, because lastmod comes from git information and has also hour, minutes and second, and publishdate is set manually, with only year, month and day. * Formats the date to compare them accurately, with datFormat function. * Styles a little bit the blockquote tag. * Spaces evenly the post information blocks. * Closes #5 Co-Authored-by: Igor Milhit --- assets/scss/_main_body.scss | 4 +++- assets/scss/_post.scss | 1 + layouts/partials/post-info.html | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/assets/scss/_main_body.scss b/assets/scss/_main_body.scss index 30658ad..11736c4 100644 --- a/assets/scss/_main_body.scss +++ b/assets/scss/_main_body.scss @@ -34,4 +34,6 @@ dd { } } - +blockquote { + font-style: italic; +} diff --git a/assets/scss/_post.scss b/assets/scss/_post.scss index 2d9898d..97741a6 100644 --- a/assets/scss/_post.scss +++ b/assets/scss/_post.scss @@ -13,6 +13,7 @@ .post-info { display: flex; + justify-content: space-between; flex-wrap: wrap; padding: 0; margin-top: 0; diff --git a/layouts/partials/post-info.html b/layouts/partials/post-info.html index ad81012..e83bb26 100644 --- a/layouts/partials/post-info.html +++ b/layouts/partials/post-info.html @@ -1,6 +1,9 @@ +{{ $LastmodFormatted := dateFormat "2006-01-02" (.Lastmod) }} +{{ $PublishdateFormatted := dateFormat "2006-01-02" (.PublishDate) }} +