summaryrefslogtreecommitdiff
path: root/src/includes/buttons.php
blob: 9b1b26bd28b57a2b81b41fee2cd8c9b4bd5ebbc7 (plain)
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
<?php
foreach ([
    "pronouns" => [
        "they/them, she/her, he/him",
        "https://en.pronouns.page/@dvlinablackdress"
    ],
    "bestview" => "Best viewed with Netscape or Internet Explorer",
    "neocities-now" => [
        "Neocities, now!",
        "https://neocities.org/",
    ],
    "macmade-wht" => "Made on a Mac",
    "pride" => "Pride, now!",
    "desktop" => "Best viewed on Desktop",
] as $src => $alt):
    $hasLink = false;
    if (is_array($alt)) {
        $arr = $alt;
        [$alt, $href] = $arr;
        $hasLink = true;
    }

    if ($hasLink):
?>
<a href="<?= htmlentities($href) ?>" class="web-button-link"><?php
endif;
?><img src="/static/buttons/<?= htmlentities($src) ?>.gif"
     alt="<?= htmlentities($alt) ?>"
     width="88"
     height="31"
     class="web-button" /><?php
if ($hasLink):
?></a><?php
    endif;
endforeach;
?>