{% sw_extends "@Storefront/storefront/layout/breadcrumb.html.twig" %}
{% block layout_breadcrumb_inner %}
{{ parent() }}
{% set currentSalesChannelId = context.salesChannel.id %}
{% set showNextPrevBar = context.salesChannel.customFields['val_pentagast_bundle_prev_next_navigation_enabled'] %}
{% if app.request.get('_route') != 'frontend.home.page' and showNextPrevBar %}
<style>
.is-ctl-search .custom-prev-next-bar,
.is-act-search .custom-prev-next-bar {
float: right;
}
.custom-prev-next-bar {
margin-left: auto;
display: flex;
align-items: center;
gap: .5rem;
flex: 0 0 auto;
padding-top: 10px;
padding-bottom: 10px;
}
.custom-prev-next-bar .custom-prev-next-btn {
background: #e8e8e8;
width: 30px;
height: 30px;
border-radius: 100%;
transition: all .2s ease;
}
.custom-prev-next-btn.is-disabled {
pointer-events: none;
opacity: .45;
cursor: default;
}
.custom-prev-next-bar .custom-prev-next-btn:hover { background: var(--primary); }
.custom-prev-next-btn:hover .icon { color: #fff; }
.custom-prev-next-bar .custom-prev-next-btn svg {
margin: 0 auto;
height: auto;
top: auto;
width: 18px;
}
</style>
<div class="custom-prev-next-bar" data-navbar>
<a href="#" class="custom-prev-btn custom-prev-next-btn" data-action="back" title="Zurück" aria-disabled="true" tabindex="-1">
<span class="icon icon-arrow-medium-left icon-fluid">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="icons-solid-arrow-medium-left" d="M4.7071 5.2929c-.3905-.3905-1.0237-.3905-1.4142 0-.3905.3905-.3905 1.0237 0 1.4142l4 4c.3905.3905 1.0237.3905 1.4142 0l4-4c.3905-.3905.3905-1.0237 0-1.4142-.3905-.3905-1.0237-.3905-1.4142 0L8 8.5858l-3.2929-3.293z"></path>
</defs>
<use transform="matrix(0 -1 -1 0 16 16)" xlink:href="#icons-solid-arrow-medium-left" fill="#758CA3" fill-rule="evenodd"></use>
</svg>
</span>
</a>
<a href="#" class="custom-next-btn custom-prev-next-btn" data-action="forward" title="Vor" aria-disabled="true" tabindex="-1">
<span class="icon icon-arrow-medium-right icon-fluid">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="icons-solid-arrow-medium-right" d="M4.7071 5.2929c-.3905-.3905-1.0237-.3905-1.4142 0-.3905.3905-.3905 1.0237 0 1.4142l4 4c.3905.3905 1.0237.3905 1.4142 0l4-4c.3905-.3905.3905-1.0237 0-1.4142-.3905-.3905-1.0237-.3905-1.4142 0L8 8.5858l-3.2929-3.293z"></path>
</defs>
<use transform="rotate(-90 8 8)" xlink:href="#icons-solid-arrow-medium-right" fill="#758CA3" fill-rule="evenodd"></use>
</svg>
</span>
</a>
</div>
<script>
(function() {
function boot() {
const prev = document.querySelector('.custom-prev-btn');
const next = document.querySelector('.custom-next-btn');
if (!prev && !next) return;
prev?.addEventListener('click', function (e) {
e.preventDefault();
history.back();
});
next?.addEventListener('click', function (e) {
e.preventDefault();
history.forward();
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', boot);
} else {
boot();
}
})();
</script>
{% endif %}
{% endblock %}