frontend fixes
Some checks failed
Build & Deploy KLZ Cables / build-and-deploy (push) Failing after 1m37s
Some checks failed
Build & Deploy KLZ Cables / build-and-deploy (push) Failing after 1m37s
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import React from 'react';
|
||||
'use client';
|
||||
|
||||
import React, { useState } from 'react';
|
||||
import Image from 'next/image';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Section, Container, Heading } from '../../components/ui';
|
||||
import Lightbox from '../Lightbox';
|
||||
|
||||
export default function GallerySection() {
|
||||
const t = useTranslations('Home.gallery');
|
||||
@@ -14,6 +17,9 @@ export default function GallerySection() {
|
||||
'/uploads/2024/12/DSC07768-Large.webp',
|
||||
];
|
||||
|
||||
const [lightboxOpen, setLightboxOpen] = useState(false);
|
||||
const [lightboxIndex, setLightboxIndex] = useState(0);
|
||||
|
||||
return (
|
||||
<Section className="bg-white text-white py-32">
|
||||
<Container>
|
||||
@@ -23,9 +29,16 @@ export default function GallerySection() {
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
{images.map((src, idx) => (
|
||||
<div key={idx} className="relative aspect-[4/3] overflow-hidden rounded-3xl group shadow-lg hover:shadow-2xl transition-all duration-700">
|
||||
<Image
|
||||
src={src}
|
||||
<button
|
||||
key={idx}
|
||||
onClick={() => {
|
||||
setLightboxIndex(idx);
|
||||
setLightboxOpen(true);
|
||||
}}
|
||||
className="relative aspect-[4/3] overflow-hidden rounded-3xl group shadow-lg hover:shadow-2xl transition-all duration-700 cursor-pointer"
|
||||
>
|
||||
<Image
|
||||
src={src}
|
||||
alt={`${t('alt')} ${idx + 1}`}
|
||||
fill
|
||||
className="object-cover transition-transform duration-1000 group-hover:scale-110"
|
||||
@@ -33,10 +46,17 @@ export default function GallerySection() {
|
||||
/>
|
||||
<div className="absolute inset-0 bg-primary-dark/20 group-hover:bg-transparent transition-all duration-500" />
|
||||
<div className="absolute inset-0 border-0 group-hover:border-[16px] border-white/10 transition-all duration-500 pointer-events-none" />
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</Container>
|
||||
|
||||
<Lightbox
|
||||
isOpen={lightboxOpen}
|
||||
images={images}
|
||||
initialIndex={lightboxIndex}
|
||||
onClose={() => setLightboxOpen(false)}
|
||||
/>
|
||||
</Section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ export default async function RecentPosts({ locale }: RecentPostsProps) {
|
||||
<Section className="bg-neutral py-16 md:py-24">
|
||||
<Container>
|
||||
<div className="flex flex-col md:flex-row items-start md:items-end justify-between mb-12 md:mb-16 gap-6">
|
||||
<Heading level={2} subtitle={t('latestNews')} className="mb-0 text-white">
|
||||
<Heading level={2} subtitle={t('latestNews')} className="mb-0 text-primary">
|
||||
{t('allArticles')}
|
||||
</Heading>
|
||||
<Link href={`/${locale}/blog`} className="group flex items-center text-white font-bold text-base md:text-lg touch-target">
|
||||
<Link href={`/${locale}/blog`} className="group flex items-center text-primary font-bold text-base md:text-lg touch-target">
|
||||
{t('allArticles')}
|
||||
<span className="ml-2 transition-transform group-hover:translate-x-2">→</span>
|
||||
</Link>
|
||||
@@ -56,10 +56,10 @@ export default async function RecentPosts({ locale }: RecentPostsProps) {
|
||||
day: 'numeric'
|
||||
})}
|
||||
</div>
|
||||
<h3 className="text-lg md:text-xl font-bold text-white group-hover:text-accent-dark transition-colors line-clamp-2 mb-4 md:mb-6 leading-tight">
|
||||
<h3 className="text-lg md:text-xl font-bold text-primary group-hover:text-accent-dark transition-colors line-clamp-2 mb-4 md:mb-6 leading-tight">
|
||||
{post.frontmatter.title}
|
||||
</h3>
|
||||
<div className="mt-auto flex items-center text-white font-bold group-hover:underline decoration-2 underline-offset-4">
|
||||
<div className="mt-auto flex items-center text-primary font-bold group-hover:underline decoration-2 underline-offset-4">
|
||||
{t('readMore')}
|
||||
<svg className="ml-2 w-5 h-5 transition-transform group-hover:translate-x-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 8l4 4m0 0l-4 4m4-4H3" />
|
||||
|
||||
@@ -6,12 +6,12 @@ export default function WhatWeDo() {
|
||||
const t = useTranslations('Home.whatWeDo');
|
||||
|
||||
return (
|
||||
<Section className="bg-white text-white">
|
||||
<Section className="bg-white">
|
||||
<Container>
|
||||
<div className="sticky-narrative-container">
|
||||
<div className="sticky-narrative-sidebar">
|
||||
<div className="lg:sticky lg:top-32">
|
||||
<Heading level={2} subtitle={t('expertise')}>
|
||||
<Heading level={2} subtitle={t('expertise')} className="text-primary-dark">
|
||||
{t('title')}
|
||||
</Heading>
|
||||
<p className="text-base md:text-lg text-text-secondary leading-relaxed">
|
||||
@@ -33,7 +33,7 @@ export default function WhatWeDo() {
|
||||
</span>
|
||||
<div className="h-px flex-grow bg-neutral-medium" />
|
||||
</div>
|
||||
<h3 className="text-lg md:text-xl font-bold mb-3 md:mb-4 text-white group-hover:text-accent-dark transition-colors">{t(`items.${idx}.title`)}</h3>
|
||||
<h3 className="text-lg md:text-xl font-bold mb-3 md:mb-4 text-primary-dark group-hover:text-accent-dark transition-colors">{t(`items.${idx}.title`)}</h3>
|
||||
<p className="text-text-secondary text-base md:text-base leading-relaxed">{t(`items.${idx}.description`)}</p>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -6,12 +6,12 @@ export default function WhyChooseUs() {
|
||||
const t = useTranslations('Home.whyChooseUs');
|
||||
|
||||
return (
|
||||
<Section className="bg-neutral-light text-white">
|
||||
<Section className="bg-neutral-light">
|
||||
<Container>
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-16 lg:gap-24">
|
||||
<div className="lg:col-span-4 order-1 lg:order-2">
|
||||
<div className="sticky top-32">
|
||||
<Heading level={2} subtitle={t('whyKlz')}>
|
||||
<Heading level={2} subtitle={t('whyKlz')} className="text-primary-dark">
|
||||
{t('title')}
|
||||
</Heading>
|
||||
<p className="text-base md:text-lg text-text-secondary leading-relaxed">
|
||||
@@ -26,7 +26,7 @@ export default function WhyChooseUs() {
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={3} d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
</div>
|
||||
<span className="font-bold text-white text-base md:text-base">{t(`features.${i}`)}</span>
|
||||
<span className="font-bold text-primary-dark text-base md:text-base">{t(`features.${i}`)}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
@@ -38,7 +38,7 @@ export default function WhyChooseUs() {
|
||||
<div className="w-14 h-14 bg-saturated/10 rounded-2xl flex items-center justify-center mb-8 group-hover:bg-accent transition-colors duration-500">
|
||||
<span className="text-white font-bold text-lg group-hover:text-primary-dark">0{idx + 1}</span>
|
||||
</div>
|
||||
<h3 className="text-xl font-bold mb-4 text-white">{t(`items.${idx}.title`)}</h3>
|
||||
<h3 className="text-xl font-bold mb-4 text-primary-dark">{t(`items.${idx}.title`)}</h3>
|
||||
<p className="text-text-secondary text-base md:text-base leading-relaxed">{t(`items.${idx}.description`)}</p>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user