Website-fabianschieder/index.php

138 lines
4.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
/*
* Absolute Webpfade verwenden!
* Ordnerstruktur im Webroot:
* /icons/...
* /style.css
*/
$projects = [
"privat" => [
[
"title" => "Gitea",
"description" => "Mein privater Git - Server",
"url" => "/git",
"logo" => "/icons/gitea.svg",
"color" => "#609926"
],
[
"title" => "Nextcloud",
"description" => "Meine persönliche Nextcloud",
"url" => "/nextcloud",
"logo" => "/icons/nextcloud.svg",
"color" => "#0082c9"
],
],
"schule" => [
[
"title" => "Geizkragen.store",
"description" => "Schulprojekt Ein Online - Preisvergleichsportal",
"url" => "https://geizkragen.store",
"logo" => "/icons/geizkragen.png",
"color" => "#0082c9",
"external" => true
],
],
"dienste" => [
[
"title" => "Home Assistant",
"description" => "Mein privater HomeAssistant Server",
"url" => "http://homeassistant.fabianschieder.com",
"logo" => "/icons/homeassistant.svg",
"color" => "#18BCF2",
"external" => true
],
[
"title" => "NAS",
"description" => "Mein privater Netzwerkspeicher",
"url" => "http://nas.fabianschieder.com",
"logo" => "/icons/nas.svg",
"color" => "#a855f7",
"external" => true
],
],
];
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fabian Schieder</title>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="background-blur"></div>
<header>
<div class="avatar">FS</div>
<h1>Fabian Schieder</h1>
<p class="tagline">Entwickler · Schüler · Macher</p>
</header>
<main>
<?php foreach ($projects as $category => $items): ?>
<section>
<h2 class="category-title">
<?php
switch ($category) {
case "privat":
echo '🔒 Privat';
break;
case "schule":
echo '🎓 Schule';
break;
case "dienste":
echo '🔗 Verlinkungen';
break;
}
?>
</h2>
<div class="cards">
<?php foreach ($items as $project): ?>
<a
href="<?= htmlspecialchars($project['url'], ENT_QUOTES) ?>"
class="card"
<?= !empty($project['external']) ? 'target="_blank" rel="noopener noreferrer"' : '' ?>
style="--accent: <?= htmlspecialchars($project['color'], ENT_QUOTES) ?>;"
>
<div class="card-icon">
<?php if (!empty($project['logo'])): ?>
<img
src="<?= htmlspecialchars($project['logo'], ENT_QUOTES) ?>"
alt="<?= htmlspecialchars($project['title'], ENT_QUOTES) ?> Logo"
class="card-logo"
loading="lazy"
decoding="async"
>
<?php else: ?>
<span aria-hidden="true">📁</span>
<?php endif; ?>
</div>
<div class="card-body">
<h3><?= htmlspecialchars($project['title'], ENT_QUOTES) ?></h3>
<p><?= htmlspecialchars($project['description'], ENT_QUOTES) ?></p>
</div>
<div class="card-arrow" aria-hidden="true">→</div>
</a>
<?php endforeach; ?>
</div>
</section>
<?php endforeach; ?>
</main>
<footer>
<p>&copy; <?= date('Y') ?> Fabian Schieder — Alle Rechte vorbehalten.</p>
</footer>
</body>
</html>