refactor: rename _partials
to _includes
This commit is contained in:
parent
0482badc95
commit
a445072048
17 changed files with 0 additions and 0 deletions
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 %}
|
Loading…
Add table
Add a link
Reference in a new issue