diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2019-08-10 12:01:07 +1000 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2019-08-10 12:01:07 +1000 |
| commit | 8dfdc5e33514443e463b1accc1053dc986def4d4 (patch) | |
| tree | 46860a907e32a7a3c10122ba3e8692fee055e5f0 /templates/themes | |
| parent | c8d609ecf15eee27ad393f6d711ead87b99a04c7 (diff) | |
Based on #157 and #158, revert back to existence checks and length rather than default empty array initialization for ease of reading
Diffstat (limited to 'templates/themes')
| -rw-r--r-- | templates/themes/basic/index.html | 2 | ||||
| -rw-r--r-- | templates/themes/categories/news.html | 2 | ||||
| -rw-r--r-- | templates/themes/frameset/news.html | 2 | ||||
| -rw-r--r-- | templates/themes/recent/recent.html | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/templates/themes/basic/index.html b/templates/themes/basic/index.html index a444be71..94bc79d0 100644 --- a/templates/themes/basic/index.html +++ b/templates/themes/basic/index.html @@ -24,7 +24,7 @@ <img src="static/lain_is_cute_datass_small_teal.png" alt="mascot"/> </center> <div class="ban"> - {% if news|default([])|length == 0 %} + {% if not news %} <p style="text-align:center" class="unimportant">(No news to show.)</p> {% else %} {% for entry in news %} diff --git a/templates/themes/categories/news.html b/templates/themes/categories/news.html index a51cc0f6..dc6387c5 100644 --- a/templates/themes/categories/news.html +++ b/templates/themes/categories/news.html @@ -14,7 +14,7 @@ </header> <div class="ban"> - {% if news|default([])|length == 0 %} + {% if not news %} <p style="text-align:center" class="unimportant">{% trans %}(No news to show.){% endtrans %}</p> {% else %} {% for entry in news %} diff --git a/templates/themes/frameset/news.html b/templates/themes/frameset/news.html index 04f89f87..0719079f 100644 --- a/templates/themes/frameset/news.html +++ b/templates/themes/frameset/news.html @@ -13,7 +13,7 @@ </header> <div class="ban"> - {% if news|default([])|length == 0 %} + {% if not news %} <p style="text-align:center" class="unimportant">(No news to show.)</p> {% else %} {% for entry in news %} diff --git a/templates/themes/recent/recent.html b/templates/themes/recent/recent.html index 02132d03..0d131bff 100644 --- a/templates/themes/recent/recent.html +++ b/templates/themes/recent/recent.html @@ -36,7 +36,7 @@ <br> <div class="ban" id="global3"> <h2>Latest News</h2> - {% if recent_news|default([])|length == 0 %} + {% if not recent_news %} <p style="text-align:center" class="unimportant">(No news to show.)</p> {% else %} {% for entry in recent_news %} |
