39029-vm/includes/header.php
2026-03-06 17:54:56 +00:00

49 lines
2.5 KiB
PHP

<?php
$projectName = $_SERVER['PROJECT_NAME'] ?? 'ArcaneForge';
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'A dark, high-contrast hub for player builds, forums, and community intel.';
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
$fullTitle = $pageTitle ? ($pageTitle . ' · ' . $projectName) : $projectName;
$active = $active ?? '';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?= h($fullTitle) ?></title>
<?php if ($projectDescription): ?>
<meta name="description" content="<?= h($projectDescription) ?>" />
<meta property="og:description" content="<?= h($projectDescription) ?>" />
<meta property="twitter:description" content="<?= h($projectDescription) ?>" />
<?php endif; ?>
<?php if ($projectImageUrl): ?>
<meta property="og:image" content="<?= h($projectImageUrl) ?>" />
<meta property="twitter:image" content="<?= h($projectImageUrl) ?>" />
<?php endif; ?>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?= time(); ?>">
</head>
<body class="app-body">
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
<div class="container py-2">
<a class="navbar-brand d-flex align-items-center gap-2" href="index.php">
<span class="badge rounded-pill text-bg-dark border border-secondary">AF</span>
<?= h($projectName) ?>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="mainNav">
<div class="navbar-nav ms-auto gap-lg-2">
<a class="nav-link <?= $active === 'home' ? 'active' : '' ?>" href="index.php">Home</a>
<a class="nav-link <?= $active === 'builds' ? 'active' : '' ?>" href="builds.php">Builds</a>
<a class="nav-link <?= $active === 'forums' ? 'active' : '' ?>" href="forums.php">Forums</a>
<a class="nav-link <?= $active === 'create-build' ? 'active' : '' ?>" href="create_build.php">Publish Build</a>
<a class="nav-link <?= $active === 'create-thread' ? 'active' : '' ?>" href="create_thread.php">Start Thread</a>
</div>
</div>
</div>
</nav>
<main class="container py-4">