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

Open in your IDE?
  1. {% sw_extends "@Storefront/storefront/base.html.twig" %}
  2. {% block base_body_classes %}{{ parent() }}{% if page.extensions.ottMerchantShopsData %} ott-is-merchant-shop{% endif %}{% if 'frontend.navigation.page' === activeRoute and '1' === app.request.query.get('isIframe') %} ott-is-merchant-shop-iframe-listing{% endif %}{% endblock %}
  3. {% block base_header %}
  4.     {# Tocca.js #}
  5.     <script>
  6.         !function(doc,win){if("function"!=typeof doc.createEvent)return;function pointerEvent(type){var lo=type.toLowerCase(),ms="MS"+type;return navigator.msPointerEnabled?ms:!!window.PointerEvent&&lo}function touchEvent(name){return"on"+name in window&&name}function isTheSameFingerId(e){return!e.pointerId||void 0===pointerId||e.pointerId===pointerId}function setListener(elm,events,callback){for(var eventsArray=events.split(" "),i=eventsArray.length;i--;)elm.addEventListener(eventsArray[i],callback,!1)}function getPointerEvent(event){var hasTargetTouches=Boolean(event.targetTouches&&event.targetTouches.length);switch(!0){case Boolean(event.target.touches):return event.target.touches[0];case hasTargetTouches&&void 0!==event.targetTouches[0].pageX:return event.targetTouches[0];case hasTargetTouches&&Boolean(event.targetTouches[0].touches):return event.targetTouches[0].touches[0];default:return event}}function isMultipleTouches(event){return 1<(event.targetTouches||event.target.touches||[]).length}function getTimestamp(){return(new Date).getTime()}function sendEvent(elm,eventName,originalEvent,data){var customEvent=doc.createEvent("Event");if(customEvent.originalEvent=originalEvent,(data=data||{}).x=currX,data.y=currY,defaults.useJquery&&(customEvent=jQuery.Event(eventName,{originalEvent:originalEvent}),jQuery(elm).trigger(customEvent,data)),customEvent.initEvent){for(var key in data)customEvent[key]=data[key];customEvent.initEvent(eventName,!0,!0),elm.dispatchEvent(customEvent)}for(;elm;)elm["on"+eventName]&&elm["on"+eventName](customEvent),elm=elm.parentNode}var pointerId,currX,currY,cachedX,cachedY,timestamp,target,dblTapTimer,longtapTimer,defaults={useJquery:!win.IGNORE_JQUERY&&"undefined"!=typeof jQuery,swipeThreshold:win.SWIPE_THRESHOLD||100,tapThreshold:win.TAP_THRESHOLD||150,dbltapThreshold:win.DBL_TAP_THRESHOLD||200,longtapThreshold:win.LONG_TAP_THRESHOLD||1e3,tapPrecision:win.TAP_PRECISION/2||30,justTouchEvents:win.JUST_ON_TOUCH_DEVICES},wasTouch=!1,touchevents_touchstart=touchEvent("touchstart")||pointerEvent("PointerDown"),touchevents_touchend=touchEvent("touchend")||pointerEvent("PointerUp"),touchevents_touchmove=touchEvent("touchmove")||pointerEvent("PointerMove"),tapNum=0;setListener(doc,touchevents_touchstart+(defaults.justTouchEvents?"":" mousedown"),function(e){if(isTheSameFingerId(e)&&!isMultipleTouches(e)&&(pointerId=e.pointerId,"mousedown"!==e.type&&(wasTouch=!0),"mousedown"!==e.type||!wasTouch)){var pointer=getPointerEvent(e);cachedX=currX=pointer.pageX,cachedY=currY=pointer.pageY,longtapTimer=setTimeout(function(){sendEvent(e.target,"longtap",e),target=e.target},defaults.longtapThreshold),timestamp=getTimestamp(),tapNum++}}),setListener(doc,touchevents_touchend+(defaults.justTouchEvents?"":" mouseup"),function(e){if(isTheSameFingerId(e)&&!isMultipleTouches(e))if(pointerId=void 0,"mouseup"===e.type&&wasTouch)wasTouch=!1;else{var eventsArr=[],now=getTimestamp(),deltaY=cachedY-currY,deltaX=cachedX-currX;if(clearTimeout(dblTapTimer),clearTimeout(longtapTimer),deltaX<=-defaults.swipeThreshold&&eventsArr.push("swiperight"),deltaX>=defaults.swipeThreshold&&eventsArr.push("swipeleft"),deltaY<=-defaults.swipeThreshold&&eventsArr.push("swipedown"),deltaY>=defaults.swipeThreshold&&eventsArr.push("swipeup"),eventsArr.length){for(var i=0;i<eventsArr.length;i++){var eventName=eventsArr[i];sendEvent(e.target,eventName,e,{distance:{x:Math.abs(deltaX),y:Math.abs(deltaY)}})}tapNum=0}else cachedX>=currX-defaults.tapPrecision&&cachedX<=currX+defaults.tapPrecision&&cachedY>=currY-defaults.tapPrecision&&cachedY<=currY+defaults.tapPrecision&&0<=timestamp+defaults.tapThreshold-now&&(sendEvent(e.target,2<=tapNum&&target===e.target?"dbltap":"tap",e),target=e.target),dblTapTimer=setTimeout(function(){tapNum=0},defaults.dbltapThreshold)}}),setListener(doc,touchevents_touchmove+(defaults.justTouchEvents?"":" mousemove"),function(e){if(isTheSameFingerId(e)&&("mousemove"!==e.type||!wasTouch)){var pointer=getPointerEvent(e);currX=pointer.pageX,currY=pointer.pageY}}),win.tocca=function(options){for(var opt in options)defaults[opt]=options[opt];return defaults}}(document,window);
  7.     </script>
  8.     {# Weglot translation #}
  9.     <link rel="alternate" hreflang="de" href="https://www.moebelfirst.de">
  10.     <link rel="alternate" hreflang="en" href="https://en.moebelfirst.de">
  11.     <link rel="alternate" hreflang="nl" href="https://nl.moebelfirst.de">
  12.     <link rel="alternate" hreflang="fr" href="https://fr.moebelfirst.de">
  13.     <script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js"></script>
  14.     <script>
  15.         Weglot.initialize({
  16.             api_key: 'wg_bac8cc0c24857a0c3c22bfc725839d030'
  17.         });
  18.     </script>
  19.     {{ parent() }}
  20. {% endblock %}
  21. {% block base_scroll_up %}
  22.     <div class="ott-fixed-content-container d-none">
  23.         {% block ott_badges %}
  24.             {% block ott_contact_partner_badge %}
  25.                 {% set merchant = page.extensions.ottMerchantShopsData.merchant %}
  26.                 {% set phoneRaw = 'ott.contactPartnerBadge.number'|trans %}
  27.                 {% if merchant %}
  28.                     {% set phoneRaw = merchant.phone %}
  29.                 {% endif %}
  30.                 {% set phone = phoneRaw|trans|replace({
  31.                     '+': '00',
  32.                     '(0)': '',
  33.                     ' ': '',
  34.                     '-': '',
  35.                     '/': '',
  36.                 }) %}
  37.                 <div class="ott-contact-partner-badge shrunk"
  38.                      style="background-image: url('{{ "ott.contactPartnerBadge.fullImage"|trans|sw_sanitize }}')"
  39.                 >
  40.                     <div class="ott-contact-partner-badge-shrink">
  41.                         {% sw_icon 'x-small' style {'pack': 'solid', 'color': 'black'} %}
  42.                         {% sw_icon 'expand' style {'pack': 'solid', 'color': 'black'} %}
  43.                     </div>
  44.                     <div class="ott-contact-partner-badge-question">
  45.                         {% sw_icon 'x-small' style {'pack': 'solid'} %}
  46.                         <a href="tel:{{ phone }}" title="{{ phoneRaw }}">{{ "ott.contactPartnerBadge.questions"|trans|sw_sanitize }}</a>
  47.                     </div>
  48.                     <a href="tel:{{ phone }}" title="{{ phoneRaw }}" class="ott-contact-partner-badge-link" style="color: #c39052 !important;">
  49.                         <img src="{{ "ott.contactPartnerBadge.smallImage"|trans }}" class="ott-contact-partner-badge-image">
  50.                         <div class="ott-contact-partner-badge-mobile-icon">
  51.                             {% sw_icon 'phone-lean' style {
  52.                                 'namespace': 'OttIconPack',
  53.                                 'pack': 'ottscho-it',
  54.                             } %}
  55.                         </div>
  56.                         <div class="ott-contact-partner-badge-container">
  57.                             {% sw_icon 'phone-lean' style {
  58.                                 'namespace': 'OttIconPack',
  59.                                 'pack': 'ottscho-it',
  60.                             } %}
  61.                             <div class="ott-contact-partner-badge-numbers" style="color:#c39052;">{{ phoneRaw|raw }}</div>
  62.                         </div>
  63.                         <div class="ott-contact-partner-badge-saturday text-center">{{ "ott.contactPartnerBadge.saturday"|trans|sw_sanitize }}</div>
  64.                     </a>
  65.                     <a href="https://www.moebelfirst.de/moebelfirst.de/gewinnspiel/" class="btn btn-light ott-link-aktion">{{ "ott.contactPartnerBadge.linkAktion"|trans|sw_sanitize }}</a>
  66.                 </div>
  67.             {% endblock %}
  68.             {% block ott_trusted_shops_badge %}{% endblock %}
  69.         {% endblock %}
  70.         {% sw_include '@Storefront/storefront/layout/scroll-up.html.twig' %}
  71.     </div>
  72. {% endblock %}
  73. {% block base_pseudo_modal %}
  74.     {{ parent() }}
  75.     {% if context.salesChannel.translated.customFields.ott_livestream_on %}
  76.         {% sw_include '@Storefront/storefront/component/livestream/popup.html.twig' %}
  77.     {% endif %}
  78. {% endblock %}