[tor-commits] [lego/master] Update breadcrubs template

hiro at torproject.org hiro at torproject.org
Thu Sep 12 15:03:21 UTC 2019


commit 0c596e05d25877bd918f64561200084985a365c7
Author: hiro <hiro at torproject.org>
Date:   Thu Sep 12 17:03:15 2019 +0200

    Update breadcrubs template
---
 templates/breadcrumb.html | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/templates/breadcrumb.html b/templates/breadcrumb.html
index 6f99a4d..d8518ae 100644
--- a/templates/breadcrumb.html
+++ b/templates/breadcrumb.html
@@ -1,13 +1,8 @@
 <nav aria-label="breadcrumb">
   <ol class="breadcrumb">
-  {% set root = site.get('/') %}
-  {% for child in root.children recursive %}
-    <li{% if this._path == child._path %} class="breadcrumb-item active"{% endif
-        %}><a href="{{ child|url }}">{{ child.title }}</a>
-      {% if this.is_child_of(child) %}
-      <ul>{{ loop(child.children) }}</ul>
-      {% endif %}
-    </li>
-  {% endfor %}
+    {% if this.parent %}
+      <li class="breadcrumb-item active" aria-current="page">{{ this.parent.title }}</li>
+    {% endif %}
+    <li class="breadcrumb-item active" aria-current="page">{{ this.title }}</li>
   </ol>
 </nav>



More information about the tor-commits mailing list