You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.7KB

  1. <?php
  2. declare(strict_types=1);
  3. $navigationItems = [
  4. ['label' => 'Boards', 'href' => '/boards'],
  5. ];
  6. $currentPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH);
  7. $currentPath = is_string($currentPath) && $currentPath !== '' ? $currentPath : '/';
  8. ?>
  9. <!DOCTYPE html>
  10. <html lang="en">
  11. <head>
  12. <meta charset="UTF-8">
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  14. <title><?= e($pageTitle ?? 'KCI Kanban') ?></title>
  15. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
  16. <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet" />
  17. <link rel="stylesheet" href="<?= e(asset('css/site.css')) ?>">
  18. </head>
  19. <body>
  20. <div class="page-shell">
  21. <header class="site-header">
  22. <div class="container header-inner">
  23. <a class="brand" href="/boards">
  24. <span class="brand-mark">KC</span>
  25. <span class="brand-copy">
  26. <strong>KCI Kanban</strong>
  27. <small>PHP</small>
  28. </span>
  29. </a>
  30. <nav class="site-nav" aria-label="Primary navigation">
  31. <?php foreach ($navigationItems as $item): ?>
  32. <?php $isActive = str_starts_with($currentPath, $item['href']); ?>
  33. <a class="nav-link<?= $isActive ? ' is-active' : '' ?>" href="<?= e($item['href']) ?>">
  34. <?= e($item['label']) ?>
  35. </a>
  36. <?php endforeach; ?>
  37. </nav>
  38. </div>
  39. </header>

Powered by TurnKey Linux.