summaryrefslogtreecommitdiff
path: root/lib/partials.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-12 14:50:15 +0500
committerilotterytea <iltsu@alright.party>2025-12-12 14:50:15 +0500
commit008abff7be3e9810fb3693bf8f33635d9524b5c2 (patch)
treec9d9456bfcc18aefb2eeacd8581d0f3b00e3baf4 /lib/partials.php
parent853d253a7dc0c7de6438310cd94a7ece2da9397c (diff)
feat: navigation barHEADmaster
Diffstat (limited to 'lib/partials.php')
-rw-r--r--lib/partials.php64
1 files changed, 64 insertions, 0 deletions
diff --git a/lib/partials.php b/lib/partials.php
new file mode 100644
index 0000000..b94f6a3
--- /dev/null
+++ b/lib/partials.php
@@ -0,0 +1,64 @@
+<?php
+function html_header()
+{
+ $links = [
+ [
+ 'title' => "home",
+ 'url' => "/"
+ ],
+ [
+ 'title' => "software",
+ 'url' => "/software"
+ ],
+ [
+ 'title' => "wiki",
+ 'url' => "https://wiki.ilt.su"
+ ],
+ [
+ 'title' => "git",
+ 'url' => "https://git.ilt.su"
+ ],
+ [
+ 'title' => "server status",
+ 'url' => "https://status.ilt.su"
+ ],
+ [
+ 'title' => 'mail me!',
+ 'url' => 'mailto:iltsu@alright.party',
+ 'icon' => 'mail',
+ 'external' => true
+ ],
+ [
+ 'title' => 'XMPP me!',
+ 'url' => 'xmpp:iltsu@alright.party',
+ 'icon' => 'xmpp',
+ 'external' => true
+ ],
+ ];
+
+ echo '' ?>
+ <header>
+ <div class="brand rain">
+ <p><img src="/static/img/pepe.png" alt="FeelsBadMan ☔ " width="18" height="18"> I'm just a memer</p>
+ </div>
+ <div class="links">
+ <div class="crosspage-links">
+ <?php foreach (array_filter($links, fn($x) => !isset($x['external'])) as $l): ?>
+ <a href="<?= $l['url'] ?>">
+ <?php if (isset($l['icon'])): ?>
+ <img src="/static/img/icons/<?= $l['icon'] ?>.png" alt="">
+ <?php endif; ?>
+ <?= $l['title'] ?>
+ </a>
+ <?php endforeach; ?>
+ </div>
+ <div class="external-links">
+ <?php foreach (array_filter($links, fn($x) => isset($x['external'], $x['icon'])) as $l): ?>
+ <a href="<?= $l['url'] ?>"><img src="/static/img/icons/<?= $l['icon'] ?>.png" alt="<?= $l['title'] ?>"
+ title="<?= $l['title'] ?>"></a>
+ <?php endforeach; ?>
+ </div>
+ </div>
+ </header>
+ <?php ;
+} \ No newline at end of file