From 576b708a32cef810926529d7668b01f8c51e2306 Mon Sep 17 00:00:00 2001 From: Kira Date: Mon, 11 May 2026 02:06:36 -0400 Subject: [PATCH] add links section --- index.php | 42 +++++++++++++++++++++++++----------------- php/functions.php | 24 +++++++++++++----------- styles.css | 19 ++++++++++++------- 3 files changed, 50 insertions(+), 35 deletions(-) diff --git a/index.php b/index.php index 09137f3..d715108 100644 --- a/index.php +++ b/index.php @@ -14,14 +14,14 @@
@@ -29,15 +29,23 @@

Names for game accounts I play

+
+ +

Links

+

other links like apps

+
diff --git a/php/functions.php b/php/functions.php index b9661d8..d8a091d 100644 --- a/php/functions.php +++ b/php/functions.php @@ -1,20 +1,22 @@ "; - } else { - echo "
"; - } + function buildLink($type, $title, $color, $text, $url) { + $opacity = $url ? "" : "0.9"; + + echo "
"; echo "

$title

"; - if (strlen($username) > 15) { - echo "

$username

"; - } else { - echo "

$username

"; + switch ($type) { + case "link": + $fontsize = "0.9em"; + break; + case "contact": + $fontsize = (strlen($text) > 15) ? "0.8em" : "1em"; + break; } + echo "

$text

"; + if ($url) { echo ""; } diff --git a/styles.css b/styles.css index a70f9d3..67c60dc 100644 --- a/styles.css +++ b/styles.css @@ -34,7 +34,7 @@ a { box-sizing: border-box; } -.contacts { +.contacts, .links { display: flex; flex-wrap: wrap; justify-content: center; @@ -42,8 +42,7 @@ a { margin: auto; padding: 10px; } -.contact { - width: 170px; +.contact, .link { margin: 5px; padding: 15px; background-color: #232629; @@ -53,10 +52,16 @@ a { position: relative; transition: opacity .25s; } +.contact { + width: 170px; +} +.link { + width: 340px; +} /* some hacky shit to make