{#
 # ---------------------------------------------------------------------
 #
 # GLPI - Gestionnaire Libre de Parc Informatique
 #
 # http://glpi-project.org
 #
 # @copyright 2015-2025 Teclib' and contributors.
 # @licence   https://www.gnu.org/licenses/gpl-3.0.html
 #
 # ---------------------------------------------------------------------
 #
 # LICENSE
 #
 # This file is part of GLPI.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #
 # ---------------------------------------------------------------------
 #}

{% set theme = config('palette') %}
{% if css_files is not defined %}
   {% set css_files = [
       {'path': 'public/lib/base.css'},
       {'path': 'css/palettes/' ~ theme ~ '.scss'}
   ] %}
   {# TODO : load hight contrast css #}
{% endif %}
{% if js_files is not defined %}
   {% set js_files = [
       {'path': 'public/lib/base.js'},
       {'path': 'js/common.js'},
       {'path': 'public/lib/fuzzy.js'}
   ] %}
{% endif %}
{% if js_modules is not defined %}
   {% set js_modules = [] %}
{% endif %}
{% if custom_header_tags is not defined %}
   {% set custom_header_tags = [] %}
{% endif %}

{# JS scripts / modules are loaded in the header in anonymous pages #}
{% set js_files = js_files|merge(get_plugins_js_scripts_files(true)) %}
{% set js_modules = js_modules|merge(get_plugins_js_modules_files(true)) %}

{% set is_anonymous_page = true %}

{{ include('layout/parts/head.html.twig') }}
<body class="welcome-anonymous">
   <div class="page-anonymous">
      <div class="flex-fill d-flex flex-column justify-content-center py-4 mt-4">
         {% set style = null %}
         {% if card_md_width is defined %}
            {% set style = 'max-width: 40rem' %}
         {% endif %}
         {% if card_bg_width is defined %}
            {% set style = 'max-width: 60rem' %}
         {% endif %}

         <div class="container-tight py-6" {% if style is not null %}style="{{ style }}"{% endif %}>
            <div class="text-center">
               <div class="col-md">
                  <span class="glpi-logo mb-4" title="GLPI"></span>
               </div>
            </div>
            <div class="card card-md">
               <div class="card-body">
               {% block content_block %}{% endblock %}
               </div>
            </div>

            <div class="text-center text-muted mt-3">
               {% block footer_block %}{% endblock %}
            </div>
         </div>
      </div>
   </div>

   {% block javascript_block %}{% endblock %}
</body>
</html>
