templates/website/parts/header.html.twig line 1

  1. <div class="mobile-menu d-none zIndex" id="mobile-navigation">
  2.     <div class="navigation-header">
  3.         <div class="ticket-buy">
  4.             <div class="buy-ticket-wrapper">
  5.                 <a href="{{ path('page_tickets') }}">
  6.                 <img style="width: 170px" src="{{ asset('static_images/buyTicket.png') }}" alt="buyTicket">
  7.                 <span>{{'Գնել Տոմս'|trans}}</span>
  8.                 </a>
  9.             </div>
  10.         </div>
  11.         <div class="close-button" id="close-button">
  12.             <i class="fas fa-times"></i>
  13.         </div>
  14.     </div>
  15.     <div class="navigation-body">
  16.         <div class="navigation-list">
  17.             {% for menu in get_menu() %}
  18.                 <div class="dropdown {{ menu.url }}_dropdown">
  19.                     <a class="btn btn-secondary dropdown-toggle {{ menu.url in app.request.requestUri ? 'active' : '' }}" href="/{{ app.request.locale }}/{{ menu.url }}" role="button" id="aboutUsDropdown"
  20.                        data-bs-toggle="dropdown" aria-expanded="false">
  21.                           <span class="btn-item">{{ menu.title }}</span>{% if menu.childMenu|length >  0 %} <i class="fas fa-chevron-down"></i>{% endif %}
  22.                     </a>
  23.                     {% if menu.childMenu|length >  0 %}
  24.                     <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
  25.                         {% for child in menu.childMenu|sort((a, b) => a.position <=> b.position) %}
  26.                             {% if child.showInHeader %}
  27.                         <li class="{{ child.url in app.request.requestUri ? 'active' : '' }}"><a class="dropdown-item btn-item" href="/{{ app.request.locale }}/{{ child.url }}">{{ child.title }}</a></li>
  28.                             {% endif %}
  29.                         {% endfor %}
  30.                     </ul>
  31.                     {% endif %}
  32.                 </div>
  33.             {% endfor %}
  34.         </div>
  35.     </div>
  36.     <div class="navigation-footer">
  37.         <div class="social-icons">
  38.             {% if get_socials().instagram is not empty %}
  39.                 <div class="circle-icon">
  40.                     <a target="_blank" class="d-flex" href="{{ get_socials().instagram.url }}"><i class="fab fa-instagram"></i></a>
  41.                 </div>
  42.             {% endif %}
  43.             {% if get_socials().facebook is not empty %}
  44.                 <div class="circle-icon">
  45.                     <a target="_blank" class="d-flex" href="{{ get_socials().facebook.url }}"><i class="fab fa-facebook-f"></i></a>
  46.                 </div>
  47.             {% endif %}
  48.             {% if get_socials().linkedin is not empty %}
  49.                 <div class="circle-icon">
  50.                     <a target="_blank" class="d-flex" href="{{ get_socials().linkedin.url }}"><i class="fab fa-linkedin-in"></i></a>
  51.                 </div>
  52.             {% endif %}
  53.             {% if get_socials().youtube is not empty %}
  54.                 <div class="circle-icon">
  55.                     <a target="_blank" class="d-flex" href="{{ get_socials().youtube.url }}"><i class="fab fa-youtube"></i></a>
  56.                 </div>
  57.             {% endif %}
  58.             {% if get_socials().tiktok is not empty %}
  59.                 <div class="circle-icon">
  60.                     <a target="_blank" class="d-flex" href="{{ get_socials().tiktok.url }}"><i class="fab fa-tiktok"></i></a>
  61.                 </div>
  62.             {% endif %}
  63.             {% if get_socials().tripadvisor is not empty %}
  64.                 <div class="circle-icon">
  65.                     <a target="_blank" class="d-flex align-items-center" href="{{ get_socials().tripadvisor.url }}">{{ svg('public/static_images/svg/tripadvisor.svg')|raw }}</a>
  66.                 </div>
  67.             {% endif %}
  68.         </div>
  69.     </div>
  70. </div>
  71. {% if app.request.attributes.get('_route') != 'page_tickets' and app.request.attributes.get('_route') != 'page_ticket' and 'charity' not in app.request.pathInfo%}
  72.     <div class="fixed-wrapper-ticket">
  73.         <a href="{{ path('page_tickets') }}">
  74.             <div class="buy-ticket-wrapper">
  75.                 <img style="width: 170px" src="{{ asset('static_images/buyTicket.png') }}" alt="buyTicket">
  76.                 <span>{{'Գնել Տոմս'|trans}}</span>
  77.             </div>
  78.         </a>
  79.     </div>
  80. {% endif %}
  81. <div class="my-container-fluid zIndex">
  82.     <div class="wrapper-navbar">
  83.         <div class="bar">
  84.             <div class="nav-item wrapper-language">
  85.                 <a class="language {% if app.request.get('_locale') == 'hy' %} active{% endif %}" href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'hy'})) }}">
  86.                     <span class="language {% if app.request.get('_locale') == 'hy' %} active{% endif %}"> ARM</span>
  87.                 </a>
  88.                 <a class="language {% if app.request.get('_locale') == 'en' %} active{% endif %}" href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'en'})) }}">
  89.                     <span > ENG</span>
  90.                 </a>
  91.                 <a class="language {% if app.request.get('_locale') == 'ru' %} active{% endif %}" href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'ru'})) }}">
  92.                     <span > RU</span>
  93.                 </a>
  94.             </div>
  95.             <div class="nav-item wrapper-language-mobile">
  96.                 {% if  app.request.get('_locale') == 'hy'%}
  97.                     <span class="language {% if app.request.get('_locale') == 'hy' %} active{% endif %}"> ARM</span>
  98.                 {% endif %}
  99.                 {% if  app.request.get('_locale') == 'en'%}
  100.                     <span class="language {% if app.request.get('_locale') == 'en' %} active{% endif %}"> ENG</span>
  101.                 {% endif %}
  102.                 {% if  app.request.get('_locale') == 'ru'%}
  103.                     <span class="language {% if app.request.get('_locale') == 'ru' %} active{% endif %}"> RU</span>
  104.                 {% endif %}
  105.                 <div class="mobile-lang-wrapper">
  106.                     {% if  app.request.get('_locale') != 'hy'%}
  107.                         <a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'hy'})) }}">
  108.                             <span class="language {% if app.request.get('_locale') == 'hy' %} active{% endif %}"> ARM</span>
  109.                         </a>
  110.                     {% endif %}
  111.                     {% if  app.request.get('_locale') != 'en'%}
  112.                         <a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'en'})) }}">
  113.                             <span class="language {% if app.request.get('_locale') == 'en' %} active{% endif %}"> ENG</span>
  114.                         </a>
  115.                     {% endif %}
  116.                     {% if  app.request.get('_locale') != 'ru'%}
  117.                         <a  href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'ru'})) }}">
  118.                             <span class="language {% if app.request.get('_locale') == 'ru' %} active{% endif %}"> RU</span>
  119.                         </a>
  120.                     {% endif %}
  121.                 </div>
  122.             </div>
  123.             <div class="nav-item wrapper-phone">
  124.                 <span class="phone-circle">
  125.                     <i class="fas fa-phone"></i>
  126.                 </span>
  127.                 <span class="phone-number">
  128.                    <a href="tel:{{ get_contacts().phone|striptags }}">{{ get_contacts().phone|raw }}</a>
  129.                 </span>
  130.             </div>
  131.             <div class="nav-item wrapper-logo">
  132.                 <a href="{{ path('page_home') }}"><img src="{{ asset('static_images/logos/logo.png')}}" alt="logo"></a>
  133.             </div>
  134.             <div class="nav-item wrapper-register">
  135.                 <span class="user-circle">
  136.                     {% if app.user %}
  137.                         <a class="text-white" href="{{ path('page_profile') }}">{{ app.user.email|slice(0,1) }}</a>
  138.                     {% else %}
  139.                         <a class="color-darkblue" href="{{ path('app_register') }}"><i class="fas fa-user"></i></a>
  140.                     {% endif %}
  141.                 </span>
  142.                 <span class="register-text">
  143.                     {% if app.user %}
  144.                         {#                        {{ app.user.firstName ~ user.lastname }} #}
  145.                         <a href="{{ path('page_profile') }} ">{{ app.user.email }}</a>
  146.                     {% else %}
  147.                         <a class="color-darkblue" href="{{ path('app_register') }}"> {{ 'Գրանցվել Հիմա'|trans }}</a>
  148.                     {% endif %}
  149.                 </span>
  150.             </div>
  151.             <div class="nav-item wrapper-ticket">
  152.                 <a href="{{ path('page_tickets') }}">
  153.                     <div class="buy-ticket-wrapper">
  154.                         <img style="width: 170px" src="{{ asset('static_images/buyTicket.png') }}" alt="buyTicket">
  155.                         <span>{{'Գնել Տոմս'|trans}}</span>
  156.                     </div>
  157.                     <img class="ticket-hover" src="{{ asset('static_images/ticket-hover.png') }}" alt="ticket">
  158.                 </a>
  159.             </div>
  160.             <div class="nav-item wrapper-menu" id="menu">
  161.                 <i class="fas fa-bars"></i>
  162.             </div>
  163.         </div>
  164.     </div>
  165.     <div class="head-working-hours">
  166.          {{ get_contacts().working|raw }}
  167.     </div>
  168.     <div class="navigation">
  169.         {% for menu in get_menu() %}
  170.             <div class="dropdown {{ menu.url }}_dropdown">
  171.                 <a href="/{{ app.request.locale }}/{{ menu.url }}" data-mdb-button-init
  172.                    data-mdb-ripple-init data-mdb-dropdown-init
  173.                    class="btn btn-primary dropdown-toggle {% if menu.childMenu|length >  0 %} hasChild{% endif %} {{ menu.url in app.request.requestUri ? 'active' : '' }}"
  174.                    type="button"
  175.                    id="dropdownMenuButton"
  176.                    data-mdb-toggle="dropdown"
  177.                    aria-expanded="false"
  178.                 >
  179.                     {{ menu.title }}
  180.                 </a>
  181.                 {% if menu.childMenu|length >  0 %}
  182.                     <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  183.                         {% for child in menu.childMenu|sort((a, b) => a.position <=> b.position) %}
  184.                             {% if child.showInHeader %}
  185.                                 <li class="{{ child.url in app.request.requestUri ? 'active' : '' }}"><a class="dropdown-item"
  186.                                                                                                          href="/{{ app.request.locale }}/{{ child.url }}">{{ child.title }}</a></li>
  187.                             {% endif %}
  188.                         {% endfor %}
  189.                     </ul>
  190.                 {% endif %}
  191.             </div>
  192.         {% endfor %}
  193.     </div>
  194. </div>
  195. <script type="text/javascript">
  196.     document.querySelectorAll('.btn-item').forEach((btn) => {
  197.         btn.addEventListener('click', function() {
  198.             window.location.href =
  199.            document.getElementById('mobile-navigation').classList.add('d-none')
  200.         });
  201.     })
  202.     document.querySelectorAll('#mobile-navigation .btn-item').forEach((btn) => {
  203.         btn.addEventListener('click', function() {
  204.             window.location.href = btn.parentElement.getAttribute('href')
  205.            document.getElementById('mobile-navigation').classList.add('d-none')
  206.         });
  207.     })
  208.     document.getElementById('menu').addEventListener('click',function () {
  209.         if (document.getElementById('mobile-navigation').classList.contains('d-none')){
  210.             document.body.style.overflow = 'hidden';
  211.         }
  212.     })
  213.     document.getElementById('close-button').addEventListener('click',function () {
  214.             document.body.style.overflow = 'auto';
  215.     })
  216. </script>