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.

49 lines
2.1KB

  1. <?php
  2. declare(strict_types=1);
  3. $navigationItems = [
  4. ['label' => 'Home', 'href' => '/'],
  5. ['label' => 'Employees', 'href' => '/employees'],
  6. ['label' => 'Example JSON', 'href' => '/users/123'],
  7. ];
  8. $currentPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH);
  9. $currentPath = is_string($currentPath) && $currentPath !== '' ? $currentPath : '/';
  10. ?>
  11. <!DOCTYPE html>
  12. <html lang="en">
  13. <head>
  14. <meta charset="UTF-8">
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16. <title><?= e($pageTitle ?? 'MindVisionCode PHP') ?></title>
  17. <link rel="stylesheet" href="https://unpkg.com/tabulator-tables@6.3.1/dist/css/tabulator.min.css">
  18. <link rel="stylesheet" href="<?= e(asset('css/site.css')) ?>">
  19. <script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.10/dist/htmx.min.js" integrity="sha384-H5SrcfygHmAuTDZphMHqBJLc3FhssKjG7w/CeCpFReSfwBWDTKpkzPP8c+cLsK+V" crossorigin="anonymous" defer></script>
  20. <script src="https://unpkg.com/tabulator-tables@6.3.1/dist/js/tabulator.min.js" defer></script>
  21. <script src="<?= e(asset('js/app.js')) ?>" defer></script>
  22. <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
  23. </head>
  24. <body>
  25. <div class="page-shell">
  26. <header class="site-header">
  27. <div class="container header-inner">
  28. <a class="brand" href="/">
  29. <span class="brand-mark">MV</span>
  30. <span class="brand-copy">
  31. <strong>MindVisionCode</strong>
  32. <small>PHP MVC</small>
  33. </span>
  34. </a>
  35. <nav class="site-nav" aria-label="Primary navigation">
  36. <?php foreach ($navigationItems as $item): ?>
  37. <?php $isActive = $currentPath === $item['href']; ?>
  38. <a class="nav-link<?= $isActive ? ' is-active' : '' ?>" href="<?= e($item['href']) ?>">
  39. <?= e($item['label']) ?>
  40. </a>
  41. <?php endforeach; ?>
  42. </nav>
  43. </div>
  44. </header>

Powered by TurnKey Linux.