feat(ui): finalize E-TIB modernization with footer redesign, video optimization, and TS fixes
Former-commit-id: 67ac02c8404cc66893fdf97308574701cca6000c
This commit is contained in:
@@ -17,7 +17,12 @@ export interface Reference {
|
||||
}
|
||||
|
||||
interface ReferencesSliderProps {
|
||||
references: Reference[];
|
||||
references?: Reference[];
|
||||
badge?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
ctaLabel?: string;
|
||||
ctaHref?: string;
|
||||
data?: {
|
||||
badge?: string;
|
||||
title?: string;
|
||||
@@ -27,14 +32,16 @@ interface ReferencesSliderProps {
|
||||
}
|
||||
}
|
||||
|
||||
export function ReferencesSlider({ references, data }: ReferencesSliderProps) {
|
||||
export function ReferencesSlider(props: ReferencesSliderProps) {
|
||||
const { data } = props;
|
||||
const references = props.references || [];
|
||||
const containerRef = React.useRef<HTMLDivElement>(null);
|
||||
|
||||
const badge = data?.badge || 'Ausgewählte Projekte';
|
||||
const title = data?.title || 'Referenzen & Erfolge';
|
||||
const description = data?.description || 'Ein Auszug unserer erfolgreich abgeschlossenen Projekte im Bereich Kabeltiefbau, Bohrtechnik und Netzinfrastruktur.';
|
||||
const ctaLabel = data?.ctaLabel || 'Alle Referenzen ansehen';
|
||||
const ctaHref = data?.ctaHref || '/referenzen';
|
||||
const badge = props.badge || data?.badge || 'Ausgewählte Projekte';
|
||||
const title = props.title || data?.title || 'Referenzen & Erfolge';
|
||||
const description = props.description || data?.description || 'Ein Auszug unserer erfolgreich abgeschlossenen Projekte im Bereich Kabeltiefbau, Bohrtechnik und Netzinfrastruktur.';
|
||||
const ctaLabel = props.ctaLabel || data?.ctaLabel || 'Alle Referenzen ansehen';
|
||||
const ctaHref = props.ctaHref || data?.ctaHref || '/referenzen';
|
||||
|
||||
if (!references || references.length === 0) return null;
|
||||
|
||||
@@ -63,7 +70,7 @@ export function ReferencesSlider({ references, data }: ReferencesSliderProps) {
|
||||
<div className="relative z-10">
|
||||
<div
|
||||
ref={containerRef}
|
||||
className="flex gap-6 overflow-x-auto pb-12 pt-4 snap-x snap-mandatory hide-scrollbar px-[calc((100vw-min(100%,1280px))/2)]"
|
||||
className="flex gap-6 overflow-x-auto pb-12 pt-4 snap-x snap-mandatory px-[calc((100vw-min(100%,1280px))/2)] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
|
||||
>
|
||||
{references.map((ref, i) => {
|
||||
const imgSrc = (ref.image && typeof ref.image === 'object' && ref.image.url)
|
||||
@@ -79,7 +86,7 @@ export function ReferencesSlider({ references, data }: ReferencesSliderProps) {
|
||||
transition={{ delay: i * 0.1, duration: 0.6, ease: "easeOut" }}
|
||||
className="flex-shrink-0 w-[320px] md:w-[480px] snap-center group cursor-pointer"
|
||||
>
|
||||
<div className="relative aspect-[16/10] bg-neutral-800 rounded-3xl overflow-hidden mb-5 border border-white/5 shadow-2xl">
|
||||
<div className="relative aspect-[16/10] bg-neutral-800 rounded-2xl overflow-hidden mb-5 border border-white/5 shadow-2xl">
|
||||
<Image
|
||||
src={imgSrc}
|
||||
alt={ref.title}
|
||||
|
||||
Reference in New Issue
Block a user