[tor-commits] [lego/develop] Update to breadcrumbs

hiro at torproject.org hiro at torproject.org
Tue Apr 7 16:13:24 UTC 2020


commit 02e4f3b269e2246d0bbed1692a2d09c18c788028
Author: hiro <hiro at torproject.org>
Date:   Thu Sep 12 17:53:25 2019 +0200

    Update to breadcrumbs
---
 templates/macros/parent.html | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/templates/macros/parent.html b/templates/macros/parent.html
index 9625824..a6333dd 100644
--- a/templates/macros/parent.html
+++ b/templates/macros/parent.html
@@ -1,19 +1,9 @@
 {% macro render_parents(item) %}
   {% if item.parent %}
-    {% for _ in range(1, 5) %}
-      {% set parent = item.parent %}
-      {% if parent %}
-        {% if parent.path == "/" %}
-          {# break #}
-        {% else %}
-          <li class="breadcrumb-item active" aria-current="page">
-            <a href="{{ parent.path|url }}">
-              {{ parent.title }}
-            </a>
-          </li>
-        {% endif %}
-      {% endif %}
-      {% set item = item.parent %}
-    {% endfor %}
+    <li class="breadcrumb-item active" aria-current="page">
+      <a href="{{ parent.path|url }}">
+        {{ parent.title }}
+      </a>
+    </li>
   {% endif %}
 {% endmacro %}





More information about the tor-commits mailing list