templates/includes/header/header-1.html.twig line 1

Open in your IDE?
  1. <div class="side-menu">
  2.     {# {% include "includes/mega-menu/" ~ site_code ~ "/mobile-main.html.twig" %} #}
  3.     {{ render(controller('App\\Controller\\Sonata\\CustomAdminController::JSONmegaMenuItems', { 'site_code': 1, 'type' : 2 } )) }}
  4. </div>
  5. <div class="side-info">
  6.     {% include "includes/mega-menu/" ~ site_code ~ "/mobile-info.html.twig" ignore missing %}
  7. </div>
  8. <header class="header">
  9.     <div class="menu-button">
  10.         <div></div>
  11.         <div></div>
  12.         <div></div>
  13.     </div>
  14.     <div class="container">
  15.         {% set header_ad_count = 0 %}
  16.         {% if bottom_header_ad is defined and bottom_header_ad %}
  17.             {% set header_ad_count = header_ad_count + 1 %}
  18.         {% endif %}
  19.         {% if bottom_bottom_header_ad is defined and bottom_bottom_header_ad %}
  20.             {% set header_ad_count = header_ad_count + 1 %}
  21.         {% endif %}
  22.         <div class="row" style="margin-top: 15px;">
  23.             <div class="col-12 col-lg-5" id="logo-primary">
  24.                 <a
  25.                     href="/"
  26.                     title="RoofersCoffeeShop - Where The Industry Meets!"
  27.                     style="margin-left: 10px;"
  28.                 ><img
  29.                     alt="RoofersCoffeeShop - Where The Industry Meets!"
  30.                     title="RoofersCoffeeShop - Where The Industry Meets!"
  31.                     {% if header_ad_count < 2 %} style="max-width: 350px;"{% endif %}
  32.                     src="{{ asset('assets/img/Roofers-Coffee-Shop-Logo-R.png') }}"
  33.                     loading='lazy'
  34.                 /></a>
  35.             </div>
  36.             <div class="col-md-8 col-lg-7">                
  37.                 {% if countdown_ad is defined and countdown_ad %}
  38.                 <div class="d-flex justify-content-end">
  39.                     <a style="padding:unset; width: fit-content" class="header-featured-link header-featured-link-eb d-md-none d-lg-flex flex-lg-column flex-xl-row {{ countdown_ad.getTitle()|length > 30 ? 'longtext' : '' }}" data-text-only-mitem="1" data-mitem-id="{{ countdown_ad.getId() }}" id="eventSrc" href="{{ countdown_ad.getExternalUrl() }}" >
  40.                         <span class="text-md-right px-md-2" id="header-featured-text"></span>
  41.                         <span style="margin:unset;" class="header-featured-arrow text-md-right"  id="eventTitle">
  42.                             <span class="text-nowrap d-block text-truncate overflow-hidden" style="max-width: 350px;">
  43.                                 {{ countdown_ad.getTitle() }}
  44.                             </span>
  45.                         </span>
  46.                     </a>
  47.                 </div>
  48.                 <style>
  49.                     @media (max-width: 1399px) {
  50.                         #eventSrc {
  51.                             flex-direction: column!important;
  52.                         }
  53.                     }
  54.                     .longtext {
  55.                         flex-direction: column!important;
  56.                     }
  57.                 </style>
  58.                 <script>                        
  59.                         function countDown() {
  60.                             var day = "{{ countdown_ad.getCountdown() | date('d-F-Y') }}"
  61.                             var time = "{{ countdown_ad.getCountdown() | date('H:i') }} PDT"
  62.                             var currentDate = new Date();
  63.                             var toThisDay = Date.parse(day).at(time)
  64.                             var distance = toThisDay.getTime() - currentDate.getTime()
  65.                             if(distance > 0) {
  66.                                 var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  67.                                 var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  68.                                 var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  69.                                 document.getElementById('header-featured-text').innerHTML = days + ' days, ' + hours
  70.                                 + ' hours and ' + minutes + (minutes == 1 ? ' minute' : ' minutes');
  71.                                 time = setTimeout(function () {
  72.                                     countDown()
  73.                                 }, 10000)
  74.                             }
  75.                             else {
  76.                                 document.getElementById('header-featured-text').remove();
  77.                                 document.getElementById('eventSrc').style.paddingLeft = '0px';
  78.                             }
  79.                         }
  80.                         countDown()
  81.                     </script>
  82.                 {% else %}
  83.                     <a class="float-right header-featured-link header-featured-link-eb" id="eventSrc" href="/coffee-conversations" ><span id="header-featured-text"></span><span class="header-featured-arrow" id="eventTitle">Coffee Conversations</span></a>
  84.                 {% endif %}
  85.                 <div class="headbuttons">
  86.                     {% include "includes/search-and-sign-in-revised.html.twig" %}
  87.                     {% include "includes/sign-in-header-button.html.twig" %}
  88.                     <div class="languageselect">
  89.                         <div id="google_translate_element" class="notranslate"><span id="lang">English</span>
  90.                             <div id="language-dropdown">
  91.                                 <div class="in-english">English</div>
  92.                                 <div class="en-espanol">Espa&ntilde;ol</div>
  93.                                 <div class="en-francais">Fran&ccedil;ais</div>
  94.                             </div>
  95.                         </div>
  96.                     </div>
  97.                 </div>
  98.                 {% set true_bottom_header_ad = null %}
  99.                 {% if header_ad_count > 1 %}
  100.                     {% if bottom_header_ad is defined and bottom_header_ad %}
  101.                         <div class="col-12 header-search d-none d-lg-flex" style="top:0; padding-right:0;">
  102.                             <div class="hot-header-news header-featured-link-eb">
  103.                                 <a data-text-only-mitem="1" data-mitem-id="{{ bottom_header_ad.getId() }}" href="{{ bottom_header_ad.getExternalUrl() }}" >    <span id="header-featured-text" style="padding-right: 15px; padding-left: 15px">{{ bottom_header_ad.getTitle() }}</span> <span class="header-featured-arrow"></span></a>
  104.                             </div>
  105.                         </div>
  106.                     {% endif %}
  107.                 {% else %}
  108.                     {% if bottom_header_ad is defined and bottom_header_ad %}
  109.                         {% set true_bottom_header_ad = bottom_header_ad %}
  110.                     {% endif %}
  111.                 {% endif %}
  112.                 
  113.                 {% if bottom_bottom_header_ad is defined and bottom_bottom_header_ad %}
  114.                     {% set true_bottom_header_ad = bottom_bottom_header_ad %}
  115.                 {% endif %}
  116.                 {% if true_bottom_header_ad %}
  117.                     <div class="hot-header-news header-featured-link-eb float-right d-none d-lg-flex d-max-none" >
  118.                         <a data-mitem-id="{{ true_bottom_header_ad.getId() }}" href="{{ true_bottom_header_ad.getExternalUrl() }}" >    <span id="header-featured-text" style="padding-right: 15px; padding-left: 15px">{{ true_bottom_header_ad.getTitle() }}</span> <span class="header-featured-arrow"></span></a>
  119.                     </div>
  120.                 {% endif %}
  121.                 
  122.             </div>
  123.         </div>
  124.         <div class="row">
  125.             <div class="col-sm-12 col-lg-9 col-xl-8 d-flex align-items-end main-menu">
  126.                 {# {% include "includes/mega-menu/1/main.html.twig" %} #}
  127.                 {{ render(controller('App\\Controller\\Sonata\\CustomAdminController::JSONmegaMenuItems', { 'site_code': 1, 'menu_ads': menu_ads is defined and menu_ads is not null ? menu_ads : null  } )) }}
  128.             </div>
  129.             <div class="col-sm-12 col-lg-3 d-lg-none col-xl-4 header-search">
  130.                 {% include "includes/search-and-sign-in-revised.html.twig" %}
  131.             </div>
  132.             {% if header_ad_count > 1 and bottom_header_ad is defined and bottom_header_ad %}
  133.                 <div class="header-search col-sm-12 d-flex d-lg-none">
  134.                     <div class="hot-header-news header-featured-link-eb">
  135.                         <a data-text-only-mitem="1" data-mitem-id="{{ bottom_header_ad.getId() }}" href="{{ bottom_header_ad.getExternalUrl() }}" >    <span id="header-featured-text" style="padding-right: 15px; padding-left: 15px">{{ bottom_header_ad.getTitle() }}</span> <span class="header-featured-arrow"></span></a>
  136.                     </div>
  137.                 </div>
  138.             {% endif %}
  139.             {% if true_bottom_header_ad is defined and true_bottom_header_ad %}
  140.                 <div class="header-search col-sm-12 col-lg-3 col-xl-4">
  141.                     <div class="hot-header-news header-featured-link-eb">
  142.                         <a data-text-only-mitem="1" data-mitem-id="{{ true_bottom_header_ad.getId() }}" href="{{ true_bottom_header_ad.getExternalUrl() }}" >    <span id="header-featured-text" style="padding-right: 15px; padding-left: 15px">{{ true_bottom_header_ad.getTitle() }}</span> <span class="header-featured-arrow"></span></a>
  143.                     </div>
  144.                 </div>
  145.             {% endif %}
  146.         </div>
  147.     </div>
  148.     <div class="info-button">
  149.         <div></div>
  150.         <div></div>
  151.         <div></div>
  152.     </div>
  153. </header>
  154. {% include "includes/breadcrumbs.html.twig" %}
  155. {% include "includes/messages.html.twig" %}