- PHP-App unter hub/ für rinkplanner-hub.programmschmiede.de - MariaDB-Schema, Argon2id, Sessions, CSRF und Ratenbegrenzung - Einladungscodes, Admin-Bereich und Kür-Pakete mit Audiodatei - JSON-API v1 mit Bearer-Tokens für die Godot-App - Deployment und Erstinstallation über tools/deploy_hub.sh - Doku und Credentials-Vorlage ergänzt
65 lines
2.2 KiB
PHP
65 lines
2.2 KiB
PHP
<?php
|
|
/** @var string $title */
|
|
/** @var string $content */
|
|
/** @var array|null $user */
|
|
$flashes = flash_pull();
|
|
?>
|
|
<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title><?= e($title) ?> · Rinkplanner-Hub</title>
|
|
<link rel="stylesheet" href="<?= e(url('/assets/hub.css')) ?>">
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<a class="brand" href="<?= e(url('/')) ?>">
|
|
<span class="brand-mark">R</span>
|
|
<span>Rinkplanner <strong>Hub</strong></span>
|
|
</a>
|
|
<nav class="nav">
|
|
<?php if ($user !== null): ?>
|
|
<a href="<?= e(url('/')) ?>">Küren</a>
|
|
<a href="<?= e(url('/upload')) ?>">Hochladen</a>
|
|
<a href="<?= e(url('/account')) ?>"><?= e($user['display_name']) ?></a>
|
|
<?php if (($user['role'] ?? '') === 'admin'): ?>
|
|
<a class="nav-admin" href="<?= e(url('/admin/invites')) ?>">Verwaltung</a>
|
|
<?php endif; ?>
|
|
<form class="inline" method="post" action="<?= e(url('/logout')) ?>">
|
|
<?= csrf_field() ?>
|
|
<button class="link-button" type="submit">Abmelden</button>
|
|
</form>
|
|
<?php else: ?>
|
|
<a href="<?= e(url('/login')) ?>">Anmelden</a>
|
|
<?php endif; ?>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="page">
|
|
<?php if ($flashes): ?>
|
|
<div class="flashes">
|
|
<?php foreach ($flashes as $flash): ?>
|
|
<?php if (($flash['type'] ?? '') === 'secret'): ?>
|
|
<div class="flash flash-secret">
|
|
<strong><?= e($flash['label'] ?? 'Geheimnis') ?></strong>
|
|
<code><?= e($flash['value'] ?? '') ?></code>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="flash flash-<?= e($flash['type'] ?? 'info') ?>">
|
|
<?= e($flash['message'] ?? '') ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?= $content ?>
|
|
</main>
|
|
|
|
<footer class="footer">
|
|
<span>Geschlossene Beta · Rinkplanner-Hub</span>
|
|
<a href="https://rinkplanner.programmschmiede.de/">Zur Rinkplanner-Seite</a>
|
|
</footer>
|
|
</body>
|
|
</html>
|