Extract a partial, update spacing

This commit is contained in:
Oliver Davies 2019-03-07 02:59:55 +00:00
parent d5028b9110
commit 8cdf0dfc6e
4 changed files with 12 additions and 4 deletions

View file

@ -1,11 +1,11 @@
<div class="spaced-y-1">
<div class="spaced-y-px">
<div class="spaced-y-2">
<div class="spaced-y-2px">
<h2 class="text-inherit text-lg m-0">
{{ post.draft ? 'Draft: '|upper }}{{ post.title }}
</h2>
{% if show_date %}
<time class="text-sm mb-1 block" datetime="{{ post.date|date('Y-m-d') }}">{{ post.date|date('jS F Y') }}</time>
{% include 'posts/post-date' with { class: 'text-sm block mb-1' } %}
{% endif %}
</div>

View file

@ -2,6 +2,6 @@
<h1 class="leading-tight mb-2">{{ page.title }}</h1>
<p class="text-grey-dark">
<span class="visuallyhidden">Posted on </span>{{ page.date|date('jS F Y') }}
{% include 'posts/post-date' %}
</p>
</div>

View file

@ -0,0 +1,4 @@
<time class="{{ class }}" datetime="{{ post.date|date('Y-m-d') }}">
<span class="visuallyhidden">Posted on </span>
{{ post.date|date('jS F Y') }}
</time>

View file

@ -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',