training/views/partials/header.ejs

64 lines
2.5 KiB
Plaintext
Raw Normal View History

2024-05-23 20:49:34 +02:00
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Turnstunden WebApp</title>
2024-05-27 17:18:22 +02:00
<link rel="stylesheet" href="/css/bootstrap.min.css">
2024-05-23 20:49:34 +02:00
</head>
<body>
2024-05-26 20:05:30 +02:00
2024-05-28 16:19:59 +02:00
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand" href="/">Kinderturnen</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">
<% if (session && ( session.role =='admin' || session.role =='user' )) { %>
2024-05-28 00:17:57 +02:00
2024-05-28 16:19:59 +02:00
<li class="nav-item">
2024-05-28 16:35:33 +02:00
<a class="nav-link" href="/training">Trainings</a>
2024-05-28 16:19:59 +02:00
</li>
<li class="nav-item">
<a class="nav-link" href="/riege">Riegen</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/teilnehmer">Teilnehmende</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/profile">Profil</a>
</li>
<% } else {%>
<li class="nav-item">
<a class="nav-link" href="/register">Registrieren</a>
</li>
<% } %>
<li class="nav-item">
<a class="nav-link" href="/spiele">Spiele</a>
</li>
<% if (session && session.role === 'admin') { %>
<li class="nav-item"><a class="nav-link" href="/admin">Admin</a></li>
<% } %>
</ul>
<% if (session && ( session.role =='admin' || session.role =='user' )) { %>
<form class="d-flex" role="search" method="get" action="/logout">
<button class="btn btn-outline-success" type="submit">Logout</button>
</form>
2024-05-23 20:49:34 +02:00
<% } else { %>
2024-05-28 16:19:59 +02:00
<form class="d-flex" role="search" method="POST" action="/login">
<input type="text" class="form-control" placeholder="username" name="username">
<input type="password" class="form-control" placeholder="passwort" name="password">
<button class="btn btn-outline-success" type="submit">Login</button>
</form>
<% } %>
</div>
2024-05-23 20:49:34 +02:00
</div>
</nav>
2024-05-28 16:19:59 +02:00
2024-05-23 20:49:34 +02:00
<div class="container">