fix(issue-80): show all 13 house images + 3D floor plans
All checks were successful
Lint / PHP Syntax Check (push) Successful in 57s
PHPUnit / PHP Unit Tests (push) Successful in 1m7s
Lint / HTML Lint (htmlhint) (push) Successful in 1m38s
Lint / CSS Lint (stylelint) (push) Successful in 1m42s
Lint / PHP Syntax Check (pull_request) Successful in 58s
PHPUnit / PHP Unit Tests (pull_request) Successful in 1m3s
Lint / HTML Lint (htmlhint) (pull_request) Successful in 1m36s
Lint / CSS Lint (stylelint) (pull_request) Successful in 1m41s

This commit is contained in:
Hermes
2026-06-05 22:28:04 +00:00
parent 5781b5b5f0
commit db83e09a3a
6 changed files with 250 additions and 4 deletions

View File

@@ -23,9 +23,13 @@ $gridItems = [
['img' => 'bilder/Küche 1.jpg', 'key' => 'gallery.kitchen', 'alt' => 'gallery.alt.kitchen', 'class' => ''],
['img' => 'bilder/schlafzimmer.png', 'key' => 'gallery.bedroom', 'alt' => 'gallery.alt.bedroom', 'class' => ''],
['img' => 'bilder/Bad.jpg', 'key' => 'gallery.bath', 'alt' => 'gallery.alt.bath', 'class' => ''],
['img' => 'bilder/Bad-2.jpeg', 'key' => 'gallery.bath2', 'alt' => 'gallery.alt.bath2', 'class' => ''],
['img' => 'bilder/Bad-3.jpeg', 'key' => 'gallery.bath3', 'alt' => 'gallery.alt.bath3', 'class' => ''],
['img' => 'bilder/Bad-4.jpeg', 'key' => 'gallery.bath4', 'alt' => 'gallery.alt.bath4', 'class' => ''],
['img' => 'bilder/Kinderzimmer 2.jpg', 'key' => 'gallery.kid1', 'alt' => 'gallery.alt.kid1', 'class' => ''],
['img' => 'bilder/Kinderzimmer 3.jpg', 'key' => 'gallery.kid2', 'alt' => 'gallery.alt.kid2', 'class' => ''],
['img' => 'bilder/kinderzimmer 2 2.webp', 'key' => 'gallery.kid_detail', 'alt' => 'gallery.alt.kid_detail', 'class' => 'span-2 row-1'],
['img' => 'bilder/Kinderzimmer.png', 'key' => 'gallery.kid_extra', 'alt' => 'gallery.alt.kid_extra', 'class' => ''],
['img' => 'bilder/Außenansicht-2.png', 'key' => 'gallery.area3', 'alt' => 'gallery.alt.exterior', 'class' => 'span-2 row-1'],
];
?>
@@ -112,6 +116,13 @@ $gridItems = [
'attic' => 'bilder/grundrisse/Dachboden unten.png',
];
$floorImageMapExtra = [
'eg' => ['img' => 'bilder/grundrisse/EG 3D.png', 'altKey' => 'floors.alt.eg_3d'],
'og1' => ['img' => 'bilder/grundrisse/OG 1 3D.png', 'altKey' => 'floors.alt.og1_3d'],
'og2' => ['img' => 'bilder/grundrisse/OG 2 3D.png', 'altKey' => 'floors.alt.og2_3d'],
'attic' => ['img' => 'bilder/grundrisse/Dachboden unten 2.png', 'altKey' => 'floors.alt.attic_2'],
];
$floors = [
['id' => 'eg', 'titleKey' => 'floors.eg.title', 'areaKey' => 'floors.eg.area', 'altKey' => 'floors.alt.eg',
'rooms' => [
@@ -155,10 +166,27 @@ $gridItems = [
<span class="floor-area"><?= htmlspecialchars($t($floor['areaKey']), ENT_QUOTES) ?></span>
</summary>
<div class="floor-body">
<img src="/<?= htmlspecialchars($floorImageMap[$floor['id']] ?? 'bilder/grundrisse/EG.png', ENT_QUOTES) ?>"
alt="<?= htmlspecialchars($t($floor['altKey']), ENT_QUOTES) ?>"
loading="lazy" decoding="async"
class="floor-plan-img">
<?php
$primaryImg = $floorImageMap[$floor['id']] ?? 'bilder/grundrisse/EG.png';
$extra = $floorImageMapExtra[$floor['id']] ?? null;
$imgWrapperClass = $extra ? 'floor-plan-multi' : '';
?>
<?php if ($imgWrapperClass !== ''): ?>
<div class="<?= htmlspecialchars($imgWrapperClass, ENT_QUOTES) ?>">
<?php endif; ?>
<img src="/<?= htmlspecialchars($primaryImg, ENT_QUOTES) ?>"
alt="<?= htmlspecialchars($t($floor['altKey']), ENT_QUOTES) ?>"
loading="lazy" decoding="async"
class="floor-plan-img">
<?php if ($extra !== null): ?>
<img src="/<?= htmlspecialchars($extra['img'], ENT_QUOTES) ?>"
alt="<?= htmlspecialchars($t($extra['altKey']), ENT_QUOTES) ?>"
loading="lazy" decoding="async"
class="floor-plan-img">
<?php endif; ?>
<?php if ($imgWrapperClass !== ''): ?>
</div>
<?php endif; ?>
<ul class="room-list">
<?php foreach ($floor['rooms'] as $room): ?>
<li>