clone init

This commit is contained in:
2026-01-16 21:47:58 +01:00
parent ffbb240a23
commit ce1a73f2bc
160 changed files with 64257 additions and 9 deletions

60
components/Footer.tsx Normal file
View File

@@ -0,0 +1,60 @@
import Link from 'next/link';
import { useTranslations } from 'next-intl';
export default function Footer() {
const t = useTranslations('Footer');
const currentYear = new Date().getFullYear();
return (
<footer className="bg-neutral text-text-secondary py-12 border-t border-neutral-dark">
<div className="container mx-auto px-4">
<div className="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8">
<div>
<h4 className="text-lg font-bold text-text-primary mb-4">KLZ Cables</h4>
<p className="mb-4">
Raiffeisenstraße 22<br />
73630 Remshalden<br />
Germany
</p>
<p>
<a href="tel:+4988192537298" className="hover:text-primary">+49 881 92537298</a><br />
<a href="mailto:info@klz-vertriebs-gmbh.com" className="hover:text-primary">info@klz-vertriebs-gmbh.com</a>
</p>
</div>
<div>
<h4 className="text-lg font-bold text-text-primary mb-4">{t('legal')}</h4>
<ul className="space-y-2">
<li><Link href="/legal-notice" className="hover:text-primary">{t('legalNotice')}</Link></li>
<li><Link href="/privacy-policy" className="hover:text-primary">{t('privacyPolicy')}</Link></li>
<li><Link href="/terms" className="hover:text-primary">{t('terms')}</Link></li>
</ul>
</div>
<div>
<h4 className="text-lg font-bold text-text-primary mb-4">{t('products')}</h4>
<ul className="space-y-2">
<li><Link href="/products/low-voltage" className="hover:text-primary">{t('lowVoltage')}</Link></li>
<li><Link href="/products/medium-voltage" className="hover:text-primary">{t('mediumVoltage')}</Link></li>
<li><Link href="/products/high-voltage" className="hover:text-primary">{t('highVoltage')}</Link></li>
<li><Link href="/products/solar" className="hover:text-primary">{t('solar')}</Link></li>
</ul>
</div>
<div>
<h4 className="text-lg font-bold text-text-primary mb-4">{t('followUs')}</h4>
<div className="flex space-x-4">
{/* Social Icons */}
<a href="#" className="hover:text-primary">LinkedIn</a>
<a href="#" className="hover:text-primary">Instagram</a>
</div>
</div>
</div>
<div className="border-t border-neutral-dark pt-8 text-center text-sm">
<p>&copy; {currentYear} KLZ Cables. All rights reserved.</p>
</div>
</div>
</footer>
);
}

54
components/Header.tsx Normal file
View File

@@ -0,0 +1,54 @@
import Link from 'next/link';
import Image from 'next/image';
import { useTranslations, useLocale } from 'next-intl';
export default function Header() {
const t = useTranslations('Navigation');
const locale = useLocale();
const menuItems = [
{ label: t('home'), href: '/' },
{ label: t('team'), href: '/team' },
{ label: t('products'), href: '/products' }, // This might need a dropdown
{ label: t('blog'), href: '/blog' },
{ label: t('contact'), href: '/contact' },
];
return (
<header className="bg-white shadow-sm sticky top-0 z-50">
<div className="container mx-auto px-4 h-20 flex items-center justify-between">
<Link href="/" className="flex-shrink-0">
{/* Use local logo if available, or text for now */}
<span className="text-2xl font-bold text-primary">KLZ Cables</span>
</Link>
<nav className="hidden md:flex items-center space-x-8">
{menuItems.map((item) => (
<Link
key={item.href}
href={`/${locale}${item.href}`}
className="text-text-primary hover:text-primary font-medium transition-colors"
>
{item.label}
</Link>
))}
</nav>
<div className="flex items-center space-x-4">
<div className="flex items-center space-x-2 text-sm font-medium">
<Link href="/en" className={`hover:text-primary ${locale === 'en' ? 'text-primary' : 'text-text-secondary'}`}>EN</Link>
<span className="text-text-light">|</span>
<Link href="/de" className={`hover:text-primary ${locale === 'de' ? 'text-primary' : 'text-text-secondary'}`}>DE</Link>
</div>
{/* Mobile Menu Button (Placeholder) */}
<button className="md:hidden p-2 text-text-primary">
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</div>
</div>
</header>
);
}

View File

@@ -0,0 +1,97 @@
import React from 'react';
interface KeyValueItem {
label: string;
value: string;
unit?: string;
}
interface VoltageTable {
voltageLabel: string;
metaItems: KeyValueItem[];
columns: Array<{ key: string; label: string }>;
rows: Array<{ configuration: string; cells: string[] }>;
}
interface ProductTechnicalDataProps {
data: {
technicalItems: KeyValueItem[];
voltageTables: VoltageTable[];
};
}
export default function ProductTechnicalData({ data }: ProductTechnicalDataProps) {
const { technicalItems, voltageTables } = data;
return (
<div className="space-y-8">
{technicalItems.length > 0 && (
<div className="bg-neutral-light p-6 rounded-lg shadow-sm">
<h3 className="text-xl font-semibold mb-4">General Data</h3>
<dl className="grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-4">
{technicalItems.map((item, idx) => (
<div key={idx} className="flex flex-col border-b border-neutral-dark pb-2 last:border-0">
<dt className="text-sm text-text-secondary">{item.label}</dt>
<dd className="text-base font-medium text-text-primary">
{item.value} {item.unit && <span className="text-sm text-text-secondary ml-1">{item.unit}</span>}
</dd>
</div>
))}
</dl>
</div>
)}
{voltageTables.map((table, idx) => (
<div key={idx} className="bg-neutral-light p-6 rounded-lg shadow-sm overflow-hidden">
<h3 className="text-xl font-semibold mb-4">
{table.voltageLabel !== 'Voltage unknown' && table.voltageLabel !== 'Spannung unbekannt'
? table.voltageLabel
: 'Technical Specifications'}
</h3>
{table.metaItems.length > 0 && (
<dl className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 mb-6 bg-neutral p-4 rounded">
{table.metaItems.map((item, mIdx) => (
<div key={mIdx}>
<dt className="text-xs text-text-secondary uppercase tracking-wider">{item.label}</dt>
<dd className="font-medium">{item.value} {item.unit}</dd>
</div>
))}
</dl>
)}
<div className="overflow-x-auto">
<table className="min-w-full divide-y divide-neutral-dark">
<thead className="bg-neutral">
<tr>
<th scope="col" className="px-3 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider sticky left-0 bg-neutral z-10">
Configuration
</th>
{table.columns.map((col, cIdx) => (
<th key={cIdx} scope="col" className="px-3 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider whitespace-nowrap">
{col.label}
</th>
))}
</tr>
</thead>
<tbody className="bg-white divide-y divide-neutral-dark">
{table.rows.map((row, rIdx) => (
<tr key={rIdx} className="hover:bg-neutral-light transition-colors">
<td className="px-3 py-3 text-sm font-medium text-text-primary sticky left-0 bg-white z-10 whitespace-nowrap">
{row.configuration}
</td>
{row.cells.map((cell, cellIdx) => (
<td key={cellIdx} className="px-3 py-3 text-sm text-text-secondary whitespace-nowrap">
{cell}
</td>
))}
</tr>
))}
</tbody>
</table>
</div>
</div>
))}
</div>
);
}

71
components/ui.tsx Normal file
View File

@@ -0,0 +1,71 @@
import React from 'react';
import Link from 'next/link';
import { clsx, type ClassValue } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
size?: 'sm' | 'md' | 'lg';
href?: string;
className?: string;
children?: React.ReactNode;
}
export function Button({ className, variant = 'primary', size = 'md', href, ...props }: ButtonProps) {
const baseStyles = 'inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none';
const variants = {
primary: 'bg-primary text-white hover:bg-primary-dark',
secondary: 'bg-secondary text-white hover:bg-secondary-light',
outline: 'border border-neutral-dark bg-transparent hover:bg-neutral-light text-text-primary',
ghost: 'hover:bg-neutral-light text-text-primary',
};
const sizes = {
sm: 'h-9 px-3 text-sm',
md: 'h-10 px-4 py-2',
lg: 'h-11 px-8 text-lg',
};
const styles = cn(baseStyles, variants[variant], sizes[size], className);
if (href) {
return (
<Link href={href} className={styles}>
{props.children}
</Link>
);
}
return (
<button className={styles} {...props} />
);
}
export function Section({ className, children, ...props }: React.HTMLAttributes<HTMLElement>) {
return (
<section className={cn('py-12 md:py-16 lg:py-24', className)} {...props}>
{children}
</section>
);
}
export function Container({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) {
return (
<div className={cn('container mx-auto px-4 md:px-6', className)} {...props}>
{children}
</div>
);
}
export function Card({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) {
return (
<div className={cn('bg-white rounded-lg border border-neutral-dark shadow-sm overflow-hidden', className)} {...props}>
{children}
</div>
);
}