{% extends 'base.html.twig' %}
{% block body %}
{% block navbar %}
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="{{ path('homepage') }}">
{# <img src="logo.png" style="width:80px;height:80px;margin-right:20px;padding-bottom:10px" />#}
CAJO
</a>
<button class="navbar-toggler btn-lg" style="height:100px;width:100px" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo01">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item {{ (active_menu == "jp") ? "active" : "" }}">
<a class="nav-link {{ (active_menu == "jp") ? "active" : "" }}" href="{{ path('jurisprudences_search') }}">⚖️ Jurisprudences</a>
</li>
<li class="nav-item {{ (active_menu == "base") ? "active" : "" }}">
<a class="nav-link {{ (active_menu == "base") ? "active" : "" }}" href="{{ path('la_base') }}">📝 La Base</a>
</li>
<li class="nav-item {{ (active_menu == "news") ? "active" : "" }}">
<a class="nav-link {{ (active_menu == "news") ? "active" : "" }}" href="{{ path('news_list') }}">📰 Actus</a>
</li>
<li class="nav-item {{ (active_menu == "contribution") ? "active" : "" }}">
<a class="nav-link {{ (active_menu == "contribution") ? "active" : "" }}" href="{{ path('contribution') }}">💁🏼 Contribuer</a>
</li>
<li class="nav-item {{ (active_menu == "contact") ? "active" : "" }}">
<a class="nav-link {{ (active_menu == "contact") ? "active" : "" }}" href="{{ path('contact') }}">✉️ Contact</a>
</li>
<li class="nav-item {{ (active_menu == "presentation") ? "active" : "" }}">
<a class="nav-link {{ (active_menu == "presentation") ? "active" : "" }}" href="{{ path('presentation') }}">❓ Présentation</a>
</li>
<li class="nav-item dropdown">
<a style="color:white" class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% if app.user is not null %}
{{ (app.user.pseudo) ? app.user.pseudo : app.user.email }}
{% endif %}
<i class="fas fa-user"></i>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
{% if app.user is not null %}
{% if is_granted('ROLE_USER') %}
<a class="dropdown-item" href="{{ path('admin') }}" target="_blank">Accéder à l'admin</a>
<a class="dropdown-item" href="{{ path('stats') }}">Statistiques</a>
{% endif %}
<a class="dropdown-item" href="{{ path('my_account') }}">Mon compte</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ path('app_logout') }}">Déconnexion</a>
{% else %}
<a class="dropdown-item" href="{{ path('app_login') }}">Connexion</a>
{% endif %}
</div>
</li>
</ul>
<div class="form-inline my-2 my-lg-0" id="form_search">
<input class="form-control mr-sm-2" id="input_search" placeholder="🔍 Titre, mot-clé ..." aria-label="Chercher">
<button class="btn btn-outline-success my-2 my-sm-0" id="search_button" onclick="submitSearchForm()">Chercher</button>
</div>
</div>
</nav>
<nav class ="navbar navbar-light rounded" style="margin-top: 5px;margin-bottom: 5px;background-color: var(--info);text-align: center;color: white;">
<span class="navbar-text" style="font-size: 1em; color: white; margin: auto;"> Si vous êtes totalement perdu dans votre procédure d'expulsion, consultez ce <b><a href="" style="color: white !important;">🗺️ schéma</a></b> ou le <b><a href="{{ path('lexique') }}" style="color: white !important;"> 📖 lexique</a></b></span>
</nav>
{% endblock %}
<div style="padding-top:10px">
{% block layout %}
{% endblock %}
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script>
$(document).on('input change keypress', '#input_search', function (e) {
if (e.key === 'Enter' || e.keyCode === 13) {
submitSearchForm();
}
})
function submitSearchForm() {
var searchUrl = '{{ path('search') }}';
var searchValue = $('#input_search').val();
window.location.replace(searchUrl+'?search='+searchValue);
}
</script>
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<style>
@media screen and (max-width: 1000px) {
h2 {
font-size: 2em;
}
h5, h3 {
font-size: 1.5em;
}
body, a, .btn-primary, #input_search, #search_button, .navbar-brand,
#inputEmail, #inputPassword, #form_email, #form_pseudo, #form_plainPassword {
font-size:50px
}
}
ul li {
padding-left:5px
}
</style>
{% endblock %}