add more structure in base template

This commit is contained in:
Tykayn 2024-07-16 10:58:47 +02:00 committed by tykayn
parent 6aa77329e6
commit 0e9cc0b912
4 changed files with 23 additions and 5 deletions

7
assets/styles/_nav.scss Normal file
View File

@ -0,0 +1,7 @@
#nav_menu{
padding: 0.5rem;
border-bottom: solid 1px $bg_color;
a{
margin-right: 1rem;
}
}

View File

@ -1,5 +1,6 @@
@import 'variables'; @import 'variables';
@import 'global'; @import 'global';
@import 'nav';
@import 'forms'; @import 'forms';
@import 'clickables'; @import 'clickables';

View File

@ -16,8 +16,17 @@
</head> </head>
<body> <body>
<div id="main_content"> <div id="main_content">
<div id="main_header">
{% block header %}
{% include 'common/nav.html.twig' %} {% include 'common/nav.html.twig' %}
{% endblock %}
</div>
<div id="main_body">
{% block body %}{% endblock %} {% block body %}{% endblock %}
</div> </div>
<div id="main_footer">
{% block footer %}{% endblock %}
</div>
</div>
</body> </body>
</html> </html>

View File

@ -1,16 +1,17 @@
<div id="nav_menu"> <div id="nav_menu">
<nav> <nav><div class="mb-3">
<a href="{{path('app_index')}}">Accueil</a> <a href="{{path('app_index')}}">Accueil</a>
{% if app.user %} {% if app.user %}
<div class="mb-3">
You are logged in as You are logged in as
<a class="account-link" href="{{path('app_account')}}">{{ app.user.userIdentifier }}</a> <a class="account-link" href="{{path('app_account')}}">{{ app.user.userIdentifier }}</a>
, <a href="{{ path('app_logout') }}">Logout</a> , <a href="{{ path('app_logout') }}">Logout</a>
</div>
{% else %} {% else %}
<a href="{{path('app_login')}}">{{ 'user.login'|trans }}</a> <a href="{{path('app_login')}}">{{ 'user.login'|trans }}</a>
<a href="{{path('app_register')}}">Register</a> <a href="{{path('app_register')}}">Register</a>
{% endif %} {% endif %}
</div>
{# <a href="{{path('admin')}}">Admin</a>#} {# <a href="{{path('admin')}}">Admin</a>#}
</nav> </nav>
</div> </div>