From: Vladimír Vondruš Date: Sat, 9 Dec 2017 21:43:01 +0000 (+0100) Subject: theme: sane default fine print, ability to hide (parts of) the footer. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=c49cbfaf992facccb1753e371dc69781b7f3ec6f;p=blog.git theme: sane default fine print, ability to hide (parts of) the footer. --- diff --git a/doc/pelican/theme.rst b/doc/pelican/theme.rst index 0cef2845..a51487b0 100644 --- a/doc/pelican/theme.rst +++ b/doc/pelican/theme.rst @@ -190,7 +190,18 @@ the same way as in the `top navbar`_. A tuple entry with empty title (i.e., Footer fine print can be specified via :py:`M_FINE_PRINT`. Contents of the variable are processed as :abbr:`reST `, so you can use all -the formatting and linking capabilities in there. +the formatting and linking capabilities in there. If :py:`M_FINE_PRINT` is not +specified, the theme will use the following instead. Set +:py:`M_FINE_PRINT = None` to disable rendering of the fine print completely. + +.. code:: py + + M_FINE_PRINT = SITENAME + """. Powered by `Pelican `_ + and `m.css `_.""" + +If :py:`M_FINE_PRINT` is set to :py:`None` and none of :py:`M_LINKS_FOOTER1`, +:py:`M_LINKS_FOOTER2`, :py:`M_LINKS_FOOTER3`, :py:`M_LINKS_FOOTER4` is set, the +footer is not rendered at all. Example configuration, again matching example markup from the `CSS page layout <{filename}/css/page-layout.rst#footer-navigation>`__ diff --git a/pelican-theme/templates/base.html b/pelican-theme/templates/base.html index f7b5c026..ef2566df 100644 --- a/pelican-theme/templates/base.html +++ b/pelican-theme/templates/base.html @@ -73,6 +73,7 @@ {% block main %} {% endblock %} +{% if M_LINKS_FOOTER1 or M_LINKS_FOOTER2 or M_LINKS_FOOTER3 or M_LINKS_FOOTER4 or not M_FINE_PRINT is defined or M_FINE_PRINT %} +{% endif %}