diff options
author | Justin Mayer <entroP@gmail.com> | 2019-01-21 09:47:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-21 09:47:46 +0100 |
commit | 8e5e02d9cc4289eb29c67b39ed807b77d19e798b (patch) | |
tree | f6e42e7ec40e21d1283e122ef7aa17e4ae7ec4c8 /gum | |
parent | 4c135acf3976686f101ce9438ff2ae9c0e1af7cc (diff) | |
parent | 3fd6c5cd6bc414c54e1bce9ea214c6402e97b725 (diff) | |
download | pelican-themes-8e5e02d9cc4289eb29c67b39ed807b77d19e798b.tar.gz |
Merge pull request #632 from askpatrickw/patch-1
Gum: Honor conditional categories and pages
Diffstat (limited to 'gum')
-rw-r--r-- | gum/templates/sidebar.html | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/gum/templates/sidebar.html b/gum/templates/sidebar.html index a65192a..3eccf79 100644 --- a/gum/templates/sidebar.html +++ b/gum/templates/sidebar.html @@ -1,32 +1,30 @@ <div class="three columns"> -<h4>Pages</h4> - - <ul> - {% for title, link in MENUITEMS %} - <li><a href="{{ link }}">{{ title }}</a></li> - {% endfor %} {% if DISPLAY_PAGES_ON_MENU %} + <h4>Pages</h4> + + <ul> + {% for title, link in MENUITEMS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + {% for p in pages %} - <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li> + <li {% if p==page %} class="active" {% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li> {% endfor %} - {% else %} - {% if DISPLAY_CATEGORIES_ON_MENU %} - {% for cat, null in categories %} - <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li> - {% endfor %} - {% endif %} + {% else %} + </ul> {% endif %} + + {% if DISPLAY_CATEGORIES_ON_MENU %} + {% if categories and categories|length > 1 %} + <h4>Categories</h4> + <ul class="blank"> + {% for cat, null in categories %} + <li><a href="{{ SITEURL }}/{{ cat.url|e }}">{{ cat }}</a></li> + {% endfor %} </ul> - -{% if categories and categories|length > 1 %} -<h4>Categories</h4> -<ul class="blank"> - {% for cat, null in categories %} - <li><a href="{{ SITEURL }}/{{ cat.url|e }}">{{ cat }}</a></li> - {% endfor %} -</ul> -{% endif %} + {% endif %} + {% endif %} {% if tag_cloud %} |