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="{{ 'app_title'|trans }} : {{ 'go_home'|trans }}" aria-label="{{ 'app_title'|trans }} : {{ 'go_home'|trans }}">
  19. <img class="is-Header-Logo-Img" id="is-Header-Logo-Image" src="{{ logo_url() }}" alt="{{ 'app_title'|trans }} : {{ 'go_home'|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. {% if enable_access_config_a42 is defined and enable_access_config_a42 %}
  31. {% include 'includes/common/accessibility-config-a42.html.twig' %}
  32. {% endif %}
  33. {% set simModuleOn = false %}
  34. {% set ticketingModuleOn = false %}
  35. {% set portalModuleOn = false %}
  36. {% set menuItemsCount = 0 %}
  37. {% if sim_module is defined and sim_module %}
  38. {% set simModuleOn = true %}
  39. {% set menuItemsCount = menuItemsCount + 1 %}
  40. {% endif %}
  41. {% if ticketing_module is defined and ticketing_module %}
  42. {% set ticketingModuleOn = true %}
  43. {% set menuItemsCount = menuItemsCount + 1 %}
  44. {% endif %}
  45. {% if portal_url is not empty %}
  46. {% set portalModuleOn = true %}
  47. {% set menuItemsCount = menuItemsCount + 1 %}
  48. {% endif %}
  49. {% set referer = app.request.get('redirection') %}
  50. {% set widgetContext = (isWidget is defined and isWidget == 'true') ? true : false %}
  51. <nav id="is-Header-RightNav" role="navigation">
  52. <ul class="is-Header-Nav">
  53. {% if nav_school_transportation_url is defined and nav_school_transportation_url is not empty %}
  54. <li class="is-Header-Nav-Item">
  55. <a id="is-SchoolarTransport-Button" class="is-Header-Nav-Link" href="{{ nav_school_transportation_url }}" title="{{ 'nav.school_transportation'|trans }}">
  56. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-schoolbag" aria-hidden="true"></i></span>
  57. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf">{{ 'nav.school_transportation'|trans }}</span>
  58. </a>
  59. </li>
  60. {% endif %}
  61. {% if menuItemsCount > 0 %}
  62. {% if simModuleOn %}
  63. <li class="is-Header-Nav-Item{{ pageAttributes is defined and pageAttributes.group == 'sim' ? ' is-active' : '' }}">
  64. <a class="is-Header-Nav-Link" href="{{ path('homepage') }}" title="{{ 'nav.interactive_map'|trans }}">
  65. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-map" aria-hidden="true"></i></span>
  66. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf">{{ 'nav.interactive_map'|trans }}</span>
  67. </a>
  68. </li>
  69. {% endif %}
  70. {% if ticketingStealthMode is not defined or not ticketingStealthMode %}
  71. {% if ticketingModuleOn is empty and external_ticketing_url is defined and external_ticketing_url and app.request.locale in external_ticketing_url_list|keys %}
  72. <li class="is-Header-Nav-Item">
  73. <a id="is-Ticketing-Button" class="is-Header-Nav-Link"
  74. href="{{ external_ticketing_url_list[app.request.locale] }}" title="{{ 'nav.shop'|trans }}">
  75. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-shop"
  76. aria-hidden="true"></i></span>
  77. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf">{{ 'nav.shop'|trans }}</span>
  78. </a>
  79. </li>
  80. {% endif %}
  81. {% if ticketingModuleOn %}
  82. <li class="is-Header-Nav-Item{{ pageAttributes is defined and pageAttributes.group == 'ticketing' ? ' is-active' : '' }}">
  83. <a id="is-Ticketing-Button" class="is-Header-Nav-Link"
  84. 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 %}"
  85. title="{{ 'nav.shop'|trans }}">
  86. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-shop"
  87. aria-hidden="true"></i></span>
  88. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf">{{ 'nav.shop'|trans }}</span>
  89. </a>
  90. </li>
  91. {% endif %}
  92. {% endif %}
  93. {% endif %}
  94. {% if account_module is defined and account_module %}
  95. {% include 'includes/common/default-login.html.twig'%}
  96. {% endif %}
  97. {% if header_contact_link is defined and header_contact_link %}
  98. <li class="is-Header-Nav-Item" id="is-Header-Nav-Item_Contact">
  99. <a href="{{ path('contact') }}" class="is-Header-Nav-Link" title="{{ 'nav.contact'|trans }}">
  100. <span class="is-Header-Nav-Icon-Wrapper"><i class="is-Icon is-Icon-com-contact" aria-hidden="true"></i></span>
  101. <span class="is-Header-Nav-Link-Label is-hide-for-xs-inf"> {{ 'nav.contact'|trans }}</span>
  102. </a>
  103. </li>
  104. {% endif %}
  105. {% if enable_access_config_a42 is defined and enable_access_config_a42 %}
  106. {% include 'includes/common/accessibility-config-a42.html.twig' %}
  107. {% endif %}
  108. </ul>
  109. </nav>
  110. {% endapply %}
  111. </header>