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

hiro at torproject.org hiro at torproject.org
Thu Sep 12 15:53:29 UTC 2019


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