From 9b41a6d9e3e453cc350d70cb680693c2b375f1a4 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 7 Mar 2019 02:59:55 +0000 Subject: [PATCH] Extract a partial, update spacing --- source/_partials/blog/post-summary.html.twig | 6 +++--- source/_partials/post/header.html.twig | 2 +- source/_partials/posts/post-date.html.twig | 4 ++++ tailwind.config.js | 4 ++++ 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 source/_partials/posts/post-date.html.twig diff --git a/source/_partials/blog/post-summary.html.twig b/source/_partials/blog/post-summary.html.twig index 1eae1be2..d1dc9d8d 100644 --- a/source/_partials/blog/post-summary.html.twig +++ b/source/_partials/blog/post-summary.html.twig @@ -1,11 +1,11 @@ -
-
+
+

{{ post.draft ? 'Draft: '|upper }}{{ post.title }}

{% if show_date %} - + {% include 'posts/post-date' with { class: 'text-sm block mb-1' } %} {% endif %}
diff --git a/source/_partials/post/header.html.twig b/source/_partials/post/header.html.twig index 642da34a..35667cc5 100644 --- a/source/_partials/post/header.html.twig +++ b/source/_partials/post/header.html.twig @@ -2,6 +2,6 @@

{{ page.title }}

- Posted on {{ page.date|date('jS F Y') }} + {% include 'posts/post-date' %}

diff --git a/source/_partials/posts/post-date.html.twig b/source/_partials/posts/post-date.html.twig new file mode 100644 index 00000000..2b9d75c0 --- /dev/null +++ b/source/_partials/posts/post-date.html.twig @@ -0,0 +1,4 @@ + diff --git a/tailwind.config.js b/tailwind.config.js index c8435825..ad175893 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -31,6 +31,10 @@ module.exports = { 'mono': ['Roboto Mono', ...defaultConfig.fonts.mono], }, fontWeights: _.pick(defaultConfig.fontWeights, ['normal', 'medium', 'bold']), + margin: { + ...defaultConfig.margin, + '2px': '2px', + }, borderWidths: { ...defaultConfig.borderWidths, '3': '3px',