templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. {% set __route = app.request.attributes.get('_route') %}
  3. {% set isHome = (__route in ['home','homepage','app_homepage']) or (app.request.pathinfo == '/') %}
  4. {% set identityEnabled =
  5.     identity_active is defined
  6.         ? identity_active
  7.         : true
  8. %}
  9. <html>
  10.     <head>
  11.         <meta charset="UTF-8">
  12.         <meta http-equiv="x-ua-compatible" content="ie=edge">
  13.         {% block title %}{% endblock %}
  14.         {% block metatags %}{% endblock %}
  15.         <meta name="viewport" content="width=device-width, initial-scale=1">
  16.         {# Desktop icon #}
  17.         <link rel="shortcut icon" type="image/png" href="{{ siteConfig.faviconUrl ?? asset('favicon.ico') }}">
  18.         {# Android icon #}
  19.         <link rel="manifest" href='data:application/manifest+json,{"name": "{{ siteConfig.siteName }}", "short_name": "{{ siteConfig.siteName }}", "display": "standalone", "icons": [{"src": "{{ siteConfig.faviconUrl ?? asset(' favicon.ico') }}", "sizes": "192x192", "type": "image/png"}]}' />
  20.         {# iOS icon #}
  21.         <link rel="apple-touch-icon" sizes="180x180" href="{{ siteConfig.faviconUrl ?? asset('favicon.ico') }}">
  22.         {% block stylesheets %}
  23.             <!-- CSS here -->
  24.             {{ encore_entry_link_tags('app') }}
  25.             {{ encore_entry_link_tags('cookieconsent.min') }}
  26.             <link rel="preconnect" href="https://fonts.googleapis.com">
  27.             <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  28.             <link href="https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,300;0,400;0,500;0,700;0,800;0,900;1,200&display=swap" rel="stylesheet">
  29.             <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" integrity="sha512-rqQltXRuHxtPWhktpAZxLHUVJ3Eombn3hvk9PHjV/N5DMUYnzKPC1i3ub0mEXgFzsaZNeJcoE0YHq0j/GFsdGg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  30.             <style id="theme-colors">
  31.                 :root {
  32.                   --page-background-color: {{ siteConfig.siteCustomization.pageBackgroundColor }};
  33.                   --page-foreground-color: {{ siteConfig.siteCustomization.pageForegroundColor }};
  34.                   --menu-background-color: {{ siteConfig.siteCustomization.menuBackgroundColor }};
  35.                   --menu-background-color-header-alpha: {{ siteConfig.siteCustomization.menuBackgroundColor }}80;
  36.                   --menu-background-color-silder-alpha: {{ siteConfig.siteCustomization.menuBackgroundColor }}cd;
  37.                   --menu-foreground-color: {{ siteConfig.siteCustomization.menuForegroundColor }};
  38.                   --page-title-color: {{ siteConfig.siteCustomization.pageTitleColor }};
  39.                   --button-background-color: {{ siteConfig.siteCustomization.buttonBackgroundColor }};
  40.                   --button-foreground-color: {{ siteConfig.siteCustomization.buttonForegroundColor }};
  41.                 }
  42.                 body {
  43.                     background-color:  var(--page-background-color) !important;
  44.                     color : var(--page-foreground-color) !important;
  45.                 }
  46.                 .bg-dark {
  47.                     background-color: transparent !important;
  48.                 } 
  49.                 .bloc-categ .MultiCarousel .MultiCarousel-inner .item>div {
  50.                     background-color:  var(--page-background-color) !important;
  51.                 }
  52.                 nav a, nav span, nav .navbar-nav .nav-item i {
  53.                     color: var(--page-foreground-color);
  54.                 }
  55.                 .login-nav__item.active a:after {
  56.                     background-color: {{ siteConfig.siteCustomization.pageTitleColor }} !important;
  57.                 }
  58.                 .modal-content {
  59.                     color: var(--page-title-color) !important;
  60.                     background-color: var(--page-background-color) !important;
  61.                 }
  62.                 h1, h2, h3, h4, h5, h6 {
  63.                     color: var(--page-title-color) !important;
  64.                 }
  65.                 button:not(.btn-close),
  66.                 .btn:not(.btn-close) {
  67.                     background-color: var(--button-background-color);
  68.                     color: var(--button-foreground-color);
  69.                     border-color: var(--button-background-color);
  70.                 }
  71.                 button:not(.btn-close):hover{
  72.                     color: var(--button-background-color);
  73.                     background-color: var(--button-foreground-color);
  74.                     border-color: var(--button-background-color);
  75.                 }
  76.                 .container-footer .list-unstyled li a {
  77.                     border-color: var(--button-background-color) !important;
  78.                 }
  79.                 .dropdown-menu {
  80.                     background-color: var(--button-background-color) !important;
  81.                 }
  82.                 .dropdown-menu p, .dropdown-menu a, .dropdown-menu span, .dropdown-menu .dropdown-item{
  83.                     color: var(--button-foreground-color) !important;
  84.                 }
  85.                 button p,button span{
  86.                     color: var(--button-foreground-color) !important;
  87.                 }
  88.             
  89.                 input{
  90.                     border: 2px solid var(--button-background-color) !important;
  91.                 }
  92.                 /* css for modal cookieconsent */
  93.                 button.cc-link {
  94.                     background: transparent !important;
  95.                     color: var(--button-background-color) !important;
  96.                 }
  97.                 .cc_div .cc-link:hover {
  98.                     border: none;
  99.                 }
  100.                 /* end css for cookieconsent */
  101.                 .required:after {
  102.                     content:" *";
  103.                     color: red
  104.                 }
  105.                 .global-spinner {
  106.                     position: fixed;
  107.                     top: 0;
  108.                     left: 0;
  109.                     width: 100%;
  110.                     height: 100%;
  111.                     background-color: rgba(0, 0, 0, 0.5);
  112.                     display: flex;
  113.                     justify-content: center;
  114.                     align-items: center;
  115.                     z-index: 9999;
  116.                 }
  117.             </style>
  118.             <!-- CSS here -->
  119.             <meta http-equiv="Cache-control" content="public">
  120.         {% endblock %}
  121.     </head>
  122.     <body
  123.     lang="{{ app.request.locale }}"
  124.     data-is-home="{{ isHome ? '1' : '0' }}"
  125.     data-identity-enabled="{{ identityEnabled ? '1' : '0' }}"
  126.     data-anonymization-enabled="{{ siteConfig.isAnonymizationActive ? '1' : '0' }}"
  127.     >
  128.         <div id="global-spinner" class="global-spinner" style="display: none;">
  129.             <div class="spinner-border text-primary" style="width: 3rem; height: 3rem;" role="status">
  130.                 <span class="visually-hidden">
  131.                     Chargement...
  132.                 </span>
  133.             </div>
  134.         </div>
  135.         {% block nav %}
  136.             {{- renderNav() -}}
  137.         {% endblock %}
  138.         {% for message in app.flashes('success') %}
  139.             <div class="alert alert-success alert-base" id="success-alert">
  140.                 {{ message|raw }}
  141.             </div>
  142.         {% endfor %}
  143.         {% for message in app.flashes('warning') %}
  144.             <div class="alert alert-warning alert-base" id="warning-alert">
  145.                 {{ message|raw }}
  146.             </div>
  147.         {% endfor %}
  148.         {% block body %}{% endblock %}
  149.         {{- renderFooter() -}}
  150.         <!-- JS here -->
  151.         <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/js/all.min.js" integrity="sha512-MNA4ve9aW825/nbJKWOW0eo0S5f2HWQYQEIw4TkgLYMgqk88gHpSHJuMkJhYMQWKE7LmJMBdJZMs5Ua19QbF8Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  152.         {% set isHome = app.request.pathinfo == '/' %}
  153.         {% if app.user and is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  154.             <script defer src="{{ asset('assets/js/identity-orchestrator.js') }}"></script>
  155.         {% endif %}
  156.     </body>
  157.     {% block javascripts %}
  158.         <script>
  159.           const previewMode = {{ preview is defined and preview ? 'true' : 'false' }};
  160.           const session = "{{ app.session.id }}"
  161.            let cgu = true;
  162.         {% if app.user and app.user.isAcceptCgu == false %}
  163.             cgu = false;
  164.         {% endif %}
  165.         </script> 
  166.         <!-- End variables -->
  167.         <!-- JS here -->
  168.         {{ encore_entry_script_tags('app') }}
  169.         <script defer>
  170.             const contact_path = '{{ path('contact') }}',
  171.                 title = 'Nous utilisons des cookies !',
  172.                 message = 'Ce site utilise des cookies pour vous offrir une meilleure expérience de navigation. En continuant à naviguer sur le site, vous acceptez notre utilisation des cookies.'
  173.         </script>
  174.         <script>
  175.     // Fade-out progressif des flash messages après 4 secondes
  176.     document.addEventListener('DOMContentLoaded', () => {
  177.         const flashes = document.querySelectorAll('.alert-warning');
  178.         flashes.forEach(flash => {
  179.             setTimeout(() => {
  180.                 flash.style.transition = 'opacity 0.5s ease';
  181.                 flash.style.opacity = '0';
  182.                 setTimeout(() => flash.remove(), 500);
  183.             }, 4000);
  184.         });
  185.     });
  186. </script>
  187.         {{ encore_entry_script_tags('contributorForm') }}
  188.         {{ encore_entry_script_tags('identityForm') }}
  189.         {{ encore_entry_script_tags('global-spinner') }}
  190.         {{ encore_entry_script_tags('cookieconsent-init') }}
  191.         {{ encore_entry_script_tags('messaging_get_token') }}
  192.         {{ encore_entry_script_tags('webPushNotifications') }}
  193.     {% include('partials/cookies.html.twig') %}
  194. {% endblock %}
  195. </html>