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

Open in your IDE?
  1. <header id="is-Header" role="banner">
  2. {% apply spaceless %}
  3. <nav id="is-Header-LeftNav" role="navigation" aria-label="{{'nav.menu_label'|trans }}">
  4. <a id="is-Header-ToggleMenuButton" class="is-ToggleMenuButton" title="{{ 'nav.show_menu'|trans }}"
  5. role="button" aria-expanded="false" aria-controls="is-Menu" aria-label="{{ 'nav.show_menu'|trans }}" tabindex="0"
  6. onclick="$(document).trigger(TrackingManager.event.track, {event: 'menu'});"
  7. >
  8. <i class="is-Icon is-Icon-com-menu is-ToggleMenuButton-Icon_Show" aria-hidden="true"><i class="is-path1"></i><i class="is-path2"></i><i class="is-path3"></i></i>
  9. <i class="is-Icon is-Icon-com-close-thin is-ToggleMenuButton-Icon_Close" aria-hidden="true"></i>
  10. <span class="is-hide-for-xs-inf">{{ 'nav.menu'|trans }}</span>
  11. </a>
  12. {% if isPdfPrint is not defined or isPdfPrint == false %}
  13. {% include 'includes/common/default-nav.html.twig' %}
  14. {% endif %}
  15. </nav>
  16. <div id="is-Header-LogosArea">
  17. <h1 id="is-Header-Logo">
  18. <a href="{{ (portal_url_traduction is defined and portal_url_traduction == true and app.request.locale != 'fr') ? portal_url ~ '/' ~ app.request.locale : (portal_url is defined and portal_url is not empty) ? portal_url : path('homepage') }}" id="is-Header-Logo-Link" title="{{ 'go_home'|trans }}" aria-label="{{ 'app_title'|trans }}">
  19. <img class="is-Header-Logo-Img" id="is-Header-Logo-Image" src="{{ logo_url() }}" alt="{{ 'app_title'|trans }}" />
  20. </a>
  21. {% if header_extra_logo_image is defined and header_extra_logo_image is not empty %}
  22. {% set hasLink = (header_extra_logo_link is defined and header_extra_logo_link is not empty) ? true : false %}
  23. {% set hasImgAlt = (header_extra_logo_alt is defined and header_extra_logo_alt is not empty) ? true : false %}
  24. <{% if hasLink %}a href="{{ header_extra_logo_link }}" target="_blank"{% else %}span{% endif %} id="is-Header-ExtraLogo-Link"{% if hasImgAlt %} title="{{ header_extra_logo_alt | trans }}"{% endif %}>
  25. <img class="is-Header-Logo-Img" id="is-Header-ExtraLogo-Image" src="{{ asset('img/global/' ~ header_extra_logo_image) }}" alt="{{ hasImgAlt ? header_extra_logo_alt | trans : '' }}" />
  26. </{{ hasLink ? 'a' : 'span' }}>
  27. {% endif %}
  28. </h1>
  29. </div>
  30. {% set simModuleOn = false %}
  31. {% set ticketingModuleOn = false %}
  32. {% set portalModuleOn = false %}
  33. {% set menuItemsCount = 0 %}
  34. {% if sim_module is defined and sim_module %}
  35. {% set simModuleOn = true %}
  36. {% set menuItemsCount = menuItemsCount + 1 %}
  37. {% endif %}
  38. {% if ticketing_module is defined and ticketing_module %}
  39. {% set ticketingModuleOn = true %}
  40. {% set menuItemsCount = menuItemsCount + 1 %}
  41. {% endif %}
  42. {% if portal_url is not empty %}
  43. {% set portalModuleOn = true %}
  44. {% set menuItemsCount = menuItemsCount + 1 %}
  45. {% endif %}
  46. {% set referer = app.request.get('redirection') %}
  47. {% set widgetContext = (isWidget is defined and isWidget == 'true') ? true : false %}
  48. <nav id="is-Header-RightNav" role="navigation">
  49. <ul class="is-Header-Nav">
  50. {% if nav_school_transportation_url is defined and nav_school_transportation_url is not empty %}
  51. <li class="is-Header-Nav-Item">
  52. <a id="is-SchoolarTransport-Button" class="is-Header-Nav-Link" href="{{ nav_school_transportation_url }}" title="{{ 'nav.school_transportation'|trans }}">
  53. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-schoolbag" aria-hidden="true"></i></span>
  54. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf">{{ 'nav.school_transportation'|trans }}</span>
  55. </a>
  56. </li>
  57. {% endif %}
  58. {% if menuItemsCount > 0 %}
  59. {% if simModuleOn %}
  60. <li class="is-Header-Nav-Item{{ pageAttributes is defined and pageAttributes.group == 'sim' ? ' is-active' : '' }}">
  61. <a class="is-Header-Nav-Link" href="{{ path('homepage') }}" title="{{ 'nav.interactive_map'|trans }}">
  62. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-map" aria-hidden="true"></i></span>
  63. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf">{{ 'nav.interactive_map'|trans }}</span>
  64. </a>
  65. </li>
  66. {% endif %}
  67. {% if ticketingStealthMode is not defined or not ticketingStealthMode %}
  68. {% if ticketingModuleOn is empty and external_ticketing_url is defined and external_ticketing_url and app.request.locale in external_ticketing_url_list|keys %}
  69. <li class="is-Header-Nav-Item">
  70. <a id="is-Ticketing-Button" class="is-Header-Nav-Link"
  71. href="{{ external_ticketing_url_list[app.request.locale] }}" title="{{ 'nav.shop'|trans }}">
  72. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-shop"
  73. aria-hidden="true"></i></span>
  74. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf">{{ 'nav.shop'|trans }}</span>
  75. </a>
  76. </li>
  77. {% endif %}
  78. {% if ticketingModuleOn %}
  79. <li class="is-Header-Nav-Item{{ pageAttributes is defined and pageAttributes.group == 'ticketing' ? ' is-active' : '' }}">
  80. <a id="is-Ticketing-Button" class="is-Header-Nav-Link"
  81. href="{% if external_ticketing_url is defined and external_ticketing_url and app.request.locale in external_ticketing_url_list|keys %} {{ external_ticketing_url_list[app.request.locale] }}{% else %}{{ticketing_web_url}}{% endif %}"
  82. title="{{ 'nav.shop'|trans }}">
  83. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-shop"
  84. aria-hidden="true"></i></span>
  85. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf">{{ 'nav.shop'|trans }}</span>
  86. </a>
  87. </li>
  88. {% endif %}
  89. {% endif %}
  90. {% endif %}
  91. {% if account_module is defined and account_module %}
  92. {% include 'includes/common/default-login.html.twig'%}
  93. {% endif %}
  94. {% if header_contact_link is defined and header_contact_link %}
  95. <li class="is-Header-Nav-Item" id="is-Header-Nav-Item_Contact">
  96. <a href="{{ path('contact') }}" class="is-Header-Nav-Link" title="{{ 'nav.contact'|trans }}">
  97. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-contact" aria-hidden="true"></i></span>
  98. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf"> {{ 'nav.contact'|trans }}</span>
  99. </a>
  100. </li>
  101. {% endif %}
  102. {% if enable_access_config_a42 is defined and enable_access_config_a42 %}
  103. {% include 'includes/common/accessibility-config-a42.html.twig' %}
  104. {% endif %}
  105. </ul>
  106. </nav>
  107. {% endapply %}
  108. </header>