| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- if (isset($_GET['p'])) {
- $pageid = $_GET['p'];
- } else {
- $pageid = false;
- }
- if ($pageid && $pageid == "") {
- $pageid = false;
- }
- ?>
- <!DOCTYPE html>
- <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
- <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
- <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
- <!--[if gt IE 8]> <html class="no-js"> <!<![endif]-->
- <html lang="de">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>Hello World!</title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="/style/style.min.css">
- <script src="/htmx/htmx.min.js"></script>
- </head>
- <body>
- <!--[if lt IE 7]><p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p><![endif]-->
- <header>
- <nav hx-boost="true">
- <ul>
- <li>
- <a href="/?p=home" id="nav-link-home" hx-get="/content/home.php" hx-target="#main-content" hx-push-url="/?p=home" hx-on="click: navLinkClicked('home')" class="nav-link<?php if (!$pageid || $pageid == "home") {
- echo (" active");
- } ?>">Home</a>
- </li>
- <li>
- <a href="/?p=about" id="nav-link-about" hx-get="/content/about.php" hx-target="#main-content" hx-push-url="/?p=about" hx-on="click: navLinkClicked('about')" class="nav-link<?php if ($pageid == "about") {
- echo (" active");
- } ?>">About</a>
- </li>
- <li>
- <a href="/?p=contact" id="nav-link-contact" hx-get="/content/contact.php" hx-target="#main-content" hx-push-url="/?p=contact" hx-on="click: navLinkClicked('contact')" class="nav-link<?php if ($pageid == "contact") {
- echo (" active");
- } ?>">Contact</a>
- </li>
- </ul>
- </nav>
- </header>
- <main id="main-content" <?php if ($pageid && $pageid != 'home') {
- echo ("hx-get=\"/content/" . $pageid . ".php\" hx-trigger=\"load\"");
- } ?>>
- <section>
- <h1>Hello World!</h1>
- <button class="primary" hx-get="/get/?param=If you see this, it's working!" hx-trigger="click" hx-target="#replacebyget" hx-swap="innerHTML">Click Me!</button>
- <div id="replacebyget">
- <p>Response should appear here</p>
- </div>
- </section>
- <section>
- <h2>Content Rendered At:</h2>
- <div hx-get="/get/time.php" hx-trigger="load"></div>
- </section>
- </main>
- <footer>
- <div>
- <a href="/">Datenschutz</a>
- <p>© 2023 Rose Reed</p>
- <a href="/">Impressum</a>
- </div>
- </footer>
- <script src="/script/site.js"></script>
- </body>
- </html>
|