1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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 ;
}
|