custom/plugins/TdsOrlob/src/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% block base_header %}
  3.     <div class="big-header">
  4.         <div class="inner-big-header">
  5.             {% if context.salesChannel.customFields.custom_site_marquee %}
  6.                 <marquee width="100%" direction="left">
  7.                     {{ 'tdsOrlob.topBar.marquee'|trans }}
  8.                 </marquee>
  9.             {% endif %}
  10.             <div class="info-bar bg-light">
  11.                 <div class="container text-center">
  12.                     <div class="row">
  13.                         <p class="mb-0 d-md-inline-block col-auto">
  14.                             {{ 'tdsOrlob.topBar.text'|trans|sw_sanitize }}
  15.                         </p>
  16.                         <div class="pl-md-3 col-auto">
  17.                             {% sw_include '@Storefront/storefront/layout/header/actions/language-widget.html.twig' %}
  18.                         </div>
  19.                     </div>
  20.                 </div>
  21.             </div>
  22.             
  23.             <header class="header-main">
  24.                 <div class="overlay-left"></div>
  25.                 <div class="overlay-right"></div>    
  26.             
  27.                 {% block base_header_inner %}
  28.                     <div class="container">
  29.                         {% sw_include '@Storefront/storefront/layout/header/header.html.twig' %}
  30.                     </div>
  31.                 {% endblock %}
  32.             </header>
  33.             
  34.             <div class="nav-main">
  35.                 {% sw_include '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  36.             </div>
  37.         </div>
  38.     </div>
  39.     
  40.     {% set articleVideoBackgroundId = page.product.customFields.custom_article_video_background %}
  41.     {% if articleVideoBackgroundId %}
  42.         {% set articleVideoBackgroundMediaCollection = searchMedia([articleVideoBackgroundId], context.context) %}
  43.         {% set articleVideoBackground = articleVideoBackgroundMediaCollection.get(articleVideoBackgroundId) %}
  44.     {% endif %}
  45.     {% set articleImageBackgroundId = page.product.customFields.custom_article_image_background %}
  46.     {% if articleImageBackgroundId %}
  47.         {% set articleImageBackgroundMediaCollection = searchMedia([articleImageBackgroundId], context.context) %}
  48.         {% set articleImageBackground = articleImageBackgroundMediaCollection.get(articleImageBackgroundId) %}
  49.     {% endif %}
  50.     {% set categoryVideoBackgroundId = page.header.navigation.active.customFields.custom_category_video %}
  51.     {% if categoryVideoBackgroundId %}
  52.         {% set categoryVideoBackgroundMediaCollection = searchMedia([categoryVideoBackgroundId], context.context) %}
  53.         {% set categoryVideoBackground = categoryVideoBackgroundMediaCollection.get(categoryVideoBackgroundId) %}
  54.     {% endif %}    
  55.     {% if page.product.customFields.custom_article_example_article and context.currentCustomerGroup.name != "Admin" %}
  56.     {% else %}
  57.         <div class="fixed-background">
  58.             <div class="fixed-background-content gradient-{{page.product.customFields.custom_article_gradient_background}} background-color-{{page.product.customFields.custom_article_color_background}}">
  59.                 {% if articleImageBackgroundId %}
  60.                     <img class="image-fixed-background" src="{{ articleImageBackground.url }}"/>
  61.                 {% endif %}
  62.                 {% if articleVideoBackgroundId %}
  63.                     <video autoplay muted loop playsinline class="video-fixed-background">
  64.                         <source src="{{ articleVideoBackground.url }}" type="video/mp4" />
  65.                     </video>
  66.                 {% endif %}
  67.                 {% if categoryVideoBackgroundId && page.header.navigation.active.customFields.custom_category_whole_background == true %}
  68.                     <video autoplay muted loop playsinline class="video-fixed-background">
  69.                         <source src="{{ categoryVideoBackground.url }}" type="video/mp4" />
  70.                     </video>
  71.                 {% endif %}
  72.             </div>
  73.         </div>
  74.     {% endif %}
  75. {% endblock %}
  76. {% block base_navigation_inner %}
  77. {% endblock %}
  78. {% block base_body_script %}
  79.     {{ parent() }}
  80.     {% if context.currentCustomerGroup.name == "Admin" %}
  81.         {{ dump() }}
  82.         <style>
  83.             .sf-toolbar,
  84.             .sf-dump {
  85.                 display: block !important;
  86.             }
  87.         </style>
  88.     {% endif %} 
  89. {% endblock %}
  90. {% block base_html %}
  91.     {% if context.salesChannel.customFields.custom_site_main_color_predefinded == "standard" %}
  92.         {% set siteColor = "#D82929" %}
  93.     {% elseif context.salesChannel.customFields.custom_site_main_color_predefinded == "xmas" %}
  94.         {% set siteColor = "green" %}
  95.     {% elseif context.salesChannel.customFields.custom_site_main_color_predefinded == "eastern" %}
  96.         {% set siteColor = "grass" %}
  97.     {% elseif context.salesChannel.customFields.custom_site_main_color_predefinded == "fasching" %}
  98.         {% set siteColor = "pink" %}
  99.     {% elseif context.salesChannel.customFields.custom_site_main_color_predefinded == "custom" %}
  100.         {% if context.salesChannel.customFields.custom_site_main_color_custom %}
  101.             {% set siteColor = context.salesChannel.customFields.custom_site_main_color_custom %}
  102.         {% else %}
  103.             {% set siteColor = "#D82929" %}
  104.             {% set siteColorHover = "#a31f1f" %}
  105.         {% endif %}
  106.     {% endif %}
  107.     <html lang="{{ app.request.locale }}"
  108.         itemscope="itemscope"
  109.         itemtype="https://schema.org/WebPage"
  110.         name="{{ page.cmsPage.name }}" 
  111.         type="{{ page.cmsPage.type }}"
  112.         type="{{ page.cmsPage.type }}"  
  113.         sitecolor="{{ siteColor }}"  
  114.         controllerAction="{{ controllerAction }}" 
  115.     >
  116.     <style>
  117.         html[sitecolor='#D82929'] {
  118.             --action-color: #D82929;
  119.             --action-color-hover: #a31f1f;
  120.         }
  121.     </style>
  122. {% endblock %}
  123. {% block base_main %}
  124.     <div class="header-free-space">
  125.     </div>
  126.     <div class="slider-free-space">
  127.     </div>
  128.     
  129.     <main class="content-main">
  130.  
  131.         {% block base_flashbags %}
  132.             {{ parent() }}
  133.         {% endblock %}
  134.         {% block base_main_inner %}
  135.             {{ parent() }}
  136.         {% endblock %}
  137.     </main>
  138. {% endblock %}