Tweaking the topbar

This commit is contained in:
tituspijean 2020-11-14 14:15:42 +01:00 committed by Yunobot
parent 2674369181
commit f143dea554
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,38 @@
{% set crumbs = breadcrumbs.get() %}
{% set breadcrumbs_config = config.plugins.breadcrumbs %}
{% set divider = breadcrumbs_config.icon_divider_classes %}
{% if crumbs|length > 1 or breadcrumbs_config.show_all %}
<div id="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
{% if breadcrumbs_config.icon_home %}
<a href="{{ url("/") }}"><i class="{{ breadcrumbs_config.icon_home }}"></a></i><i class="{{ divider }}"></i>
{% endif %}
{% for crumb in crumbs %}
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
{% if not loop.last %}
{% if crumb.routable %}
<a itemscope itemtype="http://schema.org/Thing" itemprop="item" href="{{ crumb.url }}" itemid="{{ crumb.url }}">
<span itemprop="name">{{ crumb.menu }}</span>
</a>
{% else %}
<span itemscope itemtype="http://schema.org/Thing" itemprop="item" itemid="{{ crumb.url }}">
<span itemprop="name">{{ crumb.menu }}</span>
</span>
{% endif %}
<i class="{{ divider }}"></i>
{% else %}
{% if breadcrumbs_config.link_trailing %}
<a itemscope itemtype="http://schema.org/Thing" itemprop="item" href="{{ crumb.url }}" itemid="{{ crumb.url }}">
<span itemprop="name">{{ crumb.menu }}</span>
</a>
{% else %}
<span itemscope itemtype="http://schema.org/Thing" itemprop="item" itemid="{{ crumb.url }}">
<span itemprop="name">{{ crumb.menu }}</span>
</span>
{% endif %}
{% endif %}
<meta itemprop="position" content="{{ loop.index }}" />
</span>
{% endfor %}
</div>
{% endif %}

View file

@ -0,0 +1,30 @@
<div id="top-bar">
{% if github_link_position == 'top' %}
<div id="top-github-link">
{% include 'partials/github-link.html.twig' %}
</div>
{% endif %}
{% if config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
<div id="navigation">
{% if theme_var('github.link') %}
{% include 'partials/github-link.html.twig' %}
{% endif %}
{% if not progress.isFirst(page.path) %}
<a class="nav-prev tooltip tooltip-bottom" data-tooltip="Previous Page [&larr;]" href="{{ progress.nextSibling(page.path).url }}"> <i class="fa fa-angle-left"></i></a>
{% else %}
<span class="disabled"><i class="fa fa-angle-left"></i></span>
{% endif %}
{% if not progress.isLast(page.path) %}
<a class="nav-next tooltip tooltip-bottom" data-tooltip="Next Page [&rarr;]" href="{{ progress.prevSibling(page.path).url }}"><i class="fa fa-angle-right"></i></a>
{% else %}
<span class="disabled"><i class="fa fa-angle-right"></i></span>
{% endif %}
</div>
<div class="progress"></div>
</div>