GEX website at gex.ondrovo.com

_header.php 827B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. $cli = defined('STDIN');
  3. $suf = $cli ? '.html' : '.php';
  4. list($curpage, ) = explode('.', basename($curpage));
  5. $pages = [
  6. "index" => 'What is GEX',
  7. "features" => 'Features',
  8. "platforms" => 'Platforms',
  9. "downloads" => 'Downloads',
  10. "contact" => 'Get Involved',
  11. ];
  12. ?><!DOCTYPE html>
  13. <html>
  14. <head lang="en">
  15. <meta charset="UTF-8">
  16. <title>GEX - <?= $pages[$curpage] ?></title>
  17. <link rel="stylesheet" href="css/application.css">
  18. </head>
  19. <body>
  20. <header id="PageHeader">
  21. <div>
  22. <span id="top"></span>
  23. <span class="Title">GEX</span><br>
  24. <span class="Subtitle">...the GPIO header for your PC</span>
  25. </div>
  26. </header>
  27. <section>
  28. <nav>
  29. <?php
  30. foreach ($pages as $page => $label) {
  31. echo "<a href=\"$page$suf\"";
  32. if ($curpage == $page) echo ' class="active"';
  33. echo ">$label</a>";
  34. }
  35. ?>
  36. </nav>
  37. </section>