feat: added navbar
This commit is contained in:
70
ticketsystem/templates/ticketsystem/base.html
Normal file
70
ticketsystem/templates/ticketsystem/base.html
Normal 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>
|
||||
@@ -1,3 +1,4 @@
|
||||
{% extends "ticketsystem/base.html" %}
|
||||
{% block content %}
|
||||
{% if messages %}
|
||||
<div style="max-width: 600px; margin: 1rem auto;">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% extends "ticketsystem/base.html" %}
|
||||
{% block content %}
|
||||
<style>
|
||||
.home-container {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% extends "ticketsystem/base.html" %}
|
||||
{% block content %}
|
||||
<style>
|
||||
.ticket-list-container {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{% extends "ticketsystem/base.html" %}
|
||||
{% block content %}
|
||||
<style>
|
||||
.form-container {
|
||||
|
||||
Reference in New Issue
Block a user