refactor: rename _partials to _includes

This commit is contained in:
Oliver Davies 2022-01-03 10:26:51 +00:00
parent 0482badc95
commit a445072048
17 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,3 @@
<footer>
<p>Comments or questions? I'm <a class="link" href="{{ twitter.url }}">@{{ twitter.name }}</a> on Twitter.</p>
</footer>

View file

@ -0,0 +1,15 @@
{% macro shouldDisplayOldPostMessage(post) %}
{% set cutOffDate = 'today -1 year'|date('U') %}
{% if post.date is not empty %}
{{ post.date <= cutOffDate }}
{% endif %}
{% endmacro %}
{% import _self as helpers %}
{% if helpers.shouldDisplayOldPostMessage(post)|trim %}
<div class="p-6 my-10 border border-gray-300 dark:bg-gray-800 dark:border-gray-700">
<p><strong>Warning:</strong> This post is over a year old. I don't always update old posts with new information, so some of this information may be out of date.</p>
</div>
{% endif %}

View file

@ -0,0 +1,13 @@
<article>
<h2>
<a class="text-blue-primary dark:text-blue-400" href="{{ post.url }}">
{{ post.title }}
</a>
</h2>
<time class="text-base" datetime="{{ post.date|date('Y-m-d') }}">
{{ post.date|date('jS F Y') }}
</time>
<p class="mt-1">{{ post.excerpt }}</p>
</article>