feat: added navbar

This commit is contained in:
2025-05-13 13:52:35 +02:00
parent 64432a3854
commit 35d53842e1
5 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>{% block title %}TicketSystem{% endblock %}</title>
<style>
body {
margin: 0;
font-family: sans-serif;
background-color: #f8f9fa;
}
.navbar {
background-color: #343a40;
color: white;
padding: 1rem 0;
}
.navbar-container {
max-width: 700px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.navbar a {
color: white;
text-decoration: none;
margin: 0 1rem;
}
.navbar-right form {
display: inline;
}
.navbar-right button {
background: none;
border: none;
color: white;
cursor: pointer;
font-size: 1rem;
}
</style>
</head>
<body>
<div class="navbar">
<div class="navbar-container">
<div class="navbar-left">
<a href="{% url 'home' %}">🏠 Start</a>
<a href="{% url 'ticket-list' %}">📋 Tickets</a>
</div>
<div class="navbar-right">
{% if user.is_authenticated %}
👤 {{ user.username }}
<form method="post" action="{% url 'logout' %}">
{% csrf_token %}
<button type="submit">🚪 Logout</button>
</form>
{% endif %}
</div>
</div>
</div>
<div class="container" style="max-width: 900px; margin: 2rem auto;">
{% block content %}
{% endblock %}
</div>
</body>
</html>

View File

@@ -1,3 +1,4 @@
{% extends "ticketsystem/base.html" %}
{% block content %}
{% if messages %}
<div style="max-width: 600px; margin: 1rem auto;">

View File

@@ -1,3 +1,4 @@
{% extends "ticketsystem/base.html" %}
{% block content %}
<style>
.home-container {

View File

@@ -1,3 +1,4 @@
{% extends "ticketsystem/base.html" %}
{% block content %}
<style>
.ticket-list-container {

View File

@@ -1,3 +1,4 @@
{% extends "ticketsystem/base.html" %}
{% block content %}
<style>
.form-container {