64 lines
2.5 KiB
Plaintext
64 lines
2.5 KiB
Plaintext
<!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>
|
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
|
</head>
|
|
<body>
|
|
|
|
<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' )) { %>
|
|
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="/training">Trainings</a>
|
|
</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>
|
|
<% } else { %>
|
|
<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>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container">
|