Add basic navbar

This commit is contained in:
Gabriel Augendre 2022-11-01 11:45:48 +01:00
parent f24ebb567f
commit 2d9635fd17
2 changed files with 23 additions and 3 deletions

View file

@ -18,10 +18,8 @@
</style>
</head>
<body>
{% include "common/navbar.html" %}
<div class="container">
{% if user.is_authenticated %}
<a href="{% url "logout" %}">Déconnexion</a>
{% endif %}
{% block content %}
{% endblock %}
</div>

View 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>