diff options
author | Jonas Kohl | 2024-07-25 14:53:57 +0200 |
---|---|---|
committer | Jonas Kohl | 2024-07-25 14:53:57 +0200 |
commit | 847d1f3355d323782ca00456b64c319da4c292c1 (patch) | |
tree | 00110b1adffeb3375682ee8a96dd78f845090c2b | |
parent | 44e2ba31b80ead160197462d9a4c3e8527836eed (diff) |
Add links to buttons
-rw-r--r-- | src/includes/buttons.php | 28 | ||||
-rw-r--r-- | src/static/style.css | 4 |
2 files changed, 27 insertions, 5 deletions
diff --git a/src/includes/buttons.php b/src/includes/buttons.php index b47b925..9b1b26b 100644 --- a/src/includes/buttons.php +++ b/src/includes/buttons.php @@ -1,18 +1,36 @@ <?php foreach ([ - "pronouns" => "they/them, she/her, he/him", + "pronouns" => [ + "they/them, she/her, he/him", + "https://en.pronouns.page/@dvlinablackdress" + ], "bestview" => "Best viewed with Netscape or Internet Explorer", - "neocities-now" => "Neocities, now!", + "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): ?> -<img src="/static/buttons/<?= htmlentities($src) ?>.gif" +<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 + class="web-button" /><?php +if ($hasLink): +?></a><?php + endif; endforeach; ?> diff --git a/src/static/style.css b/src/static/style.css index 9d6c3d5..bfa6465 100644 --- a/src/static/style.css +++ b/src/static/style.css @@ -87,10 +87,14 @@ a { border: none; vertical-align: bottom; } +.web-button-link { + text-decoration: none; +} .web-button { width: 88px; height: 31px; vertical-align: middle; + border: none; } .center { text-align: center; |