templates/front/_shared/header.html.twig line 1

Open in your IDE?
  1. {% trans_default_domain 'front' %}
  2. {% set darkMode = 'dark-header' not in header_class %}
  3. {% set route = app.request.get('_route') %}
  4. <div id="main-header" class="{{ header_class }}">
  5.     {% if darkMode %}
  6.         <div class="dark-bg"></div>
  7.     {% endif %}
  8.     <header class="container">
  9.         <div class="row menu">
  10.             <nav class="d-flex align-items-center justify-content-between nav-desktop">
  11.                 <ul class="main-menu">
  12.                     <li class="logo logo-light visible">
  13.                         <a href="{{ path('front_page_home') }}">
  14.                             {% if darkMode %}
  15.                                 <img src="{{ asset('build/images/logo-color.svg') }}" alt="Citizens">
  16.                             {% else %}
  17.                                 <img src="{{ asset('build/images/logo-dark-desktop.svg') }}" alt="Citizens">
  18.                             {% endif %}
  19.                         </a>
  20.                     </li>
  21.                     <li class="logo logo-dark d-lg-none"><a href="{{ path('front_page_home') }}"><img src="{{ asset('build/images/logo-dark.svg') }}" alt="Citizens"></a></li>
  22.                     <li class="d-none d-xl-inline-block {{ route starts with 'front_page_comfort' ? 'active' }}"><a href="{{ path('front_page_comfort') }}">{{ 'label.comfort'|trans }}</a></li>
  23.                     <li class="d-none d-xl-inline-block {{ route starts with 'front_page_services' ? 'active' }}"><a href="{{ path('front_page_services') }}">{{ 'label.services'|trans }}</a></li>
  24.                     <li class="d-none d-xl-inline-block {{ route starts with 'front_page_community' ? 'active' }}"><a href="{{ path('front_page_community') }}">{{ 'account.spareTimeActivities'|trans }}</a></li>
  25.                     <li class="d-none d-xl-inline-block {{ route starts with 'front_page_benefits_citizens' ? 'active' }}"><a href="{{ path('front_page_benefits_citizens') }}">{{ 'label.citizen_life'|trans }}</a></li>
  26.                     <li class="d-none d-xl-inline-block has-submenu {{ (route starts with 'front_page_investors' or route starts with 'front_page_owners') ? 'active' }}">
  27.                         <a href="{{ path('front_page_investors') }}">{{ 'label.landlords'|trans }} <small><i class="fa fa-chevron-down"></i></small></a>
  28.                         <ul class="submenu" style="min-width: 310px;">
  29.                             <li {{ route starts with 'front_page_investors' ? 'active' }}><a href="{{ path('front_page_investors') }}">Investir dans un bien coliving</a></li>
  30.                             <li {{ route starts with 'front_page_owners' ? 'active' }}><a href="{{ path('front_page_owners') }}">Transformer son bien en coliving</a></li>
  31.                         </ul>
  32.                     </li>
  33.                     <!--li class="d-none d-xl-inline-block has-submenu {{ (route starts with 'front_page_company_' or route starts with 'front_company_') ? 'active' }}">
  34.                         <a href="{{ path('front_page_company_about') }}">{{ 'label.the_company'|trans }} <i class="fa fa-chevron-down"></i></a>
  35.                         <ul class="submenu">
  36.                             <li {{ route starts with 'front_page_company_about' ? 'active' }}><a href="{{ path('front_page_company_about') }}">{{ 'label.about'|trans }}</a></li>
  37.                             <li {{ route starts with 'front_page_company_our_jobs' ? 'active' }}><a href="{{ path('front_page_company_our_jobs') }}">{{ 'label.our_jobs'|trans }}</a></li>
  38.                             <li {{ route starts with 'front_page_company_organizational_chart' ? 'active' }}><a href="{{ path('front_page_company_organizational_chart') }}">{{ 'label.our_organizational_chart'|trans }}</a></li>
  39.                             <li {{ route starts with 'front_company_jobs' ? 'active' }}><a href="{{ path('front_company_jobs_list') }}">{{ 'label.jobs'|trans }}</a></li>
  40.                             <li {{ route starts with 'front_page_faq' ? 'active' }}><a href="{{ path('front_page_faq') }}">{{ 'label.faq'|trans }}</a></li>
  41.                         </ul>
  42.                     </li-->
  43.                 </ul>
  44.             </nav>
  45.             <div class="d-none d-xl-flex align-items-center justify-content-end nav-desktop nav-cta">
  46.                 <ul class="d-xl-flex align-items-center justify-content-end">
  47.                     <li class="d-none d-xl-inline-block"> <a href="{{ path('front_search_index') }}" class="cta">{{ 'label.find_home'|trans }}</a></li>
  48.                     <li class="d-none d-xl-inline-block">
  49.                         {% if not is_granted('IS_AUTHENTICATED_FULLY') %}
  50.                             <a href="{{ path('front_account_dashboard') }}" class="cta light open-dynamic-modal" data-route="{{ path('front_user_modal_login') }}">Compte</a>
  51.                         {% else %}
  52.                             <div class="dropdown">
  53.                                 <a href="{{ path('front_account_dashboard') }}" id="accountDropdown" class="cta light dropdown-toggle">
  54.                                     <i class="fa fa-user-circle"></i> {{ app.user.firstname }}
  55.                                 </a>
  56.                                 <div class="dropdown-menu dropdown-menu-right" aria-labelledby="accountDropdown">
  57.                                     {% if app.user.hasAccessToCms %}
  58.                                         <a class="dropdown-item" href="{{ path('cms_login_role_redirect') }}">Administration</a>
  59.                                     {% else %}
  60.                                         {% if app.user.isOccupyingRoom %}
  61.                                             <a class="dropdown-item" href="{{ path('front_account_occupancy_index') }}">{{ 'account.my_room'|trans }}</a>
  62.                                         {% endif %}
  63.                                         {% set occupancy = app.user.currentOccupancy %}
  64.                                         {% if occupancy is not null %}
  65.                                             <a class="dropdown-item" href="{{ path('front_account_sparetime_activities_list') }}">{{ 'account.mySpareTimeActivities'|trans }}</a>
  66.                                             <a class="dropdown-item" href="{{ path('front_account_support_list') }}">{{ 'account.concierge'|trans }}</a>
  67.                                             <a class="dropdown-item" href="{{ path('front_account_maintenance_list') }}">{{ 'account.maintenance'|trans }}</a>
  68.                                         {% endif %}
  69.                                         <a class="dropdown-item" href="{{ path('front_account_informations') }}">{{ 'account.personal_informations'|trans }}</a>
  70.                                         <a class="dropdown-item" href="{{ path('front_account_documents') }}">{{ 'account.my_documents'|trans }}</a>
  71.                                         <a class="dropdown-item disabled" disabled href="{{ path('front_account_rents') }}">{{ 'account.my_rents'|trans }}</a>
  72.                                         <a class="dropdown-item" href="{{ path('front_account_inventory') }}">{{ 'account.my_inventory'|trans }}</a>
  73.                                     {% endif %}
  74.                                     <hr style="margin: 5px;">
  75.                                     <a class="dropdown-item" href="{{ path('front_user_logout') }}">{{ 'label.logout'|trans }}</a>
  76.                                 </div>
  77.                             </div>
  78.                         {% endif %}
  79.                     </li>
  80.                     <li class="d-none d-xl-inline-block">
  81.                         {% include 'front/_shared/language-switcher.html.twig' %}
  82.                     </li>
  83.                 </ul>
  84.             </div> <!-- nav-cta -->
  85.             <div class="col-5 menu-mobile-toggle d-flex d-xl-none align-items-center justify-content-end pr-0">
  86.                 {% if darkMode %}
  87.                     <img class="open-menu" src="{{ asset('build/images/icons/menu-toggle.svg') }}" alt="">
  88.                 {% else %}
  89.                     <img class="open-menu" src="{{ asset('build/images/icons/menu-toggle-dark.svg') }}" alt="">
  90.                 {% endif %}
  91.                 <img class="close-menu d-none" src="{{ asset('build/images/icons/menu-close.svg') }}" alt="">
  92.             </div> <!-- menu mobile toggle -->
  93.         </div> <!-- row -->
  94.     </header>
  95.     <div class="menu-mobile">
  96.         <ul>
  97.             <li class="{{ route starts with 'front_page_comfort' ? 'active' }}"><a href="{{ path('front_page_comfort') }}">{{ 'label.comfort'|trans }}</a></li>
  98.             <li class="{{ route starts with 'front_page_services' ? 'active' }}"><a href="{{ path('front_page_services') }}">{{ 'label.services'|trans }}</a></li>
  99.             <li class="{{ route starts with 'front_page_community' ? 'active' }}"><a href="{{ path('front_page_community') }}">{{ 'label.communities'|trans }}</a></li>
  100.             <li class="{{ route starts with 'front_page_benefits_citizens' ? 'active' }}"><a href="{{ path('front_page_benefits_citizens') }}">{{ 'label.citizen_life'|trans }}</a></li>
  101.             <li class="dropdown {{ (route starts with 'front_page_investors' or route starts with 'front_page_owners') ? 'active' }}">
  102.                 <a data-toggle="collapse" aria-expanded="false" role="button" aria-controls="collapseInvestors" href="#collapseInvestors">{{ 'label.landlords'|trans }} <small><i class="fa fa-chevron-down"></i></small></a>
  103.                 <div class="collapse" id="collapseInvestors">
  104.                     <ul class="mobile-submenu">
  105.                         <li {{ route starts with 'front_page_investors' ? 'active' }}><a href="{{ path('front_page_investors') }}">Investir dans un bien coliving</a></li>
  106.                         <li {{ route starts with 'front_page_owners' ? 'active' }}><a href="{{ path('front_page_owners') }}">Transformer son bien en coliving</a></li>
  107.                     </ul>
  108.                 </div>
  109.             </li>
  110.             <!--li class="{{ (route starts with 'front_page_company_' or route starts with 'front_company_') ? 'active' }}">
  111.                 <a href="{{ path('front_page_company_about') }}">{{ 'label.the_company'|trans }} <i class="fa fa-chevron-down"></i></a>
  112.                 <ul class="mobile-submenu">
  113.                     <li {{ route starts with 'front_page_company_about' ? 'active' }}><a href="{{ path('front_page_company_about') }}">{{ 'label.about'|trans }}</a></li>
  114.                     <li {{ route starts with 'front_page_company_our_jobs' ? 'active' }}><a href="{{ path('front_page_company_our_jobs') }}">{{ 'label.our_jobs'|trans }}</a></li>
  115.                     <li {{ route starts with 'front_page_company_organizational_chart' ? 'active' }}><a href="{{ path('front_page_company_organizational_chart') }}">{{ 'label.our_organizational_chart'|trans }}</a></li>
  116.                     <li {{ route starts with 'front_company_jobs' ? 'active' }}><a href="{{ path('front_company_jobs_list') }}">{{ 'label.jobs'|trans }}</a></li>
  117.                     <li {{ route starts with 'front_page_faq' ? 'active' }}><a href="{{ path('front_page_faq') }}">{{ 'label.faq'|trans }}</a></li>
  118.                 </ul>
  119.             </li-->
  120.         </ul>
  121.         <div class="text-center mobile-cta">
  122.             <a href="{{ path('front_search_index') }}" class="cta">{{ 'label.find_home'|trans }}</a>
  123.             {% if not is_granted('IS_AUTHENTICATED_FULLY') %}
  124.                 <a href="{{ path('front_account_dashboard') }}" class="cta light open-dynamic-modal" data-route="{{ path('front_user_modal_login') }}">Espace compte</a>
  125.             {% else %}
  126.                 <a href="{{ path('front_account_dashboard') }}" class="cta light">{{ 'label.account'|trans }}</a>
  127.             {% endif %}
  128.         </div>
  129.     </div> <!-- menu mobile -->
  130.     {{ header_content|raw }}
  131. </div>