summaryrefslogtreecommitdiff
path: root/web/partials.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/partials.php')
-rw-r--r--web/partials.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/web/partials.php b/web/partials.php
new file mode 100644
index 0000000..adbbd01
--- /dev/null
+++ b/web/partials.php
@@ -0,0 +1,23 @@
+<?php
+include_once $_SERVER['DOCUMENT_ROOT'] . '/config.php';
+
+function html_header()
+{
+ $u = $_GET['u'] ?: null;
+ $c = $_GET['c'] ?: null;
+
+ echo '' ?>
+ <header>
+ <a href="/"><img src="/static/img/brand/small.webp" alt=""> <?= INSTANCE_NAME ?></a>
+ <?php if (isset($c)): ?>
+ <p>&gt; <a href="/?c=<?= $c ?>">&#35;<?= $c ?></a></p>
+ <?php endif; ?>
+ <?php if (isset($u)): ?>
+ <p>&gt; <a href="/?u=<?= $u ?>"><?= $u ?></a></p>
+ <?php endif; ?>
+ <?php if (isset($u, $c)): ?>
+ <p> &gt; <a href="/?c=<?= $c ?>&u=<?= $u ?>"><?= $u ?> in &#35;<?= $c ?></a></p>
+ <?php endif; ?>
+ </header>
+ <?php ;
+} \ No newline at end of file