diff options
| author | ilotterytea <iltsu@alright.party> | 2025-10-14 15:36:31 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-10-14 15:36:31 +0500 |
| commit | 33fd114a314212b8759b525fb9e08d4ff4ca8869 (patch) | |
| tree | 7abbb155a7515148f355b30978e3a0fa77913fd1 /web/partials.php | |
| parent | d6196a61348dbd0040e332147ef4a34ade64b309 (diff) | |
feat: web frontend
Diffstat (limited to 'web/partials.php')
| -rw-r--r-- | web/partials.php | 23 |
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>> <a href="/?c=<?= $c ?>">#<?= $c ?></a></p> + <?php endif; ?> + <?php if (isset($u)): ?> + <p>> <a href="/?u=<?= $u ?>"><?= $u ?></a></p> + <?php endif; ?> + <?php if (isset($u, $c)): ?> + <p> > <a href="/?c=<?= $c ?>&u=<?= $u ?>"><?= $u ?> in #<?= $c ?></a></p> + <?php endif; ?> + </header> + <?php ; +}
\ No newline at end of file |
