div TODOs

This commit is contained in:
2026-02-16 13:56:01 +01:00
parent 12141485ae
commit 510a248edb
36 changed files with 1500 additions and 1533 deletions

View File

@@ -1,19 +1,32 @@
<?php
/**
* footer.php
*
* HTML-Footer, Scripts, evtl. Modale oder Notifications
* Wird am Ende jeder Seite eingebunden
*/
?>
</main>
<footer>
<p>&copy; <?php echo date('Y'); ?> Troy Grunt - NDT</p>
<!-- TODO: Optional: Statusanzeige, Debug-Info, Session-Hinweis -->
<p class="footer-meta">
Umgebung: <?php echo defined('APP_ENV') ? htmlspecialchars(APP_ENV) : 'unknown'; ?>
| Session: <?php echo session_id() !== '' ? 'aktiv' : 'inaktiv'; ?>
</p>
</footer>
<!-- TODO: evtl. JS für modale Fenster oder Flash Messages -->
<?php if (!empty($_SESSION['success']) || !empty($_SESSION['error'])): ?>
<script>
(function () {
const success = <?php echo json_encode($_SESSION['success'] ?? '', JSON_UNESCAPED_UNICODE); ?>;
const error = <?php echo json_encode($_SESSION['error'] ?? '', JSON_UNESCAPED_UNICODE); ?>;
if (success) {
alert(success);
}
if (error) {
alert(error);
}
})();
</script>
<?php unset($_SESSION['success'], $_SESSION['error']); ?>
<?php endif; ?>
</body>
</html>

View File

@@ -10,7 +10,10 @@
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Netwatch - Netzwerk-Dokumentation und Verkabelungsverwaltung">
<title>Netzwerk-Dokumentation</title>
<link rel="icon" type="image/svg+xml" href="/assets/icons/favicon.svg">
<!-- CSS -->
<link rel="stylesheet" href="/assets/css/app.css">
@@ -21,7 +24,6 @@
<script src="/assets/js/svg-editor.js" defer></script>
<script src="/assets/js/network-view.js" defer></script>
<!-- TODO: Meta-Tags, Favicon -->
</head>
<body>
<header class="app-header">

View File

@@ -2,25 +2,18 @@
/**
* layout.php
*
* Grundlayout: Header + Content + Footer
* Kann als Basis-Template dienen, falls Module HTML ausgeben
*
* Beispiel-Aufruf in Modul:
* include __DIR__ . '/../templates/layout.php';
*
* TODO: In Zukunft: zentrales Template-System (z.B. mit $content)
* Basislayout fuer Header + Content + Footer.
*/
?>
<?php include __DIR__ . '/header.php'; ?>
<div class="content-wrapper">
<!-- TODO: Dynamischen Content hier einfügen -->
<?php
if (isset($content)) {
echo $content;
} else {
echo "<p>Inhalt fehlt</p>";
echo '<p>Kein Inhalt uebergeben.</p>';
}
?>
</div>