aboutsummaryrefslogtreecommitdiffstats
path: root/tuxlite_tbs
diff options
context:
space:
mode:
authorStig Inge Lea Bjørnsen <stiginge@pvv.org>2014-05-28 00:16:12 +0200
committerStig Inge Lea Bjørnsen <stiginge@pvv.org>2015-01-05 06:27:36 +0100
commitfd56d73a2772dd5ccc14b4ac19736b782fde85c2 (patch)
treee514f3d18f44046153f6ce3dfcecbffcee4214c4 /tuxlite_tbs
parent0deaa64b5000fca5a9b10b1694e5013f57696253 (diff)
downloadpelican-themes-fd56d73a2772dd5ccc14b4ac19736b782fde85c2.zip
pelican-themes-fd56d73a2772dd5ccc14b4ac19736b782fde85c2.tar.gz
pelican-themes-fd56d73a2772dd5ccc14b4ac19736b782fde85c2.tar.bz2
Use the year of the latest post for the copyright in the footer.
The method for obtaining the year was copied from `pelican-bootstrap3/templates/includes/footer.html`.
Diffstat (limited to 'tuxlite_tbs')
-rw-r--r--tuxlite_tbs/templates/base.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/tuxlite_tbs/templates/base.html b/tuxlite_tbs/templates/base.html
index 9b52cbe..bcde895 100644
--- a/tuxlite_tbs/templates/base.html
+++ b/tuxlite_tbs/templates/base.html
@@ -156,7 +156,12 @@
<footer>
<br />
-<p><a href="{{ SITEURL }}">{{ SITENAME }}</a> &copy; {{ AUTHOR }} 2012</p>
+{% if articles %}
+ {% set copy_date = articles[0].date.strftime('%Y') %}
+{% else %}
+ {% set copy_date = '' %}
+{% endif %}
+<p><a href="{{ SITEURL }}">{{ SITENAME }}</a> &copy; {{ AUTHOR }} {{ copy_date }}</p>
</footer>
</div> <!-- /container -->