mirror of
https://github.com/torproject/lego.git
synced 2024-11-26 19:20:22 +00:00
Fix breadcrumb for lektor and bootstrap. Thanks @eeshangarg
This commit is contained in:
parent
de8aa0d721
commit
dd4300733c
@ -1,7 +1,19 @@
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb bg-light m-0 small">
|
||||
{% from "macros/parent.html" import render_parents %}
|
||||
{{ render_parents(this) }}
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ this.title }}</li>
|
||||
</ol>
|
||||
<ol class="breadcrumb bg-light m-0 small">
|
||||
{% set crumbs = [] %}
|
||||
{% set current = {'crumb': this} %}
|
||||
{% for i in this._path.split("/") %}
|
||||
{% if current.crumb is not none %}
|
||||
{% if crumbs.insert(0, current.crumb) %}{% endif %}
|
||||
{% if current.update({"crumb": current.crumb.parent}) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for crumb in crumbs %}
|
||||
{% if this._path == crumb._path %}
|
||||
<li class="breadcrumb-item active">{{ crumb.title }}</li>
|
||||
{% else %}
|
||||
<li class="breadcrumb-item" aria-current="page"><a href="{{ crumb|url }}">{{ crumb.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</nav>
|
||||
|
Loading…
Reference in New Issue
Block a user