1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- function render_page_header($page_title) {
- global $settings; ?>
- <!DOCTYPE html>
- <html class="<?= $settings['theme'] ?>">
- <head>
- <title><?= htmlspecialchars($page_title) ?> - <?= PROJECT_NAME ?></title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta http-equiv="Content-Security-Policy" content="default-src 'self';" />
- <link href="<?= BASE_URL ?>/main.css" rel="stylesheet">
- </head>
- <body>
- <nav>
- <div class="container">
- <div class="title">
- <a href="<?= BASE_URL ?>/"><?= PROJECT_NAME ?></a>
- </div>
- <form class="search-bar" action="<?= BASE_URL ?>/tags/" method="post">
- <input type="text" name="q" placeholder="<?= get_string('search.placeholder') ?>" required>
- </form>
- <div>
- <a href="<?= BASE_URL ?>/settings/"><?= get_string('settings.title') ?></a>
- </div>
- </div>
- </nav>
- <main><?php
- }
- function render_page_footer() { ?>
- </main>
- <footer>
- <div class="container">
- <div><?= sprintf('%s v%s', PROJECT_NAME, PROJECT_VERSION) ?></div>
- <div><a target="_blank" href="<?= PROJECT_URL ?>"><?= get_string('source-code') ?></a></div>
- <div><a target="_blank" href="<?= BASE_URL ?>/LICENSE"><?= get_string('license') ?></a></div>
- </div>
- </footer>
- </body>
- </html><?php
- }
|