|
- <?php
-
- declare(strict_types=1);
-
- $navigationItems = [
- ['label' => 'Dashboard', 'href' => '/'],
- ['label' => 'Projects', 'href' => '/projects'],
- ['label' => 'Activity', 'href' => '/activity'],
- ['label' => 'New project', 'href' => '/projects/create'],
- ];
-
- $currentPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH);
- $currentPath = is_string($currentPath) && $currentPath !== '' ? $currentPath : '/';
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title><?= e($pageTitle ?? 'Project Compass') ?></title>
- <link rel="stylesheet" href="<?= e(asset('css/site.css')) ?>">
- <script src="<?= e(asset('js/app.js')) ?>" defer></script>
- </head>
- <body <?= isset($bodyClass) ? 'class="' . e($bodyClass) . '"' : '' ?>>
- <div class="page-shell">
- <a class="skip-link" href="#main-content">Skip to content</a>
- <header class="site-header">
- <div class="container header-inner">
- <a class="brand" href="/">
- <span class="brand-mark">PC</span>
- <span class="brand-copy">
- <strong>Project Compass</strong>
- <small>Portfolio command center</small>
- </span>
- </a>
-
- <nav class="site-nav" aria-label="Primary navigation">
- <?php foreach ($navigationItems as $item): ?>
- <?php $isActive = $currentPath === $item['href']; ?>
- <a class="nav-link<?= $isActive ? ' is-active' : '' ?>" href="<?= e($item['href']) ?>"><?= e($item['label']) ?></a>
- <?php endforeach; ?>
- </nav>
- </div>
- </header>
|