mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
wip.. navbar bootstrap
This commit is contained in:
@@ -28,8 +28,10 @@
|
||||
<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">
|
||||
{{ encore_entry_link_tags('scratch') }}
|
||||
{{ encore_entry_link_tags('chill') }}
|
||||
{#
|
||||
<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 %}
|
||||
@@ -43,59 +45,65 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header class="navigation container-fluid">
|
||||
<div class="grid-4 hide-tablet hide-mobile parent">
|
||||
<div class="grid-10 push-2 grid-tablet-12 grid-mobile-12 push-tablet-0 grid-mobile-0 logo-container">
|
||||
<a href="{{ path('chill_main_homepage') }}">
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-primary">
|
||||
|
||||
<div class="col-4">
|
||||
<a class="navbar-brand" href="{{ path('chill_main_homepage') }}">
|
||||
{{ include('@ChillMain/Layout/_header-logo.html.twig') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-8 grid-tablet-12 grid-mobile-12 text-right parent">
|
||||
<div class="nav">
|
||||
<ul class="navigation-menu">
|
||||
{% block navigation_section_menu %}
|
||||
{{ chill_menu('section', {
|
||||
'layout': '@ChillMain/Menu/section.html.twig',
|
||||
<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 my-2 my-sm-0" type="submit"><i class="fa 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',
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{{ chill_menu('user', {
|
||||
'layout': '@ChillMain/Menu/user.html.twig',
|
||||
}) }}
|
||||
{% if available_languages|length == 1 %}
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-primary" 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 %}
|
||||
|
||||
{% if available_languages|length == 1 %}
|
||||
<li class="nav-link2 lang-selection">
|
||||
<div class="li-content">
|
||||
<a href="">{{ available_languages[0] | capitalize }}</a>
|
||||
</div>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-link2 lang-selection">
|
||||
<div class="li-content">
|
||||
<a href="#" class="more">{{ app.request.locale | capitalize }}</a>
|
||||
</div>
|
||||
<ul class="submenu">
|
||||
{% for lang in available_languages %}
|
||||
<li {% if lang == app.request.locale %}class="active"{% endif %}>
|
||||
<a href="{{ path(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale' : lang})) }}">{{ lang | capitalize }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% block navigation_search_bar %}
|
||||
<div class="navigation-search">
|
||||
<form action="{{ path('chill_main_search') }}" method="get">
|
||||
<input name="q" type="search" placeholder="{{ 'Search'|trans }}" {% if _search_pattern is defined %}value="{{ _search_pattern }}"{% endif %}/>
|
||||
<button type="submit" class="sc-button"><i class="fa fa-search fa-flip-horizontal"></i></button>
|
||||
</form>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
{% block top_banner %}{# To use if you want to add a banner below the header (ie the menu) #}{% endblock %}
|
||||
|
Reference in New Issue
Block a user