mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-22 22:48:03 +01:00
Add basic navbar
This commit is contained in:
parent
f24ebb567f
commit
2d9635fd17
2 changed files with 23 additions and 3 deletions
|
@ -18,10 +18,8 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
{% include "common/navbar.html" %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% if user.is_authenticated %}
|
|
||||||
<a href="{% url "logout" %}">Déconnexion</a>
|
|
||||||
{% endif %}
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
|
22
src/common/templates/common/navbar.html
Normal file
22
src/common/templates/common/navbar.html
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<nav class="navbar navbar-expand-lg bg-light mb-2">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="{% url "hello_world" %}">CharaSheet</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-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 me-auto mb-2 mb-lg-0">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" aria-current="page" href="{% url "character:list" %}">Liste</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" aria-current="page" href="{% url "logout" %}">Déconnexion</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
Loading…
Reference in a new issue