2025-2-26-fixed
This commit is contained in:
27
themes/next/layout/_partials/page/breadcrumb.swig
Normal file
27
themes/next/layout/_partials/page/breadcrumb.swig
Normal file
@ -0,0 +1,27 @@
|
||||
{%- set paths = page.path.split('/') %}
|
||||
{%- set count = paths.length %}
|
||||
{%- if count > 2 %}
|
||||
{%- set current = 0 %}
|
||||
{%- set link = '' %}
|
||||
<ul class="breadcrumb">
|
||||
{%- for path in paths %}
|
||||
{%- set current = current + 1 %}
|
||||
{%- if path != 'index.html' %}
|
||||
{%- if current == count - 1 and paths[count - 1] == 'index.html' %}
|
||||
<li>{{ path | upper }}</li>
|
||||
{% else %}
|
||||
{%- if link == '' %}
|
||||
{%- set link = '/' + path %}
|
||||
{% else %}
|
||||
{%- set link = link + '/' + path %}
|
||||
{%- endif %}
|
||||
{%- if path.includes('.html') %}
|
||||
<li>{{ path | replace('.html', '') | upper }}</li>
|
||||
{% else %}
|
||||
<li><a href="{{ url_for(link) }}/">{{ path | upper }}</a></li>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
{%- endif %}
|
||||
15
themes/next/layout/_partials/page/page-header.swig
Normal file
15
themes/next/layout/_partials/page/page-header.swig
Normal file
@ -0,0 +1,15 @@
|
||||
<header class="post-header">
|
||||
|
||||
<h1 class="post-title" itemprop="name headline">
|
||||
{{- page.title }}
|
||||
{{- post_edit(page.source) }}
|
||||
</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
{%- if page.description %}
|
||||
<div class="post-description">{{ page.description }}</div>
|
||||
{%- endif %}
|
||||
{% include '_partials/page/breadcrumb.swig' %}
|
||||
</div>
|
||||
|
||||
</header>
|
||||
Reference in New Issue
Block a user