<?php
declare(strict_types=1);

/*
 * Absolute Webpfade verwenden!
 * Ordnerstruktur im Webroot:
 * /icons/...
 * /style.css
 */

$projects = require __DIR__ . '/includes/config/projects.php';
$serverStatusTargets = require __DIR__ . '/includes/config/server_status_targets.php';

require_once __DIR__ . '/includes/lib/server_status.php';
require_once __DIR__ . '/includes/lib/view_helpers.php';

// ── Serverstatus ─────────────────────────────────────────────────────────
// Performance: initial sofort rendern (=> Lädt...). Badges werden clientseitig nachgeladen.
$serverStatusByUrl = [];

require __DIR__ . '/includes/views/layout_head.php';
require __DIR__ . '/includes/views/header.php';
?>

<main>
    <?php foreach ($projects as $category => $items): ?>
        <?php require __DIR__ . '/includes/views/projects_section.php'; ?>
    <?php endforeach; ?>
</main>

<?php
require __DIR__ . '/includes/views/footer.php';
require __DIR__ . '/includes/views/layout_foot.php';
