Compare commits

...

2 Commits

3 changed files with 20 additions and 4 deletions

11
.gitignore vendored Normal file
View File

@ -0,0 +1,11 @@
# IDE
.idea/
# OS
.DS_Store
Thumbs.db
# Icons explizit einschließen (nicht ignorieren)
!icons/
!icons/*

4
icons/homeassistant.svg Normal file
View File

@ -0,0 +1,4 @@
<svg width="240" height="240" viewBox="0 0 240 240" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M240 224.762C240 233.012 233.25 239.762 225 239.762H15C6.75 239.762 0 233.012 0 224.762V134.762C0 126.512 4.77 114.993 10.61 109.153L109.39 10.3725C115.22 4.5425 124.77 4.5425 130.6 10.3725L229.39 109.162C235.22 114.992 240 126.522 240 134.772V224.772V224.762Z" fill="#F2F4F9"/>
<path d="M229.39 109.153L130.61 10.3725C124.78 4.5425 115.23 4.5425 109.4 10.3725L10.61 109.153C4.78 114.983 0 126.512 0 134.762V224.762C0 233.012 6.75 239.762 15 239.762H107.27L66.64 199.132C64.55 199.852 62.32 200.262 60 200.262C48.7 200.262 39.5 191.062 39.5 179.762C39.5 168.462 48.7 159.262 60 159.262C71.3 159.262 80.5 168.462 80.5 179.762C80.5 182.092 80.09 184.322 79.37 186.412L111 218.042V102.162C104.2 98.8225 99.5 91.8425 99.5 83.7725C99.5 72.4725 108.7 63.2725 120 63.2725C131.3 63.2725 140.5 72.4725 140.5 83.7725C140.5 91.8425 135.8 98.8225 129 102.162V183.432L160.46 151.972C159.84 150.012 159.5 147.932 159.5 145.772C159.5 134.472 168.7 125.272 180 125.272C191.3 125.272 200.5 134.472 200.5 145.772C200.5 157.072 191.3 166.272 180 166.272C177.5 166.272 175.12 165.802 172.91 164.982L129 208.892V239.772H225C233.25 239.772 240 233.022 240 224.772V134.772C240 126.522 235.23 115.002 229.39 109.162V109.153Z" fill="#18BCF2"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -60,9 +60,10 @@ $projects = [
* Verhindert Broken Images.
*/
function logoExists(string $webPath): bool {
// Absoluten Dateisystempfad relativ zur index.php auflösen
$filePath = __DIR__ . '/' . ltrim($webPath, '/');
return is_file($filePath);
$base = rtrim($_SERVER['DOCUMENT_ROOT'] ?? '/var/www/fabianschieder.com', '/');
$full = $base . '/' . ltrim($webPath, '/');
// Debug: echo "<!-- checking: $full -->\n";
return is_file($full);
}
?>
@ -114,7 +115,7 @@ function logoExists(string $webPath): bool {
>
<div class="card-icon">
<?php if (!empty($project['logo']) && logoExists($project['logo'])): ?>
<?php if (!empty($project['logo'])): ?>
<img
src="<?= htmlspecialchars($project['logo'], ENT_QUOTES) ?>"
alt="<?= htmlspecialchars($project['title'], ENT_QUOTES) ?> Logo"