vendor/crehler/mojebambino-catalog/src/Resources/views/storefront/page/catalog/detail.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_head %}
  3.     {{ parent() }}
  4.     <style>
  5.         .cr-catalog-pre-loader {
  6.             position: fixed;
  7.             top: 0;
  8.             left: 0;
  9.             width: 100vw;
  10.             height: 100vh;
  11.             background: #FFFFFF;
  12.             display: -ms-flexbox;
  13.             display: -webkit-flex;
  14.             display: flex;
  15.             -ms-flex-line-pack: center;
  16.             align-content: center;
  17.             -ms-flex-align: center;
  18.             align-items: center;
  19.             -ms-flex-pack: center;
  20.             justify-content: center;
  21.             z-index: 10000;
  22.         }
  23.         .cr-catalog-pre-loader .page-loader__content {
  24.             display: -ms-flexbox;
  25.             display: -webkit-flex;
  26.             display: flex;
  27.             -ms-flex-direction: column;
  28.             flex-direction: column;
  29.             -ms-flex-align: center;
  30.             align-items: center;
  31.         }
  32.         .cr-catalog-pre-loader .page-loader__content .catalog-name {
  33.             font: normal normal normal 24px/26px "Ubuntu-Bold";
  34.             -ms-flex-wrap: wrap;
  35.             flex-wrap: wrap;
  36.             margin-bottom: 30px;
  37.         }
  38.         .lds-roller {
  39.             display: inline-block;
  40.             position: relative;
  41.             width: 80px;
  42.             height: 80px;
  43.         }
  44.         .lds-roller div {
  45.             animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  46.             transform-origin: 40px 40px;
  47.         }
  48.         .lds-roller div:after {
  49.             content: " ";
  50.             display: block;
  51.             position: absolute;
  52.             width: 7px;
  53.             height: 7px;
  54.             border-radius: 50%;
  55.             background: #164493;
  56.             margin: -4px 0 0 -4px;
  57.         }
  58.         .lds-roller div:nth-child(1) {
  59.             animation-delay: -0.036s;
  60.         }
  61.         .lds-roller div:nth-child(1):after {
  62.             top: 63px;
  63.             left: 63px;
  64.         }
  65.         .lds-roller div:nth-child(2) {
  66.             animation-delay: -0.072s;
  67.         }
  68.         .lds-roller div:nth-child(2):after {
  69.             top: 68px;
  70.             left: 56px;
  71.         }
  72.         .lds-roller div:nth-child(3) {
  73.             animation-delay: -0.108s;
  74.         }
  75.         .lds-roller div:nth-child(3):after {
  76.             top: 71px;
  77.             left: 48px;
  78.         }
  79.         .lds-roller div:nth-child(4) {
  80.             animation-delay: -0.144s;
  81.         }
  82.         .lds-roller div:nth-child(4):after {
  83.             top: 72px;
  84.             left: 40px;
  85.         }
  86.         .lds-roller div:nth-child(5) {
  87.             animation-delay: -0.18s;
  88.         }
  89.         .lds-roller div:nth-child(5):after {
  90.             top: 71px;
  91.             left: 32px;
  92.         }
  93.         .lds-roller div:nth-child(6) {
  94.             animation-delay: -0.216s;
  95.         }
  96.         .lds-roller div:nth-child(6):after {
  97.             top: 68px;
  98.             left: 24px;
  99.         }
  100.         .lds-roller div:nth-child(7) {
  101.             animation-delay: -0.252s;
  102.         }
  103.         .lds-roller div:nth-child(7):after {
  104.             top: 63px;
  105.             left: 17px;
  106.         }
  107.         .lds-roller div:nth-child(8) {
  108.             animation-delay: -0.288s;
  109.         }
  110.         .lds-roller div:nth-child(8):after {
  111.             top: 56px;
  112.             left: 12px;
  113.         }
  114.         @keyframes lds-roller {
  115.             0% {
  116.                 transform: rotate(0deg);
  117.             }
  118.             100% {
  119.                 transform: rotate(360deg);
  120.             }
  121.         }
  122.         #test-webp-image,
  123.         #test-avif-image {
  124.             visibility: hidden;
  125.         }
  126.     </style>
  127. {% endblock %}
  128. {% block base_body_inner %}
  129.     {% set appSnippets = {
  130.         tutorialHeader: 'cr-catalog.tutorial.header'|trans|sw_sanitize,
  131.         tutorialCancelBtn: 'cr-catalog.tutorial.cancelBtn'|trans|sw_sanitize,
  132.         tutorialExitBtn: 'cr-catalog.tutorial.exitBtn'|trans|sw_sanitize,
  133.         tutorialShowBtn: 'cr-catalog.tutorial.showBtn'|trans|sw_sanitize,
  134.         tutorialNextBtn: 'cr-catalog.tutorial.nextBtn'|trans|sw_sanitize,
  135.         tutorialSkipBtn: 'cr-catalog.tutorial.skipBtn'|trans|sw_sanitize,
  136.         tutorialPrevBtn: 'cr-catalog.tutorial.prevBtn'|trans|sw_sanitize,
  137.         tutorialDesktopStep1Title: 'cr-catalog.tutorial.desktop.step1.title'|trans|sw_sanitize,
  138.         tutorialDesktopStep1Content: 'cr-catalog.tutorial.desktop.step1.content'|trans|sw_sanitize,
  139.         tutorialDesktopStep2Title: 'cr-catalog.tutorial.desktop.step2.title'|trans|sw_sanitize,
  140.         tutorialDesktopStep2Content: 'cr-catalog.tutorial.desktop.step2.content'|trans|sw_sanitize,
  141.         tutorialDesktopStep3Title: 'cr-catalog.tutorial.desktop.step3.title'|trans|sw_sanitize,
  142.         tutorialDesktopStep3Content: 'cr-catalog.tutorial.desktop.step3.content'|trans|sw_sanitize,
  143.         tutorialDesktopStep4Title: 'cr-catalog.tutorial.desktop.step4.title'|trans|sw_sanitize,
  144.         tutorialDesktopStep4Content: 'cr-catalog.tutorial.desktop.step4.content'|trans|sw_sanitize,
  145.         tutorialDesktopStep5Title: 'cr-catalog.tutorial.desktop.step5.title'|trans|sw_sanitize,
  146.         tutorialDesktopStep5Content: 'cr-catalog.tutorial.desktop.step5.content'|trans|sw_sanitize,
  147.         tutorialDesktopStep6Title: 'cr-catalog.tutorial.desktop.step6.title'|trans|sw_sanitize,
  148.         tutorialDesktopStep6Content: 'cr-catalog.tutorial.desktop.step6.content'|trans|sw_sanitize
  149.     } %}
  150.     <div id="catalog-app" data-snippets='{{ appSnippets|json_encode }}' data-catalog="{{ page.catalog.id }}" data-page="{{ page.catalogPageEntity.id }}" data-name="{{ page.catalog.name }}">
  151.         <div class="page-loader cr-catalog-pre-loader">
  152.             <div class="page-loader__content">
  153.                 <h1 class="catalog-name">{{ page.catalog.name }}</h1>
  154.                 <div class="lds-roller"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
  155.             </div>
  156.         </div>
  157.         <picture>
  158.             {% if apiRequestedPage.mediaEntity.extensions.mediaBoosters %}
  159.                 {% if apiRequestedPage.mediaEntity.extensions.mediaBoosters.avifMedia %}
  160.                     <source srcset="{{ apiRequestedPage.mediaEntity.extensions.mediaBoosters.avifMedia.generatedPath }}"
  161.                             type="image/avif">
  162.                 {% endif %}
  163.                 {% if apiRequestedPage.mediaEntity.extensions.mediaBoosters.webpMedia %}
  164.                     <source srcset="{{ apiRequestedPage.mediaEntity.extensions.mediaBoosters.webpMedia.generatedPath }}"
  165.                             type="image/webp">
  166.                 {% endif %}
  167.             {% endif %}
  168.             <source srcset="{{ apiRequestedPage.mediaEntity.url }}" type="image/png">
  169.             <img src="{{ apiRequestedPage.mediaEntity.url }}" alt="{{ apiRequestedPage.page.content | escape }}"/>
  170.         </picture>
  171.     </div>
  172. {% endblock %}
  173. {% block base_script_router %}
  174.     {{ parent() }}
  175.     <script>
  176.         window.catalogRouter = {
  177.             'basic': '{{ path('store-api.catalog.basic') }}',
  178.             'flat': '{{ path('store-api.catalog.flat') }}',
  179.             'page': '{{ path('store-api.catalog.page') }}',
  180.             'tableOfContents': '{{ path('store-api.catalog.table-of-contents') }}',
  181.             'bookmark': '{{ path('store-api.catalog.bookmark') }}',
  182.             'products': '{{ path('store-api.catalog.products') }}',
  183.             'shopwareProducts': '{{ path('store-api.product.search') }}',
  184.             'shopwareProduct': '{{ path('store-api.product.detail', {'productId': '$' }) }}',
  185.             'pageDetail': '{{ path('store-api.catalog.page-detail') }}',
  186.             'combinationFinder': '{{ path('store-api.product.switch', { 'productId': '$' }) }}',
  187.             'cart': '{{ path('store-api.checkout.cart.read') }}',
  188.             'cartLineItem': '{{ path('store-api.checkout.cart.update-lineitem') }}',
  189.             'storefrontCart': '{{ path('frontend.checkout.cart.page') }}',
  190.             'storefrontConfirm': '{{ path('frontend.checkout.confirm.page') }}',
  191.             'index': '{{ path('frontend.home.page') }}',
  192.             'search': '{{ path('store-api.catalog.search') }}',
  193.             'file': '{{ path('store-api.catalog.file') }}',
  194.             'print': '{{ path('frontend.catalog.print', {catalogId: page.catalog.id}) }}',
  195.             'printPage': '{{ path('frontend.catalog.print-page', {pdfId: '_pdfId_'}) }}',
  196.             'printMergePrepare': '{{ path('store-api.catalog.print-merge-prepare', {leftPdfId: '_leftPdfId_', rightPdfId: '_rightPdfId_'}) }}',
  197.             'printMerge': '{{ path('frontend.catalog.print-merge', {leftPdfId: '_leftPdfId_', rightPdfId: '_rightPdfId_'}) }}',
  198.             'shoppingListStorefrontIndex': '{{ path('frontend.shopping-list.page') }}',
  199.             'shoppingListInfo': '{{ path('frontend.shopping-list.json') }}',
  200.             'shoppingListCreate': '{{ path('frontend.shopping-list.page.create') }}',
  201.             'shoppingListDeleteItem': '{{ path('frontend.shopping-list.page.deleteItem') }}',
  202.             'shoppingListAdd': '{{ path('frontend.shopping-list.page.addItem') }}',
  203.             'shoppingListWidget': '{{ path('widgets.shopping-list-product.add', { 'productId': '_productId_' }) }}'
  204.         };
  205.         window.appSnippets = '{{ appSnippets|json_encode|escape('js') }}';
  206.         window.currencySettings = '{{ currencySettings|json_encode|escape('js') }}';
  207.         window.shoppingListAddToken = '{{ sw_csrf('frontend.shopping-list.page.addItem', {"mode": "token"}) }}';
  208.         window.shoppingListCreateToken = '{{ sw_csrf('frontend.shopping-list.page.create', {"mode": "token"}) }}';
  209.         window.shoppingListDeleteItemToken = '{{ sw_csrf('frontend.shopping-list.page.deleteItem', {"mode": "token"}) }}';
  210.         window.router['frontend.shopping-list.page.addItem'] = '{{ path('frontend.shopping-list.page.addItem') }}';
  211.         window.router['frontend.shopping-list.page.create'] = '{{ path('frontend.shopping-list.page.create') }}';
  212.         window.router['frontend.shopping-list.info'] = '{{ path('frontend.shopping-list.info') }}';
  213.     </script>
  214. {% endblock %}