refactor: rename _partials
to _includes
This commit is contained in:
parent
0482badc95
commit
a445072048
17 changed files with 0 additions and 0 deletions
3
source/_includes/post/comments-questions.html.twig
Normal file
3
source/_includes/post/comments-questions.html.twig
Normal 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>
|
15
source/_includes/post/old-post-message.html.twig
Normal file
15
source/_includes/post/old-post-message.html.twig
Normal 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 %}
|
13
source/_includes/post/post-teaser.html.twig
Normal file
13
source/_includes/post/post-teaser.html.twig
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue