summaryrefslogtreecommitdiff
path: root/web/partials.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-10-14 15:36:31 +0500
committerilotterytea <iltsu@alright.party>2025-10-14 15:36:31 +0500
commit33fd114a314212b8759b525fb9e08d4ff4ca8869 (patch)
tree7abbb155a7515148f355b30978e3a0fa77913fd1 /web/partials.php
parentd6196a61348dbd0040e332147ef4a34ade64b309 (diff)
feat: web frontend
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