[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 2efff734ab17d359115fe18688198d56fa8bb5c9
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date:   Thu Sep 12 17:19:20 2019 +0200

    Update to breadcrumbs
---
 templates/breadcrumb.html | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/templates/breadcrumb.html b/templates/breadcrumb.html
index 210cb03..ecb9f88 100644
--- a/templates/breadcrumb.html
+++ b/templates/breadcrumb.html
@@ -1,12 +1,18 @@
 <nav aria-label="breadcrumb">
   <ol class="breadcrumb">
-    {% if this.parent %}
-      <li class="breadcrumb-item active" aria-current="page">
-        <a href="{{ this.parent.path|url }}">
-          {{ this.parent.title }}
-        </a>
-      </li>
-    {% endif %}
+    {% set parent = this.parent %}
+    {% for _ in range(1, 10) %}
+      {% if  parent.path == "/" %}
+        {% break %}
+      {% else %}
+        <li class="breadcrumb-item active" aria-current="page">
+          <a href="{{ parent.path|url }}">
+            {{ parent.title }}
+          </a>
+        </li>
+        {% set parent = parent.parent %}
+      {% endif %}
+    {% endfor %}
     <li class="breadcrumb-item active" aria-current="page">{{ this.title }}</li>
   </ol>
 </nav>



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits