bootstrap5, main layout settings

This commit is contained in:
2021-07-02 13:00:56 +02:00
parent 3694eb5bf2
commit 8e8cdfce0a
12 changed files with 491 additions and 448 deletions

View File

@@ -1,4 +1,9 @@
<footer class="footer">
<p>{{ 'This program is free software: you can redistribute it and/or modify it under the terms of the <strong>GNU Affero General Public License</strong>'|trans|raw }}
<br/> <a name="bottom" class="btn text-white" href="https://{{ app.request.locale }}.wikibooks.org/wiki/Chill" target="_blank">{{ 'User manual'|trans }}</a></p>
<p>
{{ 'This program is free software: you can redistribute it and/or modify it under the terms of the <strong>GNU Affero General Public License</strong>'|trans|raw }}
<br/>
<a name="bottom" class="btn text-white" href="https://{{ app.request.locale }}.wikibooks.org/wiki/Chill" target="_blank">
{{ 'User manual'|trans }}
</a>
</p>
</footer>

View File

@@ -0,0 +1,105 @@
{#
* 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/>.
#}
<header>
<nav class="navbar navbar-dark bg-primary navbar-expand-md">
<div class="container-xxl">
<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" action="{{ path('chill_main_search') }}" method="get">
<input
class="form-control"
name="q"
type="search"
placeholder="{{ 'Search'|trans }}"
{% if _search_pattern is defined %}value="{{ _search_pattern }}"{% endif %}/>
<button class="btn text-white-50" 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 id="dropdownMenu3Button"
class="nav-link dropdown-toggle"
type="button"
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>
</div>
</div>
</nav>
</header>