chiark / gitweb /
theme: expect Python-like boolean value for navbar_brand_hidden field.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 6 Dec 2017 09:19:48 +0000 (10:19 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 6 Dec 2017 11:42:39 +0000 (12:42 +0100)
doc/admire/math.rst
doc/index.rst
doc/pelican/theme.rst
pelican-theme/templates/base.html

index 4e813db64873462a89f86157f7c518c6d4cd658b..dce7980572994525ed6f858ee841bd707c35e439 100644 (file)
@@ -33,6 +33,7 @@ m.css math
 :url: admire/math/
 :cover: {filename}/static/cover-math.jpg
 :summary: The fastest possible math rendering for the modern web
+:navbar_brand_hidden: False
 :footer:
     .. note-dim::
 
index c3751e1a99d2286ac0c847588ede39bb8083da0a..b90e3ff4641b79df33b217fa1008429af42e1c63 100644 (file)
@@ -30,7 +30,7 @@ m.css
 :cover: {filename}/static/cover.jpg
 :summary: A no-nonsense, no-JavaScript CSS framework and Pelican theme for
     content-oriented websites
-:navbar_brand_hidden: true
+:navbar_brand_hidden: True
 :landing:
     .. container:: m-row
 
index d05012a7f3998dfbecffb994e193d7336e028590..8321666760708bdac2ed51ffa06eeb0384db307a 100644 (file)
@@ -275,8 +275,9 @@ cover image spanning the whole window width. Put cover image URL into a
 :abbr:`reST <reStructuredText>`-processed content that appears on top of the
 cover image. Contents of the :rst:`:landing:` are put into a
 :html:`<div class="m-container">`, you are expected to fully take care of rows
-and columns in it. It's also possible to hide the navbar brand link --- simply
-add a :rst:`:navbar_brand_hidden:` field with non-empty contents.
+and columns in it. The :rst:`:navbar_brand_hidden:` field controls visibility
+of the navbar brand link. Set it to :py:`True` to hide it, default (if not
+present) is :py:`False`.
 
 .. block-warning:: Configuration
 
@@ -300,7 +301,7 @@ destination and URL.
     :save_as: index.html
     :url:
     :cover: {filename}/static/cover.jpg
-    :navbar_brand_hidden: true
+    :navbar_brand_hidden: True
     :landing:
         .. container:: m-row
 
index e6293b45a5400e185ac551901383687cd1cb14db..5373c3c07a2052f755e942d71961f2866c1f174c 100644 (file)
@@ -23,7 +23,7 @@
 <header><nav id="navigation"{% if page and page.landing and page.cover %} class="m-navbar-landing"{% endif %}{% if article and article.cover %} class="m-navbar-jumbo"{% endif %}>
   <div class="m-container">
     <div class="m-row">
-      <a href="{{ SITEURL }}/" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m{% if page and page.landing and page.cover and page.navbar_brand_hidden %} m-navbar-brand-hidden{% endif %}">
+      <a href="{{ SITEURL }}/" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m{% if page and page.landing and page.cover and page.navbar_brand_hidden == 'True' %} m-navbar-brand-hidden{% endif %}">
         {%- if M_SITE_LOGO %}<img src="{{ M_SITE_LOGO }}" />{% endif -%}
         {{- M_SITE_LOGO_TEXT -}}
       </a>