From 4dbb58d03ca190e29e69aa49de33926533619554 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 20 Jun 2018 23:06:09 +0100 Subject: [PATCH] Move into partials --- source/_layouts/post.html.twig | 15 ++------------- source/_partials/post/old-post-message.html.twig | 8 ++++++++ .../_partials/post/questions-comments.html.twig | 3 +++ 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 source/_partials/post/old-post-message.html.twig create mode 100644 source/_partials/post/questions-comments.html.twig diff --git a/source/_layouts/post.html.twig b/source/_layouts/post.html.twig index 20c798a5..e95ee869 100644 --- a/source/_layouts/post.html.twig +++ b/source/_layouts/post.html.twig @@ -5,24 +5,13 @@ {% include 'post/intro-image' %}
- {% set limit = 'now'|date_modify('-12 months')|date('U') %} - {% if page.date|date('U') < limit %} -
-

- Warning: 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. -

-
- {% endif %} - + {% include 'post/old-post-message' %} {{ page.summary|markdown }} {% block excerpt %}{% endblock %} {% block content %}{% endblock %}
-
-

Questions? Comments? I’m @{{ site.twitter.name }} on Twitter.

-
- + {% include 'post/questions-comments' %} {% include 'post/tags' %} {% include 'post/pager' %} {% include 'post/about-author' %} diff --git a/source/_partials/post/old-post-message.html.twig b/source/_partials/post/old-post-message.html.twig new file mode 100644 index 00000000..ddf7acf5 --- /dev/null +++ b/source/_partials/post/old-post-message.html.twig @@ -0,0 +1,8 @@ +{% if page.date|date('U') < 'now'|date_modify('-12 months')|date('U') %} +
+

+ Warning: + 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. +

+
+{% endif %} diff --git a/source/_partials/post/questions-comments.html.twig b/source/_partials/post/questions-comments.html.twig new file mode 100644 index 00000000..fce9f03c --- /dev/null +++ b/source/_partials/post/questions-comments.html.twig @@ -0,0 +1,3 @@ +
+

Questions? Comments? I’m @{{ site.twitter.name }} on Twitter.

+