diff options
author | Stig Inge Lea Bjørnsen <stiginge@pvv.org> | 2014-05-28 00:16:12 +0200 |
---|---|---|
committer | Stig Inge Lea Bjørnsen <stiginge@pvv.org> | 2015-01-05 06:27:36 +0100 |
commit | fd56d73a2772dd5ccc14b4ac19736b782fde85c2 (patch) | |
tree | e514f3d18f44046153f6ce3dfcecbffcee4214c4 /tuxlite_tbs/templates | |
parent | 0deaa64b5000fca5a9b10b1694e5013f57696253 (diff) | |
download | pelican-themes-fd56d73a2772dd5ccc14b4ac19736b782fde85c2.tar.gz |
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/templates')
-rw-r--r-- | tuxlite_tbs/templates/base.html | 7 |
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> © {{ AUTHOR }} 2012</p> +{% if articles %} + {% set copy_date = articles[0].date.strftime('%Y') %} +{% else %} + {% set copy_date = '' %} +{% endif %} +<p><a href="{{ SITEURL }}">{{ SITENAME }}</a> © {{ AUTHOR }} {{ copy_date }}</p> </footer> </div> <!-- /container --> |