mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
bootstrap5, main layout settings
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
{#
|
||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* Copyright (C) 2014-2021, Champs Libres Cooperative SCRLFS,
|
||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
{#
|
||||
@@ -26,159 +26,93 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<title>{{ installation.name }} - {% block title %}{% endblock %}</title>
|
||||
<link rel="shortcut icon" href="{{ asset('build/images/favicon.ico') }}" type="image/x-icon">
|
||||
{#
|
||||
<link rel="stylesheet" href="{{ asset('build/scratch.css') }}"/>
|
||||
#}
|
||||
<link rel="stylesheet" href="{{ asset('build/chill.css') }}"/>
|
||||
{% if active_bootstrap == 1 %}
|
||||
{{ encore_entry_link_tags('bootstrap') }}
|
||||
{% endif %}
|
||||
{% if active_forkawesome == 1 %}
|
||||
{{ encore_entry_link_tags('forkawesome') }}
|
||||
{% endif %}
|
||||
{% if active_ckeditor == 1 %}
|
||||
{{ encore_entry_link_tags('ckeditor5') }}
|
||||
{% endif %}
|
||||
|
||||
{{ encore_entry_link_tags('bootstrap') }}
|
||||
{{ encore_entry_link_tags('forkawesome') }}
|
||||
{{ encore_entry_link_tags('ckeditor5') }}
|
||||
{{ encore_entry_link_tags('chill') }}
|
||||
{% block css%}<!-- nothing added to css -->{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-primary">
|
||||
{{ include('@ChillMain/Layout/_header.html.twig') }}
|
||||
|
||||
{% block top_banner %}{#
|
||||
To use if you want to add a banner below the header (ie the menu)
|
||||
#}{% endblock %}
|
||||
|
||||
<div class="col-4">
|
||||
<a class="navbar-brand" href="{{ path('chill_main_homepage') }}">
|
||||
{{ include('@ChillMain/Layout/_header-logo.html.twig') }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
|
||||
{% block navigation_search_bar %}
|
||||
<li class="nav-item navigation-search">
|
||||
<form class="form-inline my-2 my-sm-0" action="{{ path('chill_main_search') }}" method="get">
|
||||
<input class="form-control mr-sm-2" name="q" type="search" placeholder="{{ 'Search'|trans }}" {% if _search_pattern is defined %}value="{{ _search_pattern }}"{% endif %}/>
|
||||
<button class="btn text-white-50 my-2 my-sm-0" type="submit"><i class="fa fa-lg fa-search fa-flip-horizontal"></i></button>
|
||||
</form>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
{% block navigation_section_menu %}
|
||||
{{ chill_menu('section', {
|
||||
'layout': '@ChillMain/Menu/section.html.twig',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{{ chill_menu('user', {
|
||||
'layout': '@ChillMain/Menu/user.html.twig',
|
||||
}) }}
|
||||
|
||||
{% if available_languages|length == 1 %}
|
||||
<li class="nav-item btn btn-primary">
|
||||
<a class="text-white-50" href="">{{ available_languages[0] | capitalize }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item dropdown btn btn-primary">
|
||||
<a class="nav-link dropdown-toggle" type="button" id="dropdownMenu3Button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<a href="#" class="more">{{ app.request.locale | capitalize }}</a>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu3Button">
|
||||
{% for lang in available_languages %}
|
||||
<a class="dropdown-item{% if lang == app.request.locale %} active{% endif %}"
|
||||
href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale' : lang})) }}">{{ lang | capitalize }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
<div class="content">
|
||||
{% block sublayout_content %}
|
||||
<div class="container-xxl">
|
||||
<div class="row justify-content-center">
|
||||
|
||||
{# Flash messages ! #}
|
||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||
<div class="col-8 alert alert-success flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
{% endfor %}
|
||||
|
||||
{% block top_banner %}{# To use if you want to add a banner below the header (ie the menu) #}{% endblock %}
|
||||
|
||||
<div id="content_conainter">
|
||||
{% block sublayout_containter %}
|
||||
<div class="container-fluid content">
|
||||
<div class="row justify-content-center">
|
||||
{# Flash messages ! #}
|
||||
{% for flashMessage in app.session.flashbag.get('success') %}
|
||||
<div class="col-8 alert alert-success flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('error') %}
|
||||
<div class="col-8 alert alert-danger flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<div class="col-8 alert alert-warning flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-8 mt-5 flash_message">
|
||||
<h2>{{ 'Search'|trans }}</h2>
|
||||
|
||||
<form action="{{ path('chill_main_search') }}" method="get">
|
||||
<input class="form-control form-control-lg" name="q" type="search" placeholder="{{ 'Search persons, ...'|trans }}" />
|
||||
<center>
|
||||
<button type="submit" class="btn btn-lg btn-warning mt-2"><i class="fa fa-fw fa-search"></i> {{ 'Search'|trans }}</button>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{ chill_widget('homepage', {} ) }}
|
||||
{% endblock %}
|
||||
{% for flashMessage in app.session.flashbag.get('error') %}
|
||||
<div class="col-8 alert alert-danger flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<div class="col-8 alert alert-warning flash_message">
|
||||
<span>
|
||||
{{ flashMessage|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-8 mt-5 flash_message">
|
||||
<h2>{{ 'Search'|trans }}</h2>
|
||||
|
||||
<form action="{{ path('chill_main_search') }}" method="get">
|
||||
<input class="form-control form-control-lg" name="q" type="search" placeholder="{{ 'Search persons, ...'|trans }}" />
|
||||
<center>
|
||||
<button type="submit" class="btn btn-lg btn-warning mt-2">
|
||||
<i class="fa fa-fw fa-search"></i> {{ 'Search'|trans }}
|
||||
</button>
|
||||
</center>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{ chill_widget('homepage', {} ) }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{{ include('@ChillMain/Layout/_footer.html.twig') }}
|
||||
|
||||
{{ encore_entry_script_tags('scratch') }}
|
||||
{{ encore_entry_script_tags('bootstrap') }}
|
||||
{{ encore_entry_script_tags('forkawesome') }}
|
||||
{{ encore_entry_script_tags('ckeditor5') }}
|
||||
{{ encore_entry_script_tags('chill') }}
|
||||
{% if active_bootstrap == 1 %}
|
||||
{{ encore_entry_script_tags('bootstrap') }}
|
||||
{% endif %}
|
||||
{% if active_forkawesome == 1 %}
|
||||
{{ encore_entry_script_tags('forkawesome') }}
|
||||
{% endif %}
|
||||
{% if active_ckeditor == 1 %}
|
||||
{{ encore_entry_script_tags('ckeditor5') }}
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript">
|
||||
window.addEventListener('DOMContentLoaded', function(e) {
|
||||
chill.checkOtherValueOnChange();
|
||||
$('.select2').select2({
|
||||
allowClear: true,
|
||||
theme: "bootstrap"
|
||||
window.addEventListener('DOMContentLoaded', function(e) {
|
||||
chill.checkOtherValueOnChange();
|
||||
$('.select2').select2({
|
||||
allowClear: true,
|
||||
theme: "bootstrap"
|
||||
});
|
||||
chill.categoryLinkParentChildSelect();
|
||||
});
|
||||
chill.categoryLinkParentChildSelect();
|
||||
});
|
||||
</script>
|
||||
{% block js%}<!-- nothing added to js -->{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
</script>
|
||||
|
||||
{% block js%}<!-- nothing added to js -->{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user