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.     <div class="fixed-background">
  51.         <div class="fixed-background-content gradient-{{page.product.customFields.custom_article_gradient_background}} background-color-{{page.product.customFields.custom_article_color_background}}">
  52.             {% if articleImageBackgroundId %}
  53.                 <img class="image-fixed-background" src="{{ articleImageBackground.url }}"/>
  54.             {% endif %}
  55.             {% if articleVideoBackgroundId %}
  56.                 <video autoplay muted loop playsinline class="video-fixed-background">
  57.                     <source src="{{ articleVideoBackground.url }}" type="video/mp4" />
  58.                 </video>
  59.             {% endif %}
  60.         </div>
  61.     </div>
  62. {% endblock %}
  63. {% block base_navigation_inner %}
  64. {% endblock %}
  65. {% block base_body_script %}
  66.     {{ parent() }}
  67.     {% if context.currentCustomerGroup.name == "Admin" %}
  68.         {{ dump() }}
  69.         <style>
  70.             .sf-toolbar,
  71.             .sf-dump {
  72.                 display: block !important;
  73.             }
  74.         </style>
  75.     {% endif %} 
  76. {% endblock %}
  77. {% block base_html %}
  78.     {% if context.salesChannel.customFields.custom_site_main_color_predefinded == "standard" %}
  79.         {% set siteColor = "#D82929" %}
  80.     {% elseif context.salesChannel.customFields.custom_site_main_color_predefinded == "xmas" %}
  81.         {% set siteColor = "green" %}
  82.     {% elseif context.salesChannel.customFields.custom_site_main_color_predefinded == "eastern" %}
  83.         {% set siteColor = "grass" %}
  84.     {% elseif context.salesChannel.customFields.custom_site_main_color_predefinded == "fasching" %}
  85.         {% set siteColor = "pink" %}
  86.     {% elseif context.salesChannel.customFields.custom_site_main_color_predefinded == "custom" %}
  87.         {% if context.salesChannel.customFields.custom_site_main_color_custom %}
  88.             {% set siteColor = context.salesChannel.customFields.custom_site_main_color_custom %}
  89.         {% else %}
  90.             {% set siteColor = "#D82929" %}
  91.             {% set siteColorHover = "#a31f1f" %}
  92.         {% endif %}
  93.     {% endif %}
  94.     <html lang="{{ app.request.locale }}"
  95.         itemscope="itemscope"
  96.         itemtype="https://schema.org/WebPage"
  97.         name="{{ page.cmsPage.name }}" 
  98.         type="{{ page.cmsPage.type }}"
  99.         type="{{ page.cmsPage.type }}"  
  100.         sitecolor="{{ siteColor }}"  
  101.         controllerAction="{{ controllerAction }}" 
  102.     >
  103.     <style>
  104.         html[sitecolor='#D82929'] {
  105.             --action-color: #D82929;
  106.             --action-color-hover: #a31f1f;
  107.         }
  108.     </style>
  109. {% endblock %}
  110. {% block base_main %}
  111.     <div class="header-free-space">
  112.     </div>
  113.     {{ parent() }}
  114. {% endblock %}