templates/base.html.twig line 28

  1. <!DOCTYPE html>
  2. <html lang="{{ app.request.locale|split('_')[0] }}">
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.         <link rel="preconnect" href="https://fonts.googleapis.com">
  8.         <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  9.         <link href="https://fonts.googleapis.com/css2?family=Oleo+Script&display=swap" rel="stylesheet">
  10.         {% block meta %}
  11.             {% include "@SuluWebsite/Extension/seo.html.twig" with {
  12.             "seo": extension.seo|default([]),
  13.             "content": content|default([]),
  14.             "localizations": localizations|default([]),
  15.             "shadowBaseLocale": shadowBaseLocale|default(),
  16.         } %}
  17.         {% endblock %}
  18.         {% block stylesheets %}
  19.             {{ encore_entry_link_tags('app') }}
  20.         {% endblock %}
  21.         {% block style %}{% endblock %}
  22.     </head>
  23.     <body class="flex flex-col min-h-screen bg-gray-100">
  24.         <header>
  25.             {% block header %}
  26.                 <nav class="relative w-full py-4 px-6 bg-[#4A9FCD] text-white hover:text-gray-700 focus:text-gray-700 shadow-lg navbar navbar-expand-md navbar-light">
  27.                     <div class="container flex items-center justify-between flex-wrap mx-auto">
  28.                         <a href="{{ sulu_content_root_path() }}" class="flex items-center flex-shrink-0 mr-6">
  29.                             <img class="object-cover h-22 w-60" src="https://www.lerepere.ch/img/logo.png"/>
  30.                         </a>
  31.                         <div>
  32.                             {% block header_secondary %}{% endblock %}
  33.                         </div>
  34.                         <button class="flex items-center px-3 py-2 navbar-toggler border rounded text-white border-teal-400 hover:text-white hover:border-white" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
  35.                             <svg class="fill-current h-3 w-3" viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
  36.                                 <title>Menu</title><path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z"/></svg>
  37.                         </button>
  38.                         {{ render_esi(controller('Sulu\\Bundle\\CommunityBundle\\Controller\\LoginController::embedAction', {
  39.                             '_portal' : request.portalKey|default('default_portal_key'),
  40.                             '_locale' : app.request.locale
  41.                         })) }}
  42.                     </div>
  43.                     <div class="container collapse navbar-collapse flex-grow items-center mx-auto" id="navbarSupportedContent">
  44.                         <ul class="navbar-nav flex flex-col pl-0 list-style-none mr-auto">
  45.                             <li class="nav-item p-2">
  46.                                 <a href="/" class="block mt-4 font-bold lg:inline-block lg:mt-0 text-white hover:text-neutral-400 mr-4 {{ app.request.pathInfo == '/'  ? 'underline underline-offset-8' : '' }}" title="Accueil">
  47.                                     Accueil
  48.                                 </a>
  49.                             </li>
  50.                             {% for item in sulu_navigation_root_tree('main') %}
  51.                                 {% set itemUrl = sulu_content_path(item.url, item.webspaceKey) %}
  52.                                 <li class="nav-item p-2">
  53.                                     <a href="{{ itemUrl }}" class="block mt-4 font-bold lg:inline-block lg:mt-0 text-white hover:text-neutral-400 mr-4 {{ app.request.uri starts with itemUrl ? 'underline underline-offset-8' : '' }}" title="{{ item.title }}">
  54.                                         {{ item.title }}
  55.                                     </a>
  56.                                 </li>
  57.                             {% endfor %}
  58.                         </ul>
  59.                         <div></nav>
  60.                     {% endblock %}
  61.                 </header>
  62.                 <main>
  63.                     <div class="md:container md:mx-auto content"> {% block content %}{% endblock %}
  64.                         </div>
  65.                     </main>
  66.                     <footer class="bg-gray-200 text-center lg:text-left mt-auto">
  67.                         <div class="text-gray-700 text-center p-4" style="background-color: rgba(0, 0, 0, 0.2);">
  68.                             {% block footer %}
  69.                                 ©
  70.                                 {{ 'now'|date('Y') }}
  71.                                 Copyright:
  72.                                 <a class="text-gray-800" href="https://lerepere.ch/">Association Repère</a>
  73.                             {% endblock %}
  74.                         </div>
  75.                     </footer>
  76.                     {% block javascripts %}
  77.                         {{ encore_entry_script_tags('app') }}
  78.                     {% endblock %}
  79.                 </body>
  80.             </html>
  81.         </body>
  82.     </html>