experiment with php

This commit is contained in:
2026-03-08 06:14:02 -04:00
parent 7bbcfe92ac
commit 9a879b8815
6 changed files with 94 additions and 116 deletions

1
php/footer.php Normal file
View File

@@ -0,0 +1 @@
<p>Footer text</p>

24
php/functions.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
function buildContact($title, $color, $username, $url) {
if (!$url) {
echo "<div class=contact style=\"background-color: $color; opacity: 0.9;\">";
} else {
echo "<div class=contact style=\"background-color: $color;\">";
}
echo "<h3>$title</h3>";
if (strlen($username) > 10) {
echo "<p style=\"font-size: 0.8em;\">$username</p>";
} else {
echo "<p>$username</p>";
}
if ($url) {
echo "<a title=\"$title\" href=\"$url\"></a>";
}
echo "</div>";
}
?>

5
php/generic.php Normal file
View File

@@ -0,0 +1,5 @@
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
<meta content="#ff44bb" name="theme-color">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php include 'functions.php';?>

4
php/header.php Normal file
View File

@@ -0,0 +1,4 @@
<div class="header-container">
<img src="profile.png" alt="Cesium's Profile Picture" class="profile-pic">
<h1>Cesium</h1>
</div>