|
130 | 130 | </nav>
|
131 | 131 | </header>
|
132 | 132 |
|
133 |
| - <!-- breadcrumb --> |
| 133 | + <!-- Breadcrumb --> |
134 | 134 | {% if this._path != '/'%}
|
135 |
| - <div class="breadcrumb-container"> |
136 |
| - <nav class="container breadcrumb caption bold" aria-label="breadcrumbs"> |
137 |
| - <ul> |
138 |
| - {% set crumbs = [] %} |
139 |
| - {% set current = {'crumb': this} %} |
140 |
| - <!-- Extracting the slugs of URL --> |
141 |
| - {% for i in this._path.split("/") %} |
142 |
| - {% if current.crumb is not none %} |
143 |
| - {% if crumbs.insert(0, current.crumb._slug) %}{% endif %} |
144 |
| - {% if current.update({"crumb": current.crumb.parent}) %}{% endif %} |
145 |
| - {% endif %} |
146 |
| - {% endfor %} |
147 |
| - {% for crumb in crumbs %} |
148 |
| - <!-- Active link --> |
149 |
| - {% if this._slug == crumb %} |
150 |
| - <li class="is-active"><a aria-current="page displayed">{{ crumb | title | replace('-', ' ') }}</a></li> |
151 |
| - {% else %} |
152 |
| - {% if crumb != 'blog' %} |
153 |
| - <!-- Forming the URL using extracted slugs --> |
154 |
| - {% set i = loop.index %} |
155 |
| - {% set ns = namespace (link = '') %} |
156 |
| - {% for j in range(i) %} |
157 |
| - {% set ns.link = ns.link + crumbs[j] + '/' %} |
158 |
| - {% endfor %} |
159 |
| - <li><a class="link" href="{{ ns.link|url }}"> |
160 |
| - {% if crumb != '' %} |
161 |
| - {{ crumb | title | replace('-', ' ') }} |
162 |
| - {% else %} |
163 |
| - Home |
164 |
| - {% endif %} |
165 |
| - </a></li> |
166 |
| - {% endif %} |
167 |
| - {% endif %} |
168 |
| - {% endfor %} |
169 |
| - </ul> |
170 |
| - </nav> |
171 |
| - </div> |
| 135 | + <div class="breadcrumb-container"> |
| 136 | + <nav class="container breadcrumb caption bold" aria-label="breadcrumbs"> |
| 137 | + <ul> |
| 138 | + {% set crumbs = [] %} |
| 139 | + {% set current = {'crumb': this} %} |
| 140 | + <!-- Extracting the slugs of URL --> |
| 141 | + {% for i in this._path.split("/") %} |
| 142 | + {% if current.crumb is not none %} |
| 143 | + {% if crumbs.insert(0, current.crumb._slug) %}{% endif %} |
| 144 | + {% if current.update({"crumb": current.crumb.parent}) %}{% endif %} |
| 145 | + {% endif %} |
| 146 | + {% endfor %} |
| 147 | + {% for crumb in crumbs %} |
| 148 | + <!-- Active link --> |
| 149 | + {% if this._slug == crumb %} |
| 150 | + <li class="is-active"><a aria-current="page displayed">{{ crumb | title | replace('-', ' ') }}</a></li> |
| 151 | + {% else %} |
| 152 | + <!-- Forming the URL using extracted slugs --> |
| 153 | + {% set i = loop.index %} |
| 154 | + {% set ns = namespace (link = '') %} |
| 155 | + {% for j in range(i) %} |
| 156 | + {% set ns.link = ns.link + crumbs[j] + '/' %} |
| 157 | + {% endfor %} |
| 158 | + <li><a class="link" href="{{ ns.link|url }}"> |
| 159 | + {% if crumb != '' %} |
| 160 | + {{ crumb | title | replace('-', ' ') }} |
| 161 | + {% else %} |
| 162 | + Home |
| 163 | + {% endif %} |
| 164 | + </a></li> |
| 165 | + {% endif %} |
| 166 | + {% endfor %} |
| 167 | + </ul> |
| 168 | + </nav> |
| 169 | + </div> |
172 | 170 | {% endif %}
|
173 | 171 |
|
174 | 172 | <!-- Body -->
|
|
0 commit comments