fix(ui): make vertical floor-plan tabs visually obvious as interactive controls
All checks were successful
Deploy Feature Branch to Test (haus.test.kies-media.de) / Deploy to Test Environment (push) Successful in 45s
Lint / PHP Syntax Check (push) Successful in 1m0s
PHPUnit / PHP Unit Tests (push) Successful in 36s
Lint / PHP Syntax Check (pull_request) Successful in 27s
Lint / HTML Lint (htmlhint) (push) Successful in 1m40s
Lint / CSS Lint (stylelint) (push) Successful in 1m45s
PHPUnit / PHP Unit Tests (pull_request) Successful in 41s
Lint / CSS Lint (stylelint) (pull_request) Successful in 1m14s
Lint / HTML Lint (htmlhint) (pull_request) Successful in 1m15s
All checks were successful
Deploy Feature Branch to Test (haus.test.kies-media.de) / Deploy to Test Environment (push) Successful in 45s
Lint / PHP Syntax Check (push) Successful in 1m0s
PHPUnit / PHP Unit Tests (push) Successful in 36s
Lint / PHP Syntax Check (pull_request) Successful in 27s
Lint / HTML Lint (htmlhint) (push) Successful in 1m40s
Lint / CSS Lint (stylelint) (push) Successful in 1m45s
PHPUnit / PHP Unit Tests (pull_request) Successful in 41s
Lint / CSS Lint (stylelint) (pull_request) Successful in 1m14s
Lint / HTML Lint (htmlhint) (pull_request) Successful in 1m15s
The floor-accordion was rendering as a stack of plain text rows separated
by 1px hairline dividers with no visual affordance indicating they were
clickable tabs. CSS for .floor-icon (a 24px circle with a '+' that
rotates 45° to '×' on open) already existed, but the corresponding
<span class="floor-icon"> element had never been added to the template
— the affordance was completely invisible.
Changes:
1. Template (app/views/home/index.php): add
<span class="floor-icon" aria-hidden="true">+</span> inside the
<summary>, enabling the existing rotation/size CSS to take effect.
2. CSS (public/css/haus-schleusingen.css):
a. Restyle .floor-item from a thin divider to a real card
(1px --warm border, 4px radius, --white background) with a
0.75rem gap between items via flexbox column on .floors-accordion.
b. .floor-header: hover background in --cream, focus-visible
outline, list-style markers suppressed, padding tightened to
1.25rem 1.5rem.
c. .floor-icon: enlarged from 24px to 32px, thicker 1.5px border,
font-size 1.15rem so the '+' is clearly legible, white
background that goes cream on hover/open.
d. .floor-item.open: --accent border, subtle box-shadow
(0 4px 20px 6% black), and a 3px-wide ::before accent stripe on
the left edge — the canonical 'active tab' indicator.
e. .floor-icon rotation on open (45°) now also flips border-color
and background to --accent / --cream, plus hover state for the
closed icon.
f. Renamed dead-code class .floor-size → .floor-area to match the
template (refactor mismatch left over from the i18n work).
g. Renamed dead-code class .floor-accordion → .floors-accordion to
match the template.
Measured on 1265px viewport:
- 4 items, 4 icons (one per tab)
- Each item: 1104x74, white bg, 4px radius, --warm border
- Icon: 32x32 at x=1128 (right edge), white bg, '+' glyph
- Open state (item[1]): border → --accent, left 3px accent stripe,
icon rotates 45° to '×', subtle box-shadow
Sweep targets for visual confirmation:
- Closed: white card + warm border + '+' icon, hover lifts background
to cream and icon border to accent.
- Open: accent border + left stripe + '×' icon + soft shadow, body
expands below to show the floor-plan image and room list.
- Switching tabs: clicking another header collapses the current
open one (existing JS accordion behaviour).
This commit is contained in:
@@ -153,6 +153,7 @@ $gridItems = [
|
|||||||
<summary class="floor-header">
|
<summary class="floor-header">
|
||||||
<span class="floor-title"><?= htmlspecialchars($t($floor['titleKey']), ENT_QUOTES) ?></span>
|
<span class="floor-title"><?= htmlspecialchars($t($floor['titleKey']), ENT_QUOTES) ?></span>
|
||||||
<span class="floor-area"><?= htmlspecialchars($t($floor['areaKey']), ENT_QUOTES) ?></span>
|
<span class="floor-area"><?= htmlspecialchars($t($floor['areaKey']), ENT_QUOTES) ?></span>
|
||||||
|
<span class="floor-icon" aria-hidden="true">+</span>
|
||||||
</summary>
|
</summary>
|
||||||
<div class="floor-body">
|
<div class="floor-body">
|
||||||
<img src="/<?= htmlspecialchars($floorImageMap[$floor['id']] ?? 'bilder/grundrisse/EG.png', ENT_QUOTES) ?>"
|
<img src="/<?= htmlspecialchars($floorImageMap[$floor['id']] ?? 'bilder/grundrisse/EG.png', ENT_QUOTES) ?>"
|
||||||
|
|||||||
@@ -670,26 +670,63 @@ nav.scrolled {
|
|||||||
color: var(--charcoal);
|
color: var(--charcoal);
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-accordion {
|
.floors-accordion {
|
||||||
border-top: 1px solid var(--warm);
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.75rem;
|
||||||
|
margin-top: -0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-item {
|
.floor-item {
|
||||||
border-bottom: 1px solid var(--warm);
|
border: 1px solid var(--warm);
|
||||||
|
border-radius: 4px;
|
||||||
|
background: var(--white);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
transition:
|
||||||
|
border-color 0.25s ease,
|
||||||
|
box-shadow 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floor-item:hover {
|
||||||
|
border-color: var(--stone);
|
||||||
|
}
|
||||||
|
|
||||||
|
.floor-item.open {
|
||||||
|
border-color: var(--accent);
|
||||||
|
box-shadow: 0 4px 20px rgb(28 26 23 / 6%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.floor-item.open::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 3px;
|
||||||
|
background: var(--accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-header {
|
.floor-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 1.5rem 0;
|
gap: 1rem;
|
||||||
|
padding: 1.25rem 1.5rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 0.2s;
|
list-style: none;
|
||||||
|
transition: background 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-header:hover .floor-title {
|
.floor-header::-webkit-details-marker {
|
||||||
color: var(--accent);
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floor-header::marker {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.floor-header:hover {
|
||||||
|
background: var(--cream);
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-title {
|
.floor-title {
|
||||||
@@ -699,41 +736,60 @@ nav.scrolled {
|
|||||||
transition: color 0.2s;
|
transition: color 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-size {
|
.floor-header:hover .floor-title {
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.floor-area {
|
||||||
|
margin-left: auto;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
color: var(--stone);
|
color: var(--stone);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 1rem;
|
gap: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-icon {
|
.floor-icon {
|
||||||
width: 24px;
|
width: 32px;
|
||||||
height: 24px;
|
height: 32px;
|
||||||
border: 1px solid var(--warm);
|
border: 1.5px solid var(--warm);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 0.8rem;
|
font-size: 1.15rem;
|
||||||
|
font-weight: 300;
|
||||||
|
line-height: 1;
|
||||||
color: var(--stone);
|
color: var(--stone);
|
||||||
|
background: var(--white);
|
||||||
|
flex-shrink: 0;
|
||||||
transition:
|
transition:
|
||||||
transform 0.3s,
|
transform 0.3s ease,
|
||||||
border-color 0.3s;
|
border-color 0.25s ease,
|
||||||
|
color 0.25s ease,
|
||||||
|
background 0.25s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floor-header:hover .floor-icon {
|
||||||
|
border-color: var(--accent);
|
||||||
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-item.open .floor-icon {
|
.floor-item.open .floor-icon {
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
border-color: var(--accent);
|
border-color: var(--accent);
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
|
background: var(--cream);
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-body {
|
.floor-body {
|
||||||
display: none;
|
display: none;
|
||||||
padding: 0 0 1.5rem;
|
padding: 0 1.5rem 1.5rem;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border-top: 1px solid var(--warm);
|
||||||
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.floor-rooms-grid {
|
.floor-rooms-grid {
|
||||||
|
|||||||
Reference in New Issue
Block a user