diff options
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 |
