{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_head %}
{{ parent() }}
<style>
.cr-catalog-pre-loader {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: #FFFFFF;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-ms-flex-line-pack: center;
align-content: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
z-index: 10000;
}
.cr-catalog-pre-loader .page-loader__content {
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
-ms-flex-align: center;
align-items: center;
}
.cr-catalog-pre-loader .page-loader__content .catalog-name {
font: normal normal normal 24px/26px "Ubuntu-Bold";
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-bottom: 30px;
}
.lds-roller {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-roller div {
animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
transform-origin: 40px 40px;
}
.lds-roller div:after {
content: " ";
display: block;
position: absolute;
width: 7px;
height: 7px;
border-radius: 50%;
background: #164493;
margin: -4px 0 0 -4px;
}
.lds-roller div:nth-child(1) {
animation-delay: -0.036s;
}
.lds-roller div:nth-child(1):after {
top: 63px;
left: 63px;
}
.lds-roller div:nth-child(2) {
animation-delay: -0.072s;
}
.lds-roller div:nth-child(2):after {
top: 68px;
left: 56px;
}
.lds-roller div:nth-child(3) {
animation-delay: -0.108s;
}
.lds-roller div:nth-child(3):after {
top: 71px;
left: 48px;
}
.lds-roller div:nth-child(4) {
animation-delay: -0.144s;
}
.lds-roller div:nth-child(4):after {
top: 72px;
left: 40px;
}
.lds-roller div:nth-child(5) {
animation-delay: -0.18s;
}
.lds-roller div:nth-child(5):after {
top: 71px;
left: 32px;
}
.lds-roller div:nth-child(6) {
animation-delay: -0.216s;
}
.lds-roller div:nth-child(6):after {
top: 68px;
left: 24px;
}
.lds-roller div:nth-child(7) {
animation-delay: -0.252s;
}
.lds-roller div:nth-child(7):after {
top: 63px;
left: 17px;
}
.lds-roller div:nth-child(8) {
animation-delay: -0.288s;
}
.lds-roller div:nth-child(8):after {
top: 56px;
left: 12px;
}
@keyframes lds-roller {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
#test-webp-image,
#test-avif-image {
visibility: hidden;
}
</style>
{% endblock %}
{% block base_body_inner %}
{% set appSnippets = {
tutorialHeader: 'cr-catalog.tutorial.header'|trans|sw_sanitize,
tutorialCancelBtn: 'cr-catalog.tutorial.cancelBtn'|trans|sw_sanitize,
tutorialExitBtn: 'cr-catalog.tutorial.exitBtn'|trans|sw_sanitize,
tutorialShowBtn: 'cr-catalog.tutorial.showBtn'|trans|sw_sanitize,
tutorialNextBtn: 'cr-catalog.tutorial.nextBtn'|trans|sw_sanitize,
tutorialSkipBtn: 'cr-catalog.tutorial.skipBtn'|trans|sw_sanitize,
tutorialPrevBtn: 'cr-catalog.tutorial.prevBtn'|trans|sw_sanitize,
tutorialDesktopStep1Title: 'cr-catalog.tutorial.desktop.step1.title'|trans|sw_sanitize,
tutorialDesktopStep1Content: 'cr-catalog.tutorial.desktop.step1.content'|trans|sw_sanitize,
tutorialDesktopStep2Title: 'cr-catalog.tutorial.desktop.step2.title'|trans|sw_sanitize,
tutorialDesktopStep2Content: 'cr-catalog.tutorial.desktop.step2.content'|trans|sw_sanitize,
tutorialDesktopStep3Title: 'cr-catalog.tutorial.desktop.step3.title'|trans|sw_sanitize,
tutorialDesktopStep3Content: 'cr-catalog.tutorial.desktop.step3.content'|trans|sw_sanitize,
tutorialDesktopStep4Title: 'cr-catalog.tutorial.desktop.step4.title'|trans|sw_sanitize,
tutorialDesktopStep4Content: 'cr-catalog.tutorial.desktop.step4.content'|trans|sw_sanitize,
tutorialDesktopStep5Title: 'cr-catalog.tutorial.desktop.step5.title'|trans|sw_sanitize,
tutorialDesktopStep5Content: 'cr-catalog.tutorial.desktop.step5.content'|trans|sw_sanitize,
tutorialDesktopStep6Title: 'cr-catalog.tutorial.desktop.step6.title'|trans|sw_sanitize,
tutorialDesktopStep6Content: 'cr-catalog.tutorial.desktop.step6.content'|trans|sw_sanitize
} %}
<div id="catalog-app" data-snippets='{{ appSnippets|json_encode }}' data-catalog="{{ page.catalog.id }}" data-page="{{ page.catalogPageEntity.id }}" data-name="{{ page.catalog.name }}">
<div class="page-loader cr-catalog-pre-loader">
<div class="page-loader__content">
<h1 class="catalog-name">{{ page.catalog.name }}</h1>
<div class="lds-roller"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
</div>
</div>
<picture>
{% if apiRequestedPage.mediaEntity.extensions.mediaBoosters %}
{% if apiRequestedPage.mediaEntity.extensions.mediaBoosters.avifMedia %}
<source srcset="{{ apiRequestedPage.mediaEntity.extensions.mediaBoosters.avifMedia.generatedPath }}"
type="image/avif">
{% endif %}
{% if apiRequestedPage.mediaEntity.extensions.mediaBoosters.webpMedia %}
<source srcset="{{ apiRequestedPage.mediaEntity.extensions.mediaBoosters.webpMedia.generatedPath }}"
type="image/webp">
{% endif %}
{% endif %}
<source srcset="{{ apiRequestedPage.mediaEntity.url }}" type="image/png">
<img src="{{ apiRequestedPage.mediaEntity.url }}" alt="{{ apiRequestedPage.page.content | escape }}"/>
</picture>
</div>
{% endblock %}
{% block base_script_router %}
{{ parent() }}
<script>
window.catalogRouter = {
'basic': '{{ path('store-api.catalog.basic') }}',
'flat': '{{ path('store-api.catalog.flat') }}',
'page': '{{ path('store-api.catalog.page') }}',
'tableOfContents': '{{ path('store-api.catalog.table-of-contents') }}',
'bookmark': '{{ path('store-api.catalog.bookmark') }}',
'products': '{{ path('store-api.catalog.products') }}',
'shopwareProducts': '{{ path('store-api.product.search') }}',
'shopwareProduct': '{{ path('store-api.product.detail', {'productId': '$' }) }}',
'pageDetail': '{{ path('store-api.catalog.page-detail') }}',
'combinationFinder': '{{ path('store-api.product.switch', { 'productId': '$' }) }}',
'cart': '{{ path('store-api.checkout.cart.read') }}',
'cartLineItem': '{{ path('store-api.checkout.cart.update-lineitem') }}',
'storefrontCart': '{{ path('frontend.checkout.cart.page') }}',
'storefrontConfirm': '{{ path('frontend.checkout.confirm.page') }}',
'index': '{{ path('frontend.home.page') }}',
'search': '{{ path('store-api.catalog.search') }}',
'file': '{{ path('store-api.catalog.file') }}',
'print': '{{ path('frontend.catalog.print', {catalogId: page.catalog.id}) }}',
'printPage': '{{ path('frontend.catalog.print-page', {pdfId: '_pdfId_'}) }}',
'printMergePrepare': '{{ path('store-api.catalog.print-merge-prepare', {leftPdfId: '_leftPdfId_', rightPdfId: '_rightPdfId_'}) }}',
'printMerge': '{{ path('frontend.catalog.print-merge', {leftPdfId: '_leftPdfId_', rightPdfId: '_rightPdfId_'}) }}',
'shoppingListStorefrontIndex': '{{ path('frontend.shopping-list.page') }}',
'shoppingListInfo': '{{ path('frontend.shopping-list.json') }}',
'shoppingListCreate': '{{ path('frontend.shopping-list.page.create') }}',
'shoppingListDeleteItem': '{{ path('frontend.shopping-list.page.deleteItem') }}',
'shoppingListAdd': '{{ path('frontend.shopping-list.page.addItem') }}',
'shoppingListWidget': '{{ path('widgets.shopping-list-product.add', { 'productId': '_productId_' }) }}'
};
window.appSnippets = '{{ appSnippets|json_encode|escape('js') }}';
window.currencySettings = '{{ currencySettings|json_encode|escape('js') }}';
window.shoppingListAddToken = '{{ sw_csrf('frontend.shopping-list.page.addItem', {"mode": "token"}) }}';
window.shoppingListCreateToken = '{{ sw_csrf('frontend.shopping-list.page.create', {"mode": "token"}) }}';
window.shoppingListDeleteItemToken = '{{ sw_csrf('frontend.shopping-list.page.deleteItem', {"mode": "token"}) }}';
window.router['frontend.shopping-list.page.addItem'] = '{{ path('frontend.shopping-list.page.addItem') }}';
window.router['frontend.shopping-list.page.create'] = '{{ path('frontend.shopping-list.page.create') }}';
window.router['frontend.shopping-list.info'] = '{{ path('frontend.shopping-list.info') }}';
</script>
{% endblock %}