design upgrade
This commit is contained in:
4
apps/suman-hrvatska/next-env.d.ts
vendored
4
apps/suman-hrvatska/next-env.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/types/routes.d.ts";
|
||||
import "./.next/types/root-params.d.ts";
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
import "./.next/dev/types/root-params.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
|
||||
BIN
apps/suman-hrvatska/public/hero/pergole-desktop.webp
Normal file
BIN
apps/suman-hrvatska/public/hero/pergole-desktop.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 292 KiB |
55
apps/suman-hrvatska/public/logo-suman.svg
Normal file
55
apps/suman-hrvatska/public/logo-suman.svg
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 97 100" style="enable-background:new 0 0 97 100;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#002655;}
|
||||
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#F9D81C;}
|
||||
.st2{fill:#F9D81C;}
|
||||
</style>
|
||||
<rect class="st0" width="97.2" height="97.2"/>
|
||||
<rect y="97.2" class="st1" width="97.2" height="2.8"/>
|
||||
<path class="st2" d="M67.6,82v-2.2l-0.3,0.1c-0.7,0.1-1.3,0.3-1.7,0.4c-0.5,0.2-0.8,0.3-1.1,0.5l0,0c-0.2,0.2-0.3,0.4-0.4,0.6
|
||||
c-0.1,0.2-0.1,0.5-0.1,0.7c0,0.5,0.1,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5.7 KiB |
@@ -1,7 +1,12 @@
|
||||
import { Metadata } from "next"
|
||||
|
||||
import FeaturedProducts from "@modules/home/components/featured-products"
|
||||
import Hero from "@modules/home/components/hero"
|
||||
import LandingHero from "@modules/home/components/landing/hero"
|
||||
import LandingMission from "@modules/home/components/landing/mission"
|
||||
import LandingMethod from "@modules/home/components/landing/method"
|
||||
import LandingProducts from "@modules/home/components/landing/products"
|
||||
import LandingStats from "@modules/home/components/landing/stats"
|
||||
import LandingImpact from "@modules/home/components/landing/impact"
|
||||
import LandingFaq from "@modules/home/components/landing/faq"
|
||||
import { listCollections } from "@lib/data/collections"
|
||||
import { getRegion, listRegions } from "@lib/data/regions"
|
||||
import { toJsonLd } from "@lib/util/product-structured-data"
|
||||
@@ -88,12 +93,13 @@ export default async function Home(props: {
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: toJsonLd(structuredData) }}
|
||||
/>
|
||||
<Hero />
|
||||
<div className="py-12">
|
||||
<ul className="flex flex-col gap-x-6">
|
||||
<FeaturedProducts collections={collections} region={region} />
|
||||
</ul>
|
||||
</div>
|
||||
<LandingHero />
|
||||
<LandingMission />
|
||||
<LandingMethod />
|
||||
<LandingProducts />
|
||||
<LandingStats />
|
||||
<LandingImpact />
|
||||
<LandingFaq />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,25 +1,37 @@
|
||||
import { getBaseURL } from "@lib/util/env"
|
||||
import { Metadata } from "next"
|
||||
import { Plus_Jakarta_Sans } from "next/font/google"
|
||||
import { DM_Sans, Geist } from "next/font/google"
|
||||
import "styles/globals.css"
|
||||
|
||||
const fontSans = Plus_Jakarta_Sans({
|
||||
// Body text: closest free match to Biograph's Apercu Pro
|
||||
const fontSans = DM_Sans({
|
||||
subsets: ["latin", "latin-ext"],
|
||||
variable: "--font-sans",
|
||||
display: "swap",
|
||||
})
|
||||
|
||||
// Headings: closest free match to Biograph's Aeonik
|
||||
const fontDisplay = Geist({
|
||||
subsets: ["latin", "latin-ext"],
|
||||
variable: "--font-display",
|
||||
display: "swap",
|
||||
})
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(getBaseURL()),
|
||||
}
|
||||
|
||||
export default function RootLayout(props: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html lang="hr" data-mode="light" className={fontSans.variable}>
|
||||
<html
|
||||
lang="hr"
|
||||
data-mode="light"
|
||||
className={`${fontSans.variable} ${fontDisplay.variable}`}
|
||||
>
|
||||
<head>
|
||||
<link rel="ucp" href="/.well-known/ucp" />
|
||||
</head>
|
||||
<body className="min-h-screen bg-background font-sans antialiased">
|
||||
<body className="min-h-screen bg-background font-sans text-foreground antialiased">
|
||||
<main className="relative">{props.children}</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
27
apps/suman-hrvatska/src/components/ui/logo.tsx
Normal file
27
apps/suman-hrvatska/src/components/ui/logo.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import Image from "next/image"
|
||||
|
||||
/** Intrinsic size of public/logo-suman.svg (viewBox 0 0 97 100) */
|
||||
export const LOGO_WIDTH = 97
|
||||
export const LOGO_HEIGHT = 100
|
||||
|
||||
type LogoProps = {
|
||||
className?: string
|
||||
priority?: boolean
|
||||
alt?: string
|
||||
}
|
||||
|
||||
/** Suman logo: navy square with the yellow wordmark and bottom strip */
|
||||
export function Logo({ className = "", priority = false, alt = "Suman d.o.o." }: LogoProps) {
|
||||
return (
|
||||
<Image
|
||||
src="/logo-suman.svg"
|
||||
alt={alt}
|
||||
width={LOGO_WIDTH}
|
||||
height={LOGO_HEIGHT}
|
||||
priority={priority}
|
||||
className={`h-auto w-full ${className}`}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default Logo
|
||||
24
apps/suman-hrvatska/src/config/faq.json
Normal file
24
apps/suman-hrvatska/src/config/faq.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"question": "Od kojih se materijala izrađuju Suman suncobrani i pergole?",
|
||||
"answer": "Svi naši sustavi izrađuju se od visokootpornog plastificiranog aluminija s nehrđajućim inox spojnim elementima. Koristimo vrhunska Sattler i Dickson akrilna platna visoke gustoće s trajnom UV zaštitom i hidrofobnim premazom."
|
||||
},
|
||||
{
|
||||
"question": "Jesu li platna na suncobranima i tendama vodootporna?",
|
||||
"answer": "Da, sva naša platna imaju certificirani vodeni stupac i poseban premaz koji u potpunosti sprječava prodiranje vode, prljanje i stvaranje plijesni."
|
||||
},
|
||||
{
|
||||
"question": "Koliko traju izrada, isporuka i montaža?",
|
||||
"answer": "Za tipske suncobrane i zglobne tende rok isporuke je obično 7 do 15 radnih dana, dok se za složene bioklimatske pergole rok precizno definira nakon izlaska tehničkog tima na teren."
|
||||
},
|
||||
{
|
||||
"question": "Osiguravate li servis i rezervne dijelove?",
|
||||
"answer": "Kao proizvođač, na skladištu uvijek imamo dostupne sve zamjenske komponente: krakove, spojnice, mehanizme, motore i nova platna."
|
||||
},
|
||||
{
|
||||
"question": "Mogu li se suncobrani i tende brendirati logotipom?",
|
||||
"answer": "Naravno. Brendiramo visokopostojanim tehnikama tiska koje jamče postojanost boja te otpornost na habanje i sunčevo zračenje."
|
||||
}
|
||||
]
|
||||
}
|
||||
37
apps/suman-hrvatska/src/config/footer.json
Normal file
37
apps/suman-hrvatska/src/config/footer.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"description": "Proizvođač profesionalnih ugostiteljskih suncobrana, bioklimatskih pergola i tendi. Proizvodnja u Gračanici, skladište i osobno preuzimanje u Zagrebu.",
|
||||
"columns": [
|
||||
{
|
||||
"title": "Proizvodi",
|
||||
"links": [
|
||||
{ "title": "Svi proizvodi", "href": "/store" },
|
||||
{ "title": "Suncobrani", "href": "/categories/suncobrani" },
|
||||
{ "title": "Pergole", "href": "/categories/pergole-i-bioklimatske-tende" },
|
||||
{ "title": "Tende", "href": "/categories/tende" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Kupnja",
|
||||
"links": [
|
||||
{ "title": "Dostava", "href": "/shipping" },
|
||||
{ "title": "Povrat robe", "href": "/returns" },
|
||||
{ "title": "Moj račun", "href": "/account" },
|
||||
{ "title": "Košarica", "href": "/cart" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Kontakt",
|
||||
"links": [
|
||||
{ "title": "Pošaljite upit", "href": "/contact" },
|
||||
{ "title": "B2B suradnja", "href": "/contact" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"bottomBar": {
|
||||
"copyright": "Suman d.o.o. Sva prava pridržana.",
|
||||
"links": [
|
||||
{ "title": "Uvjeti poslovanja", "href": "/terms" },
|
||||
{ "title": "Pravila privatnosti", "href": "/privacy" }
|
||||
]
|
||||
}
|
||||
}
|
||||
193
apps/suman-hrvatska/src/config/landing.json
Normal file
193
apps/suman-hrvatska/src/config/landing.json
Normal file
@@ -0,0 +1,193 @@
|
||||
{
|
||||
"hero": {
|
||||
"intervalMs": 7000,
|
||||
"slides": [
|
||||
{
|
||||
"id": "suncobrani",
|
||||
"kicker": "Suncobrani",
|
||||
"title": "Najugodnije mjesto pod suncem",
|
||||
"subtitle": "Profesionalni suncobrani iz vlastite proizvodnje. Odaberite dimenziju, platno i konstrukciju u konfiguratoru i naručite online.",
|
||||
"image": "https://placehold.co/1920x1080/c9ced6/c9ced6",
|
||||
"cta": {
|
||||
"label": "Konfiguriraj suncobran",
|
||||
"href": "/categories/suncobrani"
|
||||
},
|
||||
"stats": [
|
||||
{
|
||||
"value": "UPF 50+",
|
||||
"label": "UV zaštita platna"
|
||||
},
|
||||
{
|
||||
"value": "do 6 × 6 m",
|
||||
"label": "Raspon platna"
|
||||
},
|
||||
{
|
||||
"value": "3–5 god.",
|
||||
"label": "Garancija"
|
||||
}
|
||||
],
|
||||
"overlay": 0
|
||||
},
|
||||
{
|
||||
"id": "pergole",
|
||||
"kicker": "Bioklimatske pergole",
|
||||
"title": "Terasa za svako godišnje doba",
|
||||
"subtitle": "Aluminijske pergole s pomičnim lamelama, izrađene po mjeri vašeg prostora i montirane od strane našeg tima.",
|
||||
"image": "/hero/pergole-desktop.webp",
|
||||
"cta": {
|
||||
"label": "Pogledajte pergole",
|
||||
"href": "/categories/pergole-i-bioklimatske-tende"
|
||||
},
|
||||
"stats": [
|
||||
{
|
||||
"value": "150 kg/m²",
|
||||
"label": "Nosivost snijega"
|
||||
},
|
||||
{
|
||||
"value": "do 13 m",
|
||||
"label": "Raspon konstrukcije"
|
||||
},
|
||||
{
|
||||
"value": "5 god.",
|
||||
"label": "Garancija"
|
||||
}
|
||||
],
|
||||
"overlay": 0.35
|
||||
},
|
||||
{
|
||||
"id": "tende",
|
||||
"kicker": "Tende",
|
||||
"title": "Hlad točno tamo gdje vam treba",
|
||||
"subtitle": "Zglobne, kasetne i kupolaste tende za terase, balkone i izloge, uz mogućnost motorizacije i brendiranja.",
|
||||
"image": "https://placehold.co/1920x1080/d6cfc5/d6cfc5",
|
||||
"cta": {
|
||||
"label": "Pogledajte tende",
|
||||
"href": "/categories/tende"
|
||||
},
|
||||
"stats": [
|
||||
{
|
||||
"value": "0–45°",
|
||||
"label": "Podesiv nagib"
|
||||
},
|
||||
{
|
||||
"value": "do 6 m",
|
||||
"label": "Širina tende"
|
||||
},
|
||||
{
|
||||
"value": "Somfy",
|
||||
"label": "Motorizacija"
|
||||
}
|
||||
],
|
||||
"overlay": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"mission": {
|
||||
"kicker": "Naša misija",
|
||||
"title": "Uživajte u vanjskom prostoru, bez obzira na vrijeme",
|
||||
"text": "Povezujemo inovaciju, preciznu proizvodnju i vrhunske materijale u dugotrajna rješenja zaštite od sunca. Ne radimo samo hlad, nego prostor u kojem se gosti dulje zadržavaju."
|
||||
},
|
||||
"method": {
|
||||
"kicker": "Kako radimo",
|
||||
"title": "Od ideje do montaže",
|
||||
"text": "Svaki sustav prolazi isti put: vi birate konfiguraciju, mi ga izrađujemo i isporučujemo spremnog za uporabu.",
|
||||
"cta": {
|
||||
"label": "Saznajte više",
|
||||
"href": "/contact"
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"title": "Odaberite i konfigurirajte",
|
||||
"text": "Odaberite model suncobrana, dimenzije, platno, boju konstrukcije i postolje. Prikaz se mijenja uživo, a cijena se izračunava odmah.",
|
||||
"image": "https://placehold.co/800x1000/d4d8de/8a919c?text=Konfigurator"
|
||||
},
|
||||
{
|
||||
"title": "Izrada u našoj tvornici",
|
||||
"text": "Konstrukcija od plastificiranog aluminija s inox spojnim elementima. Tipski suncobrani i tende spremni su za 7 do 15 radnih dana.",
|
||||
"image": "https://placehold.co/800x1000/d4d8de/8a919c?text=Proizvodnja"
|
||||
},
|
||||
{
|
||||
"title": "Isporuka i podrška",
|
||||
"text": "Dostava diljem Hrvatske, na kopno i otoke, ili osobno preuzimanje u Zagrebu. Rezervni dijelovi i nova platna uvijek su dostupni.",
|
||||
"image": "https://placehold.co/800x1000/d4d8de/8a919c?text=Isporuka+i+montaza"
|
||||
}
|
||||
]
|
||||
},
|
||||
"products": {
|
||||
"kicker": "Asortiman",
|
||||
"title": "Sustavi za svaki prostor",
|
||||
"featured": {
|
||||
"kicker": "Suman suncobrani",
|
||||
"title": "Konfigurirajte i naručite izravno online",
|
||||
"text": "Modeli Prestige, Magnum, Console i Advance u kvadratnom, pravokutnom ili okruglom obliku, s više od deset dezena akrilnog platna.",
|
||||
"image": "https://placehold.co/1200x1000/e8ebef/8a919c?text=Suncobran",
|
||||
"href": "/categories/suncobrani",
|
||||
"cta": "Pogledajte suncobrane",
|
||||
"stats": [
|
||||
{
|
||||
"value": "4",
|
||||
"label": "Modela"
|
||||
},
|
||||
{
|
||||
"value": "10+",
|
||||
"label": "Dezena platna"
|
||||
},
|
||||
{
|
||||
"value": "4",
|
||||
"label": "Boje konstrukcije"
|
||||
}
|
||||
]
|
||||
},
|
||||
"secondary": [
|
||||
{
|
||||
"kicker": "Bioklimatske pergole",
|
||||
"title": "Pomične lamele za potpunu kontrolu svjetla",
|
||||
"text": "Izrađuju se po mjeri prostora. Pošaljite upit i naš tim pripremit će ponudu.",
|
||||
"image": "https://placehold.co/1000x700/e8ebef/8a919c?text=Pergola",
|
||||
"href": "/categories/pergole-i-bioklimatske-tende",
|
||||
"cta": "Pošaljite upit"
|
||||
},
|
||||
{
|
||||
"kicker": "Tende",
|
||||
"title": "Zglobne i kupolaste tende za terase i izloge",
|
||||
"text": "Elegantna zaštita za privatne i ugostiteljske objekte, uz mogućnost brendiranja.",
|
||||
"image": "https://placehold.co/1000x700/e8ebef/8a919c?text=Tenda",
|
||||
"href": "/categories/tende",
|
||||
"cta": "Pošaljite upit"
|
||||
}
|
||||
]
|
||||
},
|
||||
"stats": [
|
||||
{
|
||||
"value": "10.000",
|
||||
"suffix": "+",
|
||||
"text": "Ugrađenih suncobrana, pergola i tendi na terasama, u hotelima i vrtovima diljem regije i EU."
|
||||
},
|
||||
{
|
||||
"value": "100",
|
||||
"suffix": "%",
|
||||
"text": "Aluminijska konstrukcija s nehrđajućim inox spojnim elementima, bez dijelova koji hrđaju."
|
||||
},
|
||||
{
|
||||
"value": "7–15",
|
||||
"suffix": "",
|
||||
"text": "Radnih dana uobičajen je rok isporuke za tipske suncobrane i zglobne tende."
|
||||
}
|
||||
],
|
||||
"impact": {
|
||||
"kicker": "Reference",
|
||||
"title": "Na terasama diljem regije",
|
||||
"text": "Od malih kafića do hotelskih kompleksa, Suman sustavi dio su prostora u kojima ljudi provode ljeto.",
|
||||
"image": "https://placehold.co/1920x1100/d4d8de/8a919c?text=Referentni+objekt"
|
||||
},
|
||||
"faq": {
|
||||
"kicker": "Saznajte više",
|
||||
"title": "Često postavljana pitanja",
|
||||
"sideLabel": "01 — Sumanov pristup",
|
||||
"cta": {
|
||||
"label": "Postavite pitanje",
|
||||
"href": "/contact"
|
||||
},
|
||||
"notFound": "Niste pronašli odgovor?"
|
||||
}
|
||||
}
|
||||
24
apps/suman-hrvatska/src/config/navigation.json
Normal file
24
apps/suman-hrvatska/src/config/navigation.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"desktopNav": [
|
||||
{
|
||||
"title": "Svi proizvodi",
|
||||
"href": "/store"
|
||||
},
|
||||
{
|
||||
"title": "Suncobrani",
|
||||
"href": "/categories/suncobrani"
|
||||
},
|
||||
{
|
||||
"title": "Pergole",
|
||||
"href": "/categories/pergole-i-bioklimatske-tende"
|
||||
},
|
||||
{
|
||||
"title": "Tende",
|
||||
"href": "/categories/tende"
|
||||
},
|
||||
{
|
||||
"title": "Kontakt",
|
||||
"href": "/contact"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
"use client"
|
||||
|
||||
import * as AccordionPrimitive from "@radix-ui/react-accordion"
|
||||
import { Plus, Minus } from "@medusajs/icons"
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
import landing from "@/config/landing.json"
|
||||
import faqConfig from "@/config/faq.json"
|
||||
|
||||
export default function LandingFaq() {
|
||||
const { kicker, title, sideLabel, cta, notFound } = landing.faq
|
||||
|
||||
return (
|
||||
<section className="py-20 sm:py-28">
|
||||
<div className="content-container text-center">
|
||||
<p className="eyebrow">{kicker}</p>
|
||||
<h2 className="display-heading mt-5 text-3xl sm:text-5xl text-foreground">
|
||||
{title}
|
||||
</h2>
|
||||
<p className="mt-4 text-sm text-muted-foreground">
|
||||
{notFound}{" "}
|
||||
<LocalizedClientLink
|
||||
href={cta.href}
|
||||
className="text-primary underline underline-offset-4 hover:opacity-80"
|
||||
>
|
||||
{cta.label}
|
||||
</LocalizedClientLink>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="mt-12 sm:mt-16 border-t border-border/70">
|
||||
<div className="content-container grid grid-cols-1 lg:grid-cols-12 gap-8 pt-10 sm:pt-12">
|
||||
<p className="lg:col-span-5 eyebrow text-muted-foreground">
|
||||
{sideLabel}
|
||||
</p>
|
||||
|
||||
<AccordionPrimitive.Root
|
||||
type="single"
|
||||
collapsible
|
||||
defaultValue="item-0"
|
||||
className="lg:col-span-7 divide-y divide-border/70"
|
||||
>
|
||||
{faqConfig.items.map((item, idx) => (
|
||||
<AccordionPrimitive.Item key={idx} value={`item-${idx}`}>
|
||||
<AccordionPrimitive.Header className="flex">
|
||||
<AccordionPrimitive.Trigger className="group flex flex-1 items-center justify-between gap-6 py-5 text-left text-sm sm:text-[15px] text-foreground hover:text-primary transition-colors">
|
||||
<span>{item.question}</span>
|
||||
<Plus className="h-4 w-4 shrink-0 text-muted-foreground group-data-[state=open]:hidden" />
|
||||
<Minus className="h-4 w-4 shrink-0 text-muted-foreground hidden group-data-[state=open]:block" />
|
||||
</AccordionPrimitive.Trigger>
|
||||
</AccordionPrimitive.Header>
|
||||
<AccordionPrimitive.Content className="overflow-hidden text-sm text-muted-foreground leading-relaxed data-[state=closed]:animate-accordion-close data-[state=open]:animate-accordion-open">
|
||||
<div className="pb-6 pr-10">{item.answer}</div>
|
||||
</AccordionPrimitive.Content>
|
||||
</AccordionPrimitive.Item>
|
||||
))}
|
||||
</AccordionPrimitive.Root>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
188
apps/suman-hrvatska/src/modules/home/components/landing/hero.tsx
Normal file
188
apps/suman-hrvatska/src/modules/home/components/landing/hero.tsx
Normal file
@@ -0,0 +1,188 @@
|
||||
"use client"
|
||||
|
||||
import Image from "next/image"
|
||||
import { useCallback, useRef, useState } from "react"
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
import landing from "@/config/landing.json"
|
||||
|
||||
type Slide = (typeof landing.hero.slides)[number]
|
||||
|
||||
/**
|
||||
* Home hero carousel (suncobrani, pergole, tende). Each slide brings its own
|
||||
* headline, CTA and three product facts on the right.
|
||||
*
|
||||
* Autoplay is driven by the CSS progress bar (`.hero-progress` in
|
||||
* globals.css): when the active bar's animation ends, the next slide shows.
|
||||
* Keyboard focus pauses the bar; reduced motion disables the animation and so
|
||||
* autoplay. Slides under the transparent header (see HeaderShell).
|
||||
*/
|
||||
export default function LandingHero() {
|
||||
const { slides, intervalMs } = landing.hero
|
||||
const [active, setActive] = useState(0)
|
||||
const [paused, setPaused] = useState(false)
|
||||
const touchX = useRef<number | null>(null)
|
||||
|
||||
const go = useCallback(
|
||||
(index: number) => setActive((index + slides.length) % slides.length),
|
||||
[slides.length]
|
||||
)
|
||||
|
||||
return (
|
||||
<section
|
||||
data-hero-overlay
|
||||
aria-roledescription="carousel"
|
||||
aria-label="Suman proizvodi"
|
||||
className="relative -mt-[57px] sm:-mt-[65px] h-[100svh] min-h-[600px] max-h-[1020px] w-full overflow-hidden bg-muted"
|
||||
// Pause only for keyboard users (visible focus); hover and mouse clicks
|
||||
// never pause, so the progress bar always runs smoothly
|
||||
onFocus={(e) => setPaused((e.target as HTMLElement).matches(":focus-visible"))}
|
||||
onBlur={() => setPaused(false)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "ArrowRight") go(active + 1)
|
||||
if (e.key === "ArrowLeft") go(active - 1)
|
||||
}}
|
||||
onTouchStart={(e) => (touchX.current = e.touches[0].clientX)}
|
||||
onTouchEnd={(e) => {
|
||||
if (touchX.current === null) return
|
||||
const dx = e.changedTouches[0].clientX - touchX.current
|
||||
if (Math.abs(dx) > 50) go(active + (dx < 0 ? 1 : -1))
|
||||
touchX.current = null
|
||||
}}
|
||||
>
|
||||
{/* Images, cross-faded */}
|
||||
{slides.map((slide, i) => (
|
||||
<div
|
||||
key={slide.id}
|
||||
aria-hidden={i !== active}
|
||||
className={`absolute inset-0 transition-opacity duration-1000 ease-out ${
|
||||
i === active ? "opacity-100" : "opacity-0"
|
||||
}`}
|
||||
>
|
||||
<Image
|
||||
src={slide.image}
|
||||
alt={slide.title}
|
||||
fill
|
||||
priority={i === 0}
|
||||
// Only three slides: load all up front so a switch never shows a blank frame
|
||||
loading={i === 0 ? undefined : "eager"}
|
||||
sizes="100vw"
|
||||
className={`object-cover will-change-transform transition-transform duration-[8000ms] ease-out ${
|
||||
i === active ? "scale-100" : "scale-105"
|
||||
}`}
|
||||
/>
|
||||
{/* Per-slide darkening (landing.json hero.slides[].overlay, 0–1) */}
|
||||
{slide.overlay > 0 && (
|
||||
<div className="absolute inset-0 bg-black" style={{ opacity: slide.overlay }} />
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/65 via-black/15 to-transparent" />
|
||||
<div className="absolute inset-x-0 top-0 h-40 bg-gradient-to-b from-black/40 to-transparent" />
|
||||
|
||||
<div className="absolute inset-x-0 bottom-0 content-container pb-8 sm:pb-12">
|
||||
<div className="flex flex-col gap-10 lg:flex-row lg:items-end lg:justify-between">
|
||||
{/* Text: all slides stacked in one grid cell, only the active one visible */}
|
||||
<div className="grid max-w-3xl text-white">
|
||||
{slides.map((slide, i) => (
|
||||
<SlideText key={slide.id} slide={slide} index={i} total={slides.length} active={i === active} />
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Product facts for the visible slide */}
|
||||
<div className="grid">
|
||||
{slides.map((slide, i) => (
|
||||
<dl
|
||||
key={slide.id}
|
||||
aria-hidden={i !== active}
|
||||
className={`col-start-1 row-start-1 grid grid-cols-3 divide-x divide-white/25 text-white transition-[opacity,transform] duration-700 ${
|
||||
i === active ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-2 opacity-0"
|
||||
}`}
|
||||
>
|
||||
{slide.stats.map((stat) => (
|
||||
<div key={stat.label} className="px-4 sm:px-6 first:pl-0 last:pr-0 text-center lg:text-left">
|
||||
<dt className="font-display text-lg sm:text-2xl whitespace-nowrap">{stat.value}</dt>
|
||||
<dd className="mt-1 text-[11px] sm:text-xs text-white/70">{stat.label}</dd>
|
||||
</div>
|
||||
))}
|
||||
</dl>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Slide selector with progress (drives autoplay) */}
|
||||
<div className="mt-8 grid grid-cols-3 gap-3 sm:gap-6 border-t border-white/20 pt-4 sm:max-w-xl" role="tablist" aria-label="Odaberite proizvod">
|
||||
{slides.map((slide, i) => (
|
||||
<button
|
||||
key={slide.id}
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-selected={i === active}
|
||||
aria-label={`Prikaži: ${slide.kicker}`}
|
||||
onClick={() => go(i)}
|
||||
className="group text-left"
|
||||
>
|
||||
<span className="relative block h-0.5 w-full overflow-hidden bg-white/25">
|
||||
{i === active && (
|
||||
<span
|
||||
key={`${slide.id}-${active}`}
|
||||
className="hero-progress absolute inset-0 origin-left bg-white will-change-transform"
|
||||
style={{
|
||||
animationDuration: `${intervalMs}ms`,
|
||||
animationPlayState: paused ? "paused" : "running",
|
||||
}}
|
||||
onAnimationEnd={() => go(active + 1)}
|
||||
/>
|
||||
)}
|
||||
{i < active && <span className="absolute inset-0 bg-white/60" />}
|
||||
</span>
|
||||
<span
|
||||
className={`mt-3 flex items-baseline gap-2 text-xs sm:text-sm transition-colors ${
|
||||
i === active ? "text-white" : "text-white/60 group-hover:text-white"
|
||||
}`}
|
||||
>
|
||||
<span className="tabular-nums opacity-70">0{i + 1}</span>
|
||||
{slide.kicker}
|
||||
</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
function SlideText({
|
||||
slide,
|
||||
index,
|
||||
total,
|
||||
active,
|
||||
}: {
|
||||
slide: Slide
|
||||
index: number
|
||||
total: number
|
||||
active: boolean
|
||||
}) {
|
||||
const Heading = index === 0 ? "h1" : "h2"
|
||||
return (
|
||||
<div
|
||||
role="group"
|
||||
aria-roledescription="slide"
|
||||
aria-label={`${index + 1} od ${total}: ${slide.kicker}`}
|
||||
aria-hidden={!active}
|
||||
className={`col-start-1 row-start-1 transition-[opacity,transform] duration-700 ${
|
||||
active ? "translate-y-0 opacity-100" : "pointer-events-none translate-y-3 opacity-0"
|
||||
}`}
|
||||
>
|
||||
<p className="eyebrow text-white/80">{slide.kicker}</p>
|
||||
<Heading className="display-heading mt-4 text-[2.6rem] sm:text-6xl lg:text-7xl">{slide.title}</Heading>
|
||||
<p className="mt-5 max-w-lg text-sm sm:text-base text-white/80 leading-relaxed">{slide.subtitle}</p>
|
||||
<LocalizedClientLink
|
||||
href={slide.cta.href}
|
||||
tabIndex={active ? 0 : -1}
|
||||
className="mt-7 inline-flex h-11 items-center rounded-md bg-white px-6 text-sm text-foreground transition-colors hover:bg-white/90"
|
||||
>
|
||||
{slide.cta.label}
|
||||
</LocalizedClientLink>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import Image from "next/image"
|
||||
import landing from "@/config/landing.json"
|
||||
|
||||
export default function LandingImpact() {
|
||||
const { kicker, title, text, image } = landing.impact
|
||||
|
||||
return (
|
||||
<section className="bg-gradient-to-b from-background via-muted to-background py-20 sm:py-28">
|
||||
<div className="content-container">
|
||||
<div className="text-center max-w-2xl mx-auto">
|
||||
<p className="eyebrow">{kicker}</p>
|
||||
<h2 className="display-heading mt-5 text-3xl sm:text-5xl text-foreground">
|
||||
{title}
|
||||
</h2>
|
||||
<p className="mt-5 text-sm sm:text-base text-muted-foreground leading-relaxed">
|
||||
{text}
|
||||
</p>
|
||||
</div>
|
||||
<div className="relative mt-12 sm:mt-16 aspect-[4/3] sm:aspect-[16/9] overflow-hidden rounded-2xl bg-muted">
|
||||
<Image
|
||||
src={image}
|
||||
alt={title}
|
||||
fill
|
||||
sizes="100vw"
|
||||
className="object-cover"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import Image from "next/image"
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
import landing from "@/config/landing.json"
|
||||
|
||||
export default function LandingMethod() {
|
||||
const { kicker, title, text, cta, steps } = landing.method
|
||||
|
||||
return (
|
||||
<section className="content-container py-20 sm:py-28">
|
||||
<div className="text-center max-w-2xl mx-auto">
|
||||
<p className="eyebrow">{kicker}</p>
|
||||
<h2 className="display-heading mt-5 text-3xl sm:text-5xl text-foreground">
|
||||
{title}
|
||||
</h2>
|
||||
<p className="mt-5 text-sm sm:text-base text-muted-foreground leading-relaxed">
|
||||
{text}
|
||||
</p>
|
||||
<LocalizedClientLink
|
||||
href={cta.href}
|
||||
className="mt-6 inline-flex items-center h-9 px-4 rounded-md bg-muted text-sm text-foreground hover:bg-border transition-colors"
|
||||
>
|
||||
{cta.label}
|
||||
</LocalizedClientLink>
|
||||
</div>
|
||||
|
||||
<ol className="mt-12 sm:mt-16 grid grid-cols-1 md:grid-cols-3 gap-6 md:gap-4 lg:gap-6">
|
||||
{steps.map((step, i) => (
|
||||
<li key={step.title}>
|
||||
<div className="relative aspect-[4/5] overflow-hidden rounded-xl bg-muted">
|
||||
<Image
|
||||
src={step.image}
|
||||
alt={step.title}
|
||||
fill
|
||||
sizes="(min-width: 768px) 33vw, 100vw"
|
||||
className="object-cover"
|
||||
/>
|
||||
</div>
|
||||
<h3 className="mt-4 text-sm font-medium text-foreground">
|
||||
{i + 1}. {step.title}
|
||||
</h3>
|
||||
<p className="mt-2 text-sm text-muted-foreground leading-relaxed max-w-sm">
|
||||
{step.text}
|
||||
</p>
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import landing from "@/config/landing.json"
|
||||
|
||||
// Overlapping sine waves, drawn once as static SVG paths
|
||||
function wavePath(amplitude: number, phase: number, yOffset: number) {
|
||||
const width = 1440
|
||||
const points: string[] = []
|
||||
for (let x = 0; x <= width; x += 24) {
|
||||
const y =
|
||||
yOffset + amplitude * Math.sin((x / width) * Math.PI * 2 + phase)
|
||||
points.push(`${x === 0 ? "M" : "L"}${x},${y.toFixed(1)}`)
|
||||
}
|
||||
return points.join(" ")
|
||||
}
|
||||
|
||||
const waves = [
|
||||
{ amplitude: 70, phase: 0.4, y: 130, opacity: 0.18 },
|
||||
{ amplitude: 85, phase: 1.3, y: 140, opacity: 0.3 },
|
||||
{ amplitude: 60, phase: 2.2, y: 125, opacity: 0.45 },
|
||||
{ amplitude: 90, phase: 3.0, y: 145, opacity: 0.7 },
|
||||
]
|
||||
|
||||
export default function LandingMission() {
|
||||
const { kicker, title, text } = landing.mission
|
||||
|
||||
return (
|
||||
<section className="pt-24 sm:pt-32 overflow-hidden">
|
||||
<div className="content-container text-center max-w-3xl">
|
||||
<p className="eyebrow">{kicker}</p>
|
||||
<h2 className="display-heading mt-5 text-3xl sm:text-5xl text-foreground">
|
||||
{title}
|
||||
</h2>
|
||||
<p className="mt-5 text-sm sm:text-base text-muted-foreground leading-relaxed max-w-xl mx-auto">
|
||||
{text}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<svg
|
||||
viewBox="0 0 1440 280"
|
||||
preserveAspectRatio="none"
|
||||
className="mt-8 w-full h-40 sm:h-56 text-primary"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<defs>
|
||||
<linearGradient id="wave-fade" x1="0" x2="1" y1="0" y2="0">
|
||||
<stop offset="0" stopColor="white" stopOpacity="0" />
|
||||
<stop offset="0.2" stopColor="white" stopOpacity="1" />
|
||||
<stop offset="0.8" stopColor="white" stopOpacity="1" />
|
||||
<stop offset="1" stopColor="white" stopOpacity="0" />
|
||||
</linearGradient>
|
||||
<mask id="wave-mask">
|
||||
<rect width="1440" height="280" fill="url(#wave-fade)" />
|
||||
</mask>
|
||||
</defs>
|
||||
<g mask="url(#wave-mask)" fill="none" stroke="currentColor" strokeWidth="1.25">
|
||||
{waves.map((w, i) => (
|
||||
<path
|
||||
key={i}
|
||||
d={wavePath(w.amplitude, w.phase, w.y)}
|
||||
strokeOpacity={w.opacity}
|
||||
/>
|
||||
))}
|
||||
</g>
|
||||
</svg>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
import Image from "next/image"
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
import { ArrowRight } from "@medusajs/icons"
|
||||
import landing from "@/config/landing.json"
|
||||
|
||||
export default function LandingProducts() {
|
||||
const { kicker, title, featured, secondary } = landing.products
|
||||
|
||||
return (
|
||||
<section className="content-container pb-20 sm:pb-28">
|
||||
<div className="text-center max-w-2xl mx-auto mb-12 sm:mb-16">
|
||||
<p className="eyebrow">{kicker}</p>
|
||||
<h2 className="display-heading mt-5 text-3xl sm:text-5xl text-foreground">
|
||||
{title}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
{/* Featured: configurable umbrellas, sold directly */}
|
||||
<LocalizedClientLink
|
||||
href={featured.href}
|
||||
className="group grid grid-cols-1 lg:grid-cols-2 overflow-hidden rounded-2xl bg-muted border border-border/60"
|
||||
>
|
||||
<div className="flex flex-col justify-between gap-12 p-7 sm:p-10 lg:p-14 order-2 lg:order-1">
|
||||
<div>
|
||||
<p className="eyebrow text-muted-foreground">{featured.kicker}</p>
|
||||
<h3 className="display-heading mt-4 text-3xl sm:text-[2.75rem] text-foreground max-w-md">
|
||||
{featured.title}
|
||||
</h3>
|
||||
<p className="mt-4 text-sm sm:text-base text-muted-foreground leading-relaxed max-w-md">
|
||||
{featured.text}
|
||||
</p>
|
||||
<span className="mt-7 inline-flex items-center gap-2 h-10 px-5 rounded-md bg-primary text-primary-foreground text-sm transition-colors group-hover:bg-primary/90">
|
||||
{featured.cta}
|
||||
<ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-0.5" />
|
||||
</span>
|
||||
</div>
|
||||
<dl className="flex divide-x divide-border">
|
||||
{featured.stats.map((s) => (
|
||||
<div key={s.label} className="px-5 first:pl-0">
|
||||
<dt className="text-sm font-medium text-foreground">{s.value}</dt>
|
||||
<dd className="mt-1 text-xs text-muted-foreground">{s.label}</dd>
|
||||
</div>
|
||||
))}
|
||||
</dl>
|
||||
</div>
|
||||
<div className="relative min-h-[320px] lg:min-h-[520px] order-1 lg:order-2">
|
||||
<Image
|
||||
src={featured.image}
|
||||
alt={featured.kicker}
|
||||
fill
|
||||
sizes="(min-width: 1024px) 50vw, 100vw"
|
||||
className="object-cover transition-transform duration-700 group-hover:scale-[1.02]"
|
||||
/>
|
||||
</div>
|
||||
</LocalizedClientLink>
|
||||
|
||||
{/* Secondary: made-to-measure, quote only */}
|
||||
<div className="mt-4 lg:mt-6 grid grid-cols-1 md:grid-cols-2 gap-4 lg:gap-6">
|
||||
{secondary.map((item) => (
|
||||
<LocalizedClientLink
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
className="group overflow-hidden rounded-2xl border border-border/60 bg-background"
|
||||
>
|
||||
<div className="relative aspect-[16/10] bg-muted">
|
||||
<Image
|
||||
src={item.image}
|
||||
alt={item.kicker}
|
||||
fill
|
||||
sizes="(min-width: 768px) 50vw, 100vw"
|
||||
className="object-cover transition-transform duration-700 group-hover:scale-[1.02]"
|
||||
/>
|
||||
</div>
|
||||
<div className="p-7 sm:p-9">
|
||||
<p className="eyebrow text-muted-foreground">{item.kicker}</p>
|
||||
<h3 className="display-heading mt-3 text-2xl sm:text-3xl text-foreground">
|
||||
{item.title}
|
||||
</h3>
|
||||
<p className="mt-3 text-sm text-muted-foreground leading-relaxed max-w-md">
|
||||
{item.text}
|
||||
</p>
|
||||
<span className="mt-5 inline-flex items-center gap-2 text-sm text-primary">
|
||||
{item.cta}
|
||||
<ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-0.5" />
|
||||
</span>
|
||||
</div>
|
||||
</LocalizedClientLink>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import landing from "@/config/landing.json"
|
||||
|
||||
export default function LandingStats() {
|
||||
return (
|
||||
<section className="content-container pb-20 sm:pb-28">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 rounded-2xl border border-border/80 divide-y md:divide-y-0 md:divide-x divide-border/80">
|
||||
{landing.stats.map((stat) => (
|
||||
<div
|
||||
key={stat.value}
|
||||
className="flex flex-col justify-between gap-16 md:gap-28 p-7 sm:p-9"
|
||||
>
|
||||
<p className="display-heading text-6xl sm:text-7xl text-primary">
|
||||
{stat.value}
|
||||
{stat.suffix && (
|
||||
<sup className="ml-1 text-2xl sm:text-3xl align-super">
|
||||
{stat.suffix}
|
||||
</sup>
|
||||
)}
|
||||
</p>
|
||||
<p className="text-sm text-muted-foreground leading-relaxed max-w-xs">
|
||||
{stat.text}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -110,10 +110,10 @@ const CartDropdown = ({
|
||||
<Popover className="relative h-full">
|
||||
<PopoverButton className="h-full">
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
className="inline-flex items-center whitespace-nowrap h-9 px-2 sm:px-3 rounded-md text-sm text-foreground/70 hover:text-foreground hover:bg-muted transition-colors"
|
||||
href="/cart"
|
||||
data-testid="nav-cart-link"
|
||||
>{`Cart (${totalItems})`}</LocalizedClientLink>
|
||||
>{`Košarica (${totalItems})`}</LocalizedClientLink>
|
||||
</PopoverButton>
|
||||
<Transition
|
||||
show={cartDropdownOpen}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
"use client"
|
||||
|
||||
import { ReactNode, useEffect, useState } from "react"
|
||||
|
||||
/** Scroll distance (px) after which the header turns solid white */
|
||||
const SOLID_AFTER = 8
|
||||
|
||||
/**
|
||||
* Sticky header, solid white by default. On pages that start with a
|
||||
* `data-hero-overlay` section (home, product) globals.css makes it
|
||||
* transparent with white content until the page scrolls; that is done in CSS
|
||||
* (`body:has(...)`) so the transparent state is right on the first paint.
|
||||
*/
|
||||
export default function HeaderShell({ children }: { children: ReactNode }) {
|
||||
const [scrolled, setScrolled] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
const update = () => setScrolled(window.scrollY > SOLID_AFTER)
|
||||
update()
|
||||
window.addEventListener("scroll", update, { passive: true })
|
||||
return () => window.removeEventListener("scroll", update)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div
|
||||
data-header-shell
|
||||
data-scrolled={scrolled}
|
||||
className={`sticky top-0 inset-x-0 z-50 border-b bg-background border-border/70 transition-[background-color,border-color,box-shadow] duration-300 ${
|
||||
scrolled ? "shadow-[0_8px_30px_rgba(1,37,85,0.08)]" : "shadow-none"
|
||||
}`}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -128,8 +128,8 @@ const Search = () => {
|
||||
event.preventDefault()
|
||||
open()
|
||||
}}
|
||||
aria-label="Search products"
|
||||
className="flex items-center hover:text-ui-fg-base"
|
||||
aria-label="Pretraga proizvoda"
|
||||
className="inline-flex items-center justify-center h-9 w-9 rounded-md text-foreground/70 hover:text-foreground hover:bg-muted transition-colors"
|
||||
data-testid="nav-search-button"
|
||||
>
|
||||
<MagnifyingGlass />
|
||||
|
||||
@@ -40,7 +40,7 @@ const SideMenu = ({ regions, locales, currentLocale }: SideMenuProps) => {
|
||||
data-testid="nav-menu-button"
|
||||
className="relative h-full flex items-center transition-all ease-out duration-200 focus:outline-none hover:text-ui-fg-base"
|
||||
>
|
||||
Menu
|
||||
Izbornik
|
||||
</Popover.Button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,215 +1,70 @@
|
||||
import { listCategories } from "@lib/data/categories";
|
||||
import { listCollections } from "@lib/data/collections";
|
||||
import { Text, clx } from "@modules/common/components/ui";
|
||||
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link";
|
||||
import MedusaCTA from "@modules/layout/components/medusa-cta";
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
import footerConfig from "@/config/footer.json"
|
||||
import { Logo } from "@/components/ui/logo"
|
||||
|
||||
export default async function Footer() {
|
||||
const [{ collections }, productCategories] = await Promise.all([
|
||||
listCollections({ fields: "id,handle,title" }),
|
||||
listCategories({
|
||||
fields:
|
||||
"id,name,handle,parent_category_id,category_children.id,category_children.name,category_children.handle",
|
||||
}),
|
||||
]);
|
||||
const { description, columns, bottomBar } = footerConfig
|
||||
|
||||
return (
|
||||
<footer className="border-t border-ui-border-base w-full">
|
||||
<div className="content-container flex flex-col w-full">
|
||||
<div className="flex flex-col gap-y-6 xsmall:flex-row items-start justify-between py-40">
|
||||
<div>
|
||||
<footer className="w-full bg-background border-t border-border/70 pt-14 sm:pt-20 pb-8">
|
||||
<div className="content-container">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-12 gap-12 pb-16 sm:pb-24">
|
||||
{/* Left: wordmark and short description */}
|
||||
<div className="lg:col-span-4 flex flex-col justify-between gap-10">
|
||||
<LocalizedClientLink
|
||||
href="/"
|
||||
className="txt-compact-xlarge-plus text-ui-fg-subtle hover:text-ui-fg-base uppercase"
|
||||
className="block w-[80px] sm:w-[96px] transition-opacity hover:opacity-90"
|
||||
aria-label="Suman d.o.o. početna"
|
||||
>
|
||||
Medusa Store
|
||||
<Logo alt="" />
|
||||
</LocalizedClientLink>
|
||||
<p className="text-xs text-muted-foreground leading-relaxed max-w-xs">
|
||||
{description}
|
||||
</p>
|
||||
</div>
|
||||
<div className="text-small-regular gap-10 md:gap-x-16 grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4">
|
||||
{productCategories && productCategories?.length > 0 && (
|
||||
<div className="flex flex-col gap-y-2">
|
||||
<span className="txt-small-plus txt-ui-fg-base">
|
||||
Categories
|
||||
</span>
|
||||
<ul
|
||||
className="grid grid-cols-1 gap-2"
|
||||
data-testid="footer-categories"
|
||||
>
|
||||
{productCategories?.slice(0, 6).map((c) => {
|
||||
if (c.parent_category_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
const children =
|
||||
c.category_children?.map((child) => ({
|
||||
name: child.name,
|
||||
handle: child.handle,
|
||||
id: child.id,
|
||||
})) || null;
|
||||
|
||||
return (
|
||||
<li
|
||||
className="flex flex-col gap-2 text-ui-fg-subtle txt-small"
|
||||
key={c.id}
|
||||
>
|
||||
<LocalizedClientLink
|
||||
className={clx(
|
||||
"hover:text-ui-fg-base",
|
||||
children && "txt-small-plus"
|
||||
)}
|
||||
href={`/categories/${c.handle}`}
|
||||
data-testid="category-link"
|
||||
>
|
||||
{c.name}
|
||||
</LocalizedClientLink>
|
||||
{children && (
|
||||
<ul className="grid grid-cols-1 ml-3 gap-2">
|
||||
{children &&
|
||||
children.map((child) => (
|
||||
<li key={child.id}>
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href={`/categories/${child.handle}`}
|
||||
data-testid="category-link"
|
||||
>
|
||||
{child.name}
|
||||
</LocalizedClientLink>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
{collections && collections.length > 0 && (
|
||||
<div className="flex flex-col gap-y-2">
|
||||
<span className="txt-small-plus txt-ui-fg-base">
|
||||
Collections
|
||||
</span>
|
||||
<ul
|
||||
className={clx(
|
||||
"grid grid-cols-1 gap-2 text-ui-fg-subtle txt-small",
|
||||
{
|
||||
"grid-cols-2": (collections?.length || 0) > 3,
|
||||
}
|
||||
)}
|
||||
>
|
||||
{collections?.slice(0, 6).map((c) => (
|
||||
<li key={c.id}>
|
||||
{/* Right: link columns */}
|
||||
<div className="lg:col-span-8 grid grid-cols-2 md:grid-cols-3 gap-10 text-sm">
|
||||
{columns.map((col) => (
|
||||
<div key={col.title}>
|
||||
<h3 className="text-sm font-medium text-foreground">
|
||||
{col.title}
|
||||
</h3>
|
||||
<ul className="mt-4 space-y-2.5 text-muted-foreground">
|
||||
{col.links.map((link) => (
|
||||
<li key={link.title}>
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href={`/collections/${c.handle}`}
|
||||
href={link.href}
|
||||
className="hover:text-foreground transition-colors"
|
||||
>
|
||||
{c.title}
|
||||
{link.title}
|
||||
</LocalizedClientLink>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex flex-col gap-y-2">
|
||||
<span className="txt-small-plus txt-ui-fg-base">
|
||||
Customer service
|
||||
</span>
|
||||
<ul className="grid grid-cols-1 gap-y-2 text-ui-fg-subtle txt-small">
|
||||
<li>
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href="/shipping"
|
||||
>
|
||||
Shipping information
|
||||
</LocalizedClientLink>
|
||||
</li>
|
||||
<li>
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href="/returns"
|
||||
>
|
||||
Return policy
|
||||
</LocalizedClientLink>
|
||||
</li>
|
||||
<li>
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href="/terms"
|
||||
>
|
||||
Terms of service
|
||||
</LocalizedClientLink>
|
||||
</li>
|
||||
<li>
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href="/privacy"
|
||||
>
|
||||
Privacy policy
|
||||
</LocalizedClientLink>
|
||||
</li>
|
||||
<li>
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href="/contact"
|
||||
>
|
||||
Contact
|
||||
</LocalizedClientLink>
|
||||
</li>
|
||||
<li>
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href="/search"
|
||||
>
|
||||
Search
|
||||
</LocalizedClientLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div className="flex flex-col gap-y-2">
|
||||
<span className="txt-small-plus txt-ui-fg-base">Medusa</span>
|
||||
<ul className="grid grid-cols-1 gap-y-2 text-ui-fg-subtle txt-small">
|
||||
<li>
|
||||
<a
|
||||
href="https://github.com/medusajs"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="hover:text-ui-fg-base"
|
||||
>
|
||||
GitHub
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://docs.medusajs.com"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="hover:text-ui-fg-base"
|
||||
>
|
||||
Documentation
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="https://github.com/medusajs/dtc-starter"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="hover:text-ui-fg-base"
|
||||
>
|
||||
Source code
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex w-full mb-16 justify-between text-ui-fg-muted">
|
||||
<Text className="txt-compact-small">
|
||||
© {new Date().getFullYear()} Medusa Store. All rights reserved.
|
||||
</Text>
|
||||
<MedusaCTA />
|
||||
|
||||
{/* Bottom bar */}
|
||||
<div className="pt-6 border-t border-border/70 flex flex-col sm:flex-row sm:items-center justify-between gap-4 text-[11px] text-muted-foreground">
|
||||
<p>
|
||||
© {new Date().getFullYear()} {bottomBar.copyright}
|
||||
</p>
|
||||
<div className="flex items-center gap-6">
|
||||
{bottomBar.links.map((link) => (
|
||||
<LocalizedClientLink
|
||||
key={link.href}
|
||||
href={link.href}
|
||||
className="hover:text-foreground transition-colors"
|
||||
>
|
||||
{link.title}
|
||||
</LocalizedClientLink>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,10 +4,14 @@ import { listLocales } from "@lib/data/locales"
|
||||
import { getLocale } from "@lib/data/locale-actions"
|
||||
import { listRegions } from "@lib/data/regions"
|
||||
import { StoreRegion } from "@medusajs/types"
|
||||
import { User } from "@medusajs/icons"
|
||||
import LocalizedClientLink from "@modules/common/components/localized-client-link"
|
||||
import HeaderShell from "@modules/layout/components/header-shell"
|
||||
import CartButton from "@modules/layout/components/cart-button"
|
||||
import Search from "@modules/layout/components/search"
|
||||
import SideMenu from "@modules/layout/components/side-menu"
|
||||
import navigationConfig from "@/config/navigation.json"
|
||||
import { Logo } from "@/components/ui/logo"
|
||||
|
||||
export default async function Nav() {
|
||||
const [regions, locales, currentLocale] = await Promise.all([
|
||||
@@ -17,52 +21,70 @@ export default async function Nav() {
|
||||
])
|
||||
|
||||
return (
|
||||
<div className="sticky top-0 inset-x-0 z-50 group">
|
||||
<header className="relative h-16 mx-auto border-b duration-200 bg-white border-ui-border-base">
|
||||
<nav className="content-container txt-xsmall-plus text-ui-fg-subtle flex items-center justify-between w-full h-full text-small-regular">
|
||||
<div className="flex-1 basis-0 h-full flex items-center">
|
||||
<div className="h-full">
|
||||
<SideMenu regions={regions} locales={locales} currentLocale={currentLocale} />
|
||||
</div>
|
||||
</div>
|
||||
<HeaderShell>
|
||||
<header className="content-container grid grid-cols-[1fr_auto_1fr] h-14 sm:h-16 items-center gap-4">
|
||||
{/* Left: logo hangs from the top edge and overflows the header
|
||||
bottom; absolute, so it never changes the header height */}
|
||||
<LocalizedClientLink
|
||||
href="/"
|
||||
className="relative justify-self-start self-stretch w-[80px] sm:w-[104px] lg:w-[128px]"
|
||||
data-testid="nav-store-link"
|
||||
data-header-keep
|
||||
aria-label="Suman d.o.o. početna"
|
||||
>
|
||||
<span className="absolute inset-x-0 top-0 z-10 block drop-shadow-sm transition-opacity hover:opacity-90">
|
||||
<Logo priority alt="" />
|
||||
</span>
|
||||
</LocalizedClientLink>
|
||||
|
||||
<div className="flex items-center h-full">
|
||||
{/* Center: desktop links */}
|
||||
<nav className="hidden md:flex items-center gap-7 lg:gap-9 text-sm text-muted-foreground">
|
||||
{navigationConfig.desktopNav.map((item) => (
|
||||
<LocalizedClientLink
|
||||
href="/"
|
||||
className="txt-compact-xlarge-plus hover:text-ui-fg-base uppercase"
|
||||
data-testid="nav-store-link"
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
className="transition-colors hover:text-foreground"
|
||||
>
|
||||
Medusa Store
|
||||
{item.title}
|
||||
</LocalizedClientLink>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-x-6 h-full flex-1 basis-0 justify-end">
|
||||
<Search />
|
||||
<div className="hidden small:flex items-center gap-x-6 h-full">
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base"
|
||||
href="/account"
|
||||
data-testid="nav-account-link"
|
||||
>
|
||||
Account
|
||||
</LocalizedClientLink>
|
||||
</div>
|
||||
<Suspense
|
||||
fallback={
|
||||
<LocalizedClientLink
|
||||
className="hover:text-ui-fg-base flex gap-2"
|
||||
href="/cart"
|
||||
data-testid="nav-cart-link"
|
||||
>
|
||||
Cart (0)
|
||||
</LocalizedClientLink>
|
||||
}
|
||||
>
|
||||
<CartButton />
|
||||
</Suspense>
|
||||
</div>
|
||||
))}
|
||||
</nav>
|
||||
<div className="md:hidden" />
|
||||
|
||||
{/* Right: search, account, cart, CTA, mobile menu */}
|
||||
<div className="justify-self-end flex items-center gap-1 sm:gap-2 h-full">
|
||||
<Search />
|
||||
<LocalizedClientLink
|
||||
href="/account"
|
||||
className="hidden sm:inline-flex items-center justify-center h-9 w-9 rounded-md text-foreground/70 hover:text-foreground hover:bg-muted transition-colors"
|
||||
data-testid="nav-account-link"
|
||||
aria-label="Moj račun"
|
||||
>
|
||||
<User />
|
||||
</LocalizedClientLink>
|
||||
<Suspense
|
||||
fallback={
|
||||
<LocalizedClientLink
|
||||
className="inline-flex items-center whitespace-nowrap h-9 px-2 sm:px-3 rounded-md text-sm text-foreground/70 hover:text-foreground hover:bg-muted transition-colors"
|
||||
href="/cart"
|
||||
data-testid="nav-cart-link"
|
||||
>
|
||||
Košarica (0)
|
||||
</LocalizedClientLink>
|
||||
}
|
||||
>
|
||||
<CartButton />
|
||||
</Suspense>
|
||||
|
||||
<div className="md:hidden h-full text-sm text-foreground/70">
|
||||
<SideMenu
|
||||
regions={regions}
|
||||
locales={locales}
|
||||
currentLocale={currentLocale}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
</HeaderShell>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -49,9 +49,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* Suman brand tokens, kept in sync with suman-bosna */
|
||||
@layer base {
|
||||
:root {
|
||||
--background: 0 0% 100%;
|
||||
--foreground: 215 28% 17%;
|
||||
--primary: 214 98% 17%;
|
||||
--primary-foreground: 0 0% 100%;
|
||||
--muted: 210 20% 98%;
|
||||
--muted-foreground: 215 16% 47%;
|
||||
--border: 214 25% 91%;
|
||||
}
|
||||
}
|
||||
|
||||
@layer components {
|
||||
.content-container {
|
||||
@apply max-w-[1440px] w-full mx-auto px-6;
|
||||
@apply max-w-[1536px] w-full mx-auto px-4 sm:px-6 lg:px-8 xl:px-10;
|
||||
}
|
||||
|
||||
/* Small spaced uppercase label above section titles (Biograph-style) */
|
||||
.eyebrow {
|
||||
@apply text-[10px] sm:text-[11px] font-medium uppercase tracking-[0.3em] text-foreground;
|
||||
}
|
||||
|
||||
/* Light-weight display heading with tight tracking (Biograph-style) */
|
||||
.display-heading {
|
||||
@apply font-display font-normal tracking-[-0.02em] leading-[1.05];
|
||||
}
|
||||
|
||||
.contrast-btn {
|
||||
@@ -110,3 +133,43 @@
|
||||
@apply text-[32px] leading-[44px] font-semibold;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Transparent header over a hero (see HeaderShell): applies while the page
|
||||
* starts with a [data-hero-overlay] section and is not scrolled. Attribute +
|
||||
* element selectors outrank the utility classes used in the header.
|
||||
*/
|
||||
body:has([data-hero-overlay]) [data-header-shell][data-scrolled="false"] {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
body:has([data-hero-overlay]) [data-header-shell][data-scrolled="false"] header :is(a, button):not([data-header-keep]) {
|
||||
color: #fff;
|
||||
transition: color 300ms ease, background-color 300ms ease;
|
||||
}
|
||||
body:has([data-hero-overlay]) [data-header-shell][data-scrolled="false"] header :is(a, button):not([data-header-keep]):hover {
|
||||
color: #fff;
|
||||
background-color: rgb(255 255 255 / 0.12);
|
||||
}
|
||||
|
||||
/* Home hero carousel progress bar; its animationend advances the slide */
|
||||
@keyframes hero-progress {
|
||||
from {
|
||||
transform: scaleX(0);
|
||||
}
|
||||
to {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
}
|
||||
.hero-progress {
|
||||
animation-name: hero-progress;
|
||||
animation-timing-function: linear;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
/* No animation, so no animationend: autoplay stays off */
|
||||
.hero-progress {
|
||||
animation: none;
|
||||
transform: scaleX(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,18 @@ module.exports = {
|
||||
padding: "padding-top padding-right padding-bottom padding-left",
|
||||
},
|
||||
colors: {
|
||||
// Suman brand tokens (same values as suman-bosna), driven by CSS vars in globals.css
|
||||
background: "hsl(var(--background))",
|
||||
foreground: "hsl(var(--foreground))",
|
||||
border: "hsl(var(--border))",
|
||||
primary: {
|
||||
DEFAULT: "hsl(var(--primary))",
|
||||
foreground: "hsl(var(--primary-foreground))",
|
||||
},
|
||||
muted: {
|
||||
DEFAULT: "hsl(var(--muted))",
|
||||
foreground: "hsl(var(--muted-foreground))",
|
||||
},
|
||||
grey: {
|
||||
0: "#FFFFFF",
|
||||
5: "#F9FAFB",
|
||||
@@ -58,7 +70,9 @@ module.exports = {
|
||||
"3xl": "2rem",
|
||||
},
|
||||
fontFamily: {
|
||||
display: ["var(--font-display)", "var(--font-sans)", "sans-serif"],
|
||||
sans: [
|
||||
"var(--font-sans)",
|
||||
"Inter",
|
||||
"-apple-system",
|
||||
"BlinkMacSystemFont",
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
],
|
||||
"@pages/*": [
|
||||
"pages/*"
|
||||
],
|
||||
"@/*": [
|
||||
"*"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user