summaryrefslogtreecommitdiff
path: root/theme
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2015-12-17 21:06:10 (GMT)
committerWerner Almesberger <werner@almesberger.net>2015-12-17 21:09:56 (GMT)
commitdc2f7d6bdb6900e9d1511aea1651997bebe67b59 (patch)
tree7c2e6a8c05e73b29695adce01463e3b83dc27293 /theme
parentd72b2d3eac25f81eb33aa82b8fa8bde32461649a (diff)
downloadwww-dc2f7d6bdb6900e9d1511aea1651997bebe67b59.zip
www-dc2f7d6bdb6900e9d1511aea1651997bebe67b59.tar.gz
www-dc2f7d6bdb6900e9d1511aea1651997bebe67b59.tar.bz2
theme/templates/index.html: force conversion of category to string
Pelican started to mis-render the page when running it locally. The exact reason is still unclear, but this was apparently caused by "news" in category[0] not being considered a string (though, when output, it would be indistinguishable from one), causing the comparisons to always fail. See also http://stackoverflow.com/questions/12623768/compare-two-variables-in-jinja2-template This fix or work-around should produce no visible difference on neo900.org
Diffstat (limited to 'theme')
-rw-r--r--theme/templates/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/theme/templates/index.html b/theme/templates/index.html
index 89497b3..0104542 100644
--- a/theme/templates/index.html
+++ b/theme/templates/index.html
@@ -20,7 +20,7 @@
<div class="row" style="padding:0">
<div class="col-md-6" style="border-right: 1px solid #eee">
- {% for category in categories if category[0] == 'news' %}
+ {% for category in categories if category[0]|string() == 'news' %}
<div>
<div style="float: right;">
<a href="/feeds/news.atom.xml" target="_blank"><img src="/static/rss.png" style="vertical-align: bottom"/></a><br/>
@@ -89,7 +89,7 @@
<div>
- {% for category in categories if category[0] == 'ublog' %}
+ {% for category in categories if category[0]|string() == 'ublog' %}
<div class="bs-sidebar" style="font-size: 0.7em">
<ul class="nav nav-list bs-sidenav" style="padding: 10px 10px 0 0; max-height: 400px; overflow-y: auto">
{% for post in category[1] %}