about summary refs log tree commit diff
path: root/templates
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2018-05-22T16·35+0200
committerVincent Ambo <github@tazj.in>2018-05-22T18·44+0200
commitf5badb97d333ffbc2d294cbff3afda0bd4879b56 (patch)
tree8bb9d91964f45f6d8ce944b946746512f2adab91 /templates
parentd90dc2d77fd813257e24a45456cb6b10791999e6 (diff)
refactor(templates): Use Askama for index template
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/index.html b/templates/index.html
index c104938996e1..bff734bdab26 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -41,21 +41,21 @@
             <div class="mdl-card__supporting-text mdl-grid">
               <h4 class="mdl-cell mdl-cell--12-col">Latest threads:</h4>
               <ul class="mdl-list">
-                {% for thread in threads -%}
+                {% for thread in threads %}
                 <li class="mdl-list__item thread-list-item mdl-list__item--three-line">
                   <a class="thread-link mdl-color-text--grey-800" href="/thread/{{ thread.id }}">
-                    <span class="mdl-list__item-primary-content {% if not loop.last %}thread-divider{% endif %}">
+                    <span class="mdl-list__item-primary-content {% if loop.index < threads.len() %}thread-divider{% endif %}">
                       <button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored mdl-list__item-icon">
-                        <i class="material-icons">{% if thread.sticky -%} announcement {%- else -%} library_books{% endif %}</i>
+                        <i class="material-icons">{% if thread.sticky %}announcement{% else %}library_books{% endif %}</i>
                       </button>
-                      <span class="thread-title">{{ thread.title | safe }}<span class="thread-author"> by {{ thread.author_name }}</span></span>
+                      <span class="thread-title">{{ thread.title }}<span class="thread-author"> by {{ thread.author_name }}</span></span>
                       <span class="mdl-list__item-text-body">
                         Last reply by {{ thread.post_author }} on {{ thread.posted }}.
                       </span>
                     </span>
                   </a>
                 </li>
-                {%- endfor %}
+                {% endfor %}
               </ul>
             </div>
           </div>