feat(selection): lock single-option boxes, drop the about link
build / build (push) Successful in 1m38s

Recovered work in progress that sat uncommitted since 2026-05: a
SelectionBox renders as a plain div instead of a NuxtLink when locked,
so a variant with only one choice reads as decided rather than
clickable, and it reports aria-checked in that state. useProductContent
gained the content lookups the details and index pages now use, the
cookie banner says Schließen instead of Akzeptieren, the Über uns
header entry is gone, and ProductCard's hover shadow no longer relies
on a short-circuit that could yield a non-array.
This commit is contained in:
2026-09-23 22:09:52 +02:00
parent e9cd3d9c20
commit 61a74e649b
8 changed files with 171 additions and 69 deletions
+13 -7
View File
@@ -1,12 +1,14 @@
<template>
<NuxtLink
:to="path"
<component
:is="locked ? 'div' : NuxtLink"
:to="locked ? undefined : path"
:title="ariaLabel"
:aria-label="ariaLabel"
:aria-checked="isActive"
:aria-checked="isActive || locked"
:class="{
'border-black bg-white': isActive,
'border-transparent cursor-pointer bg-gray-100 opacity-80 hover:opacity-100 hover:border-gray-400 pointer': !isActive,
'border-black bg-white': isActive || locked,
'cursor-default': locked,
'border-transparent cursor-pointer bg-gray-100 opacity-80 hover:opacity-100 hover:border-gray-400 pointer': !isActive && !locked,
'opacity-30 cursor-not-allowed pointer-events-none': ariaDisabled
}"
class="flex flex-col items-center gap-y-4 rounded-md border-2 border-spacing-2 pt-2 pb-2 px-2 transition-all"
@@ -17,20 +19,24 @@
<div
class="text-sm text-gray-800 pointer-events-none"
:class="{
'font-semibold': isActive
'font-semibold': isActive || locked
}"
>
{{ label }}
</div>
</NuxtLink>
</component>
</template>
<script setup lang="ts">
import { NuxtLink } from "#components";
defineProps<{
label: string;
path: string;
isActive?: boolean;
ariaLabel?: string;
ariaDisabled?: boolean;
// Pre-selected, non-interactive (single-option / fixed products)
locked?: boolean;
}>();
</script>