Wszystkie pliki
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
# Workspace Rules — BNTBudownictwo
|
||||
|
||||
## Stack tego projektu
|
||||
|
||||
- Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS
|
||||
- Backend: Vercel (wysyłka maili, np. Resend, brak bazy danych)
|
||||
- Płatności: brak (strona wizytówkowa/leadowa, nie sklep)
|
||||
|
||||
## Sitemap
|
||||
|
||||
```
|
||||
/ → Hero z wideo w tle + skrót usług + liczniki (zrealizowane inwestycje /
|
||||
lata doświadczenia / zadowoleni klienci) + CTA wycena
|
||||
/o-nas → O firmie / o Kierowniku Projektu — doświadczenie, uprawnienia, podejście
|
||||
/uslugi → Lista usług budowlanych
|
||||
/uslugi/[slug] → Podstrona pojedynczej usługi
|
||||
/realizacje → Portfolio zrealizowanych inwestycji, filtrowane wg typu
|
||||
(mieszkaniowe / usługowe / przemysłowe)
|
||||
/realizacje/[slug] → Pojedyncza realizacja: zdjęcia, zakres, lokalizacja
|
||||
/referencje → Opinie/referencje klientów — cytat + imię, nazwisko, firma/stanowisko;
|
||||
skany pism referencyjnych jako pobieralne PDF, jeśli dostępne
|
||||
/blog → Artykuły pod SEO/GEO — NIE w głównej nawigacji, patrz sekcja niżej
|
||||
/blog/[slug]
|
||||
/kontakt → Formularz wyceny + dane kontaktowe + mapa
|
||||
/polityka-prywatnosci
|
||||
/regulamin
|
||||
```
|
||||
|
||||
- URL-e w formacie kebab-case, po polsku bez ogonków.
|
||||
- Każda podstrona usługi, realizacji i artykułu blogowego ma unikalny title i meta description.
|
||||
|
||||
## Blog — widoczność i cel
|
||||
|
||||
- Blog istnieje wyłącznie pod SEO/GEO (pozycjonowanie w wyszukiwarkach i widoczność w odpowiedziach AI typu ChatGPT/Perplexity/Google AI Overviews) — nie jest elementem głównej ścieżki użytkownika i nie ma prawa rozpraszać uwagi od CTA "wycena".
|
||||
- Nie umieszczać /blog w głównym menu nawigacyjnym (header).
|
||||
- Link do /blog umieścić w stopce (footer), w kolumnie z linkami pomocniczymi, obok polityki prywatności/regulaminu — dyskretnie, bez wyróżnienia wizualnego.
|
||||
- Wpisy blogowe mogą linkować do siebie i do /uslugi/[slug] (linkowanie wewnętrzne wzmacnia SEO), ale strony usług/realizacji NIE linkują z powrotem do bloga w widocznych miejscach — blog ma zasilać resztę strony ruchem, nie odwrotnie.
|
||||
- Tematyka wpisów: praktyczne pytania klientów przed budową/remontem (koszty, formalności, wybór wykonawcy, etapy budowy, uprawnienia kierownika budowy) — treści odpowiadające realnym zapytaniom, nie treści czysto reklamowe.
|
||||
|
||||
## Nawigacja / Header
|
||||
|
||||
- Header sticky przy scrollu, subtelny cień/tło po przewinięciu.
|
||||
- Kolejność w menu: Logo → Usługi → Realizacje → Referencje → O nas → Kontakt, CTA "Zadzwoń" / "Wycena" po prawej (wyróżniony przycisk).
|
||||
- Blog nie wchodzi do tego menu (patrz wyżej).
|
||||
- Numer telefonu widoczny w headerze na desktopie.
|
||||
- Mobile: hamburger menu, pełnoekranowe lub slide-in, z animacją.
|
||||
|
||||
## Stopka (Footer)
|
||||
|
||||
- Kolumna 1: dane kontaktowe (adres, NIP, tel., e-mail, godziny pracy).
|
||||
- Kolumna 2: linki do głównych podstron (Usługi, Realizacje, Referencje, O nas, Kontakt).
|
||||
- Kolumna 3: linki pomocnicze — Blog, Polityka prywatności, Regulamin.
|
||||
- Social media (LinkedIn/Facebook jeśli dotyczy).
|
||||
|
||||
## SEO — techniczne podstawy
|
||||
|
||||
- Każda strona: unikalny title (50–60 znaków) i meta description (140–160 znaków), zawierające frazę usługa + lokalizacja/zasięg.
|
||||
- sitemap.xml i robots.txt generowane automatycznie (Next.js app/sitemap.ts, app/robots.ts).
|
||||
- Canonical URL na każdej stronie.
|
||||
- Open Graph + Twitter Card (title, description, image) na każdej stronie, w tym na wpisach blogowych.
|
||||
- Nagłówki zgodnie z hierarchią H1→H2→H3 (patrz sekcja "Struktura nagłówków").
|
||||
- Obrazy: alt opisowy (nie "image1.jpg"), skompresowane, WebP/AVIF.
|
||||
|
||||
## GEO (widoczność w odpowiedziach AI) — dodatkowe zasady
|
||||
|
||||
- Dane firmy oznaczone strukturalnie przez schema.org JSON-LD: LocalBusiness (lub GeneralContractor) na stronie głównej/kontakt, Person dla Kierownika Projektu na /o-nas (imię, stanowisko, uprawnienia), Review/AggregateRating na /referencje jeśli macie oceny, FAQPage na stronach, gdzie są pytania i odpowiedzi.
|
||||
- Wpisy blogowe i strony usług formułowane tak, by odpowiedź na konkretne pytanie była samodzielnym, jasnym akapitem blisko początku treści (modele AI wyciągają zwięzłe fragmenty jako cytowalne odpowiedzi) — nie chowaj konkretów na końcu długiego wstępu.
|
||||
- Sekcja FAQ (pytania i odpowiedzi) na stronach usług i na wybranych wpisach blogowych — krótkie, konkretne odpowiedzi (2–4 zdania), oznaczone FAQPage schema.
|
||||
- Konsekwentne, jednoznaczne dane firmowe (nazwa, adres, NIP, zakres usług) identyczne we wszystkich miejscach na stronie i w Google Business Profile — rozbieżności obniżają wiarygodność zarówno dla wyszukiwarek, jak i modeli AI.
|
||||
- Unikać treści czysto marketingowych bez konkretów — modele AI i wyszukiwarki premiują odpowiedzi z faktami, liczbami, zakresem prac, a nie ogólnikami typu "profesjonalizm i jakość".
|
||||
|
||||
## Struktura nagłówków
|
||||
|
||||
- Jeden H1 na stronę.
|
||||
- H2 dla głównych sekcji (np. "Nasze usługi", "Zrealizowane inwestycje", "Referencje", "Kontakt").
|
||||
- H3 dla podpunktów wewnątrz sekcji.
|
||||
- Nie pomijaj poziomów.
|
||||
- Hero: H1 + krótki lead (max 2 zdania) + CTA "Bezpłatna wycena".
|
||||
|
||||
## Sekcja Hero — wideo
|
||||
|
||||
- Wideo w tle (autoplay, muted, loop) z fallbackiem na statyczny obraz (poster) — wideo dostarczysz później.
|
||||
- Na mobile: zamiana wideo na statyczny obraz dla wydajności i transferu danych, chyba że plik jest bardzo lekki.
|
||||
- Nad/na wideo: H1 + lead + CTA, z czytelnym kontrastem (overlay/gradient jeśli trzeba).
|
||||
|
||||
## Ton wizualny
|
||||
|
||||
- Styl korporacyjno-techniczny — stanowisko zarządzające (Kierownik Projektu), nie wykonawca z placu budowy. Estetyka bliższa biuru inżynierskiemu/kancelarii niż budowie: stonowana, poważna, minimalistyczna.
|
||||
- Paleta: głęboki granat/stalowy niebieski jako kolor główny/akcentowy, grafit i biel jako baza, bez jaskrawych barw.
|
||||
- Zdjęcia: portret/sylwetka Kierownika Projektu w profesjonalnym anturażu (garnitur/kask na budowie w roli nadzorczej), zdjęcia z lotu ptaka/architektoniczne ujęcia.
|
||||
- Ikony i detale: precyzyjne, techniczne (linie, siatki, plany) zamiast motywów przemysłowych.
|
||||
|
||||
## Obsługa formularzy
|
||||
|
||||
- Wysyłka wiadomości mailowych (np. przez Resend).
|
||||
- Brak klasycznej bazy danych (Supabase usunięte z projektu).
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
trigger: always_on
|
||||
---
|
||||
|
||||
# Code review przed commitem
|
||||
|
||||
1. Sprawdź strukturę plików — czy nowy kod trzyma się konwencji z global i workspace rules.
|
||||
2. Sprawdź czy nie ma zduplikowanej logiki, którą można wydzielić do /lib lub hooków.
|
||||
3. Sprawdź dostępność: aria-labels na ikonach bez tekstu, alt na obrazach, kontrast tekstu.
|
||||
4. Sprawdź responsywność na 3 breakpointach (375px, 768px, 1440px).
|
||||
5. Sprawdź czy nie ma nieużywanego kodu/importów.
|
||||
6. Wypisz listę znalezionych problemów z podziałem na: krytyczne / warto poprawić / kosmetyczne.
|
||||
7. Zapytaj, czy poprawić od razu, czy tylko raportujesz.
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
trigger: always_on
|
||||
---
|
||||
|
||||
# Deploy
|
||||
|
||||
1. Uruchom build lokalnie (npm run build) i sprawdź czy przechodzi bez błędów.
|
||||
2. Sprawdź, czy nie ma console.error/console.warn w kodzie produkcyjnym.
|
||||
3. Sprawdź responsywność kluczowych stron (/, /uslugi, /realizacje, /kontakt) na mobile i desktop.
|
||||
4. Zweryfikuj, że żadne klucze API/sekrety nie są zahardkodowane w kodzie.
|
||||
5. Sprawdź działanie formularza kontaktowego/wyceny (czy leady faktycznie trafiają tam gdzie trzeba).
|
||||
6. Zrób commit z opisowym komunikatem.
|
||||
7. Wypchnij zmiany (git push) i potwierdź deploy na Vercel.
|
||||
8. Podaj link do żywej wersji i krótkie podsumowanie co się zmieniło.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
trigger: always_on
|
||||
---
|
||||
|
||||
# Naprawa buga
|
||||
|
||||
1. Zapytaj o dokładny opis błędu: co się dzieje, czego się spodziewano, na jakiej stronie/urządzeniu.
|
||||
2. Zlokalizuj przyczynę w kodzie zanim zaczniesz cokolwiek zmieniać — wypisz hipotezę przyczyny.
|
||||
3. Zaproponuj minimalną poprawkę, nie refaktoryzuj przy okazji niepowiązanego kodu.
|
||||
4. Zaimplementuj poprawkę.
|
||||
5. Sprawdź, czy poprawka nie psuje niczego innego na powiązanych stronach.
|
||||
6. Sprawdź na mobile i desktop.
|
||||
7. Podsumuj: co było przyczyną, co zostało zmienione, w których plikach.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
trigger: always_on
|
||||
---
|
||||
|
||||
# Nowa realizacja (portfolio)
|
||||
|
||||
1. Zapytaj o: nazwę inwestycji, lokalizację, zakres prac, zdjęcia (przed/po jeśli są), datę realizacji.
|
||||
2. Utwórz plik w /app/realizacje/[slug]/page.tsx.
|
||||
3. Zbuduj układ: galeria zdjęć na górze → opis inwestycji (H1) → zakres prac (H2, lista) → lokalizacja.
|
||||
4. Dodaj kartę tej realizacji do siatki na /realizacje (miniatura + tytuł + skrócony opis).
|
||||
5. Zoptymalizuj obrazy (kompresja, lazy loading, alt text z opisem realizacji).
|
||||
6. Sprawdź responsywność galerii na mobile.
|
||||
7. Pokaż podsumowanie zmian przed commitem.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
trigger: always_on
|
||||
---
|
||||
|
||||
# Nowa podstrona usługi
|
||||
|
||||
1. Zapytaj o: nazwę usługi, krótki opis (2-3 zdania), zakres prac (lista punktów), czy są zdjęcia do dodania.
|
||||
2. Utwórz plik w /app/uslugi/[slug]/page.tsx zgodnie ze strukturą sitemap z workspace rules.
|
||||
3. Ustaw unikalny title i meta description pod SEO (fraza: nazwa usługi + lokalizacja/zasięg firmy).
|
||||
4. Zbuduj sekcje: Hero (H1 + lead + CTA wycena) → Zakres prac (H2) → Galeria/proces realizacji (H2) → CTA końcowe.
|
||||
5. Dodaj link do nowej usługi w liście na /uslugi oraz w menu nawigacyjnym, jeśli to usługa główna.
|
||||
6. Sprawdź responsywność (mobile/desktop) i brak console.error.
|
||||
7. Pokaż podsumowanie zmian przed commitem.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
trigger: always_on
|
||||
---
|
||||
|
||||
# Audyt SEO
|
||||
|
||||
1. Sprawdź czy każda podstrona ma unikalny title (50-60 znaków) i meta description (140-160 znaków).
|
||||
2. Sprawdź strukturę nagłówków — dokładnie jeden H1 na stronę, logiczna hierarchia H2/H3 bez pominiętych poziomów.
|
||||
3. Sprawdź czy wszystkie obrazy mają uzupełniony alt.
|
||||
4. Sprawdź czy URL-e są w kebab-case, po polsku bez ogonków, zgodne z sitemap.
|
||||
5. Sprawdź czy strona ma plik sitemap.xml i robots.txt.
|
||||
6. Sprawdź czy jest ustawiony canonical URL i podstawowe Open Graph tagi (title, description, image) do udostępniania w social media.
|
||||
7. Wypisz listę braków z priorytetem (krytyczne dla SEO / nice-to-have).
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
description: Aktualizacja danych kontaktowych/firmowych we wszystkich miejscach na stronie.
|
||||
---
|
||||
|
||||
# Aktualizacja danych firmy
|
||||
|
||||
1. Zapytaj dokładnie co się zmienia: adres, telefon, e-mail, NIP, godziny pracy, link do social media.
|
||||
2. Znajdź WSZYSTKIE miejsca w kodzie, gdzie te dane występują (header, footer, strona kontakt, dane strukturalne/schema.org, stopka formularza) — nie zakładaj, że są w jednym miejscu.
|
||||
3. Najlepiej trzymaj te dane w jednym pliku konfiguracyjnym (np. /lib/company-info.ts), żeby przy kolejnej zmianie edytować tylko jedno miejsce — jeśli tak jeszcze nie jest, zaproponuj taką refaktoryzację.
|
||||
4. Zaktualizuj wszystkie wystąpienia.
|
||||
5. Sprawdź czy mapka (jeśli jest osadzona) też wskazuje poprawny adres.
|
||||
6. Pokaż listę zmienionych plików przed commitem.
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
description: Dodanie opinii klienta do sekcji Opinie i ewentualnie na stronę główną.
|
||||
---
|
||||
|
||||
# Nowa opinia klienta
|
||||
|
||||
1. Zapytaj o: imię/nazwę klienta (lub inicjały jeśli anonimowo), treść opinii, ocenę (jeśli dotyczy), nazwę zrealizowanej inwestycji (jeśli powiązana z konkretną realizacją).
|
||||
2. Dodaj opinię do sekcji/strony Opinie zgodnie z istniejącym układem (karta: cytat + autor + ewentualnie link do realizacji).
|
||||
3. Jeśli opinie są renderowane też na stronie głównej jako karuzela/wycinek — zaktualizuj i tam.
|
||||
4. Sprawdź responsywność nowej karty na mobile.
|
||||
5. Pokaż podgląd zmiany przed commitem.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
description: Dodanie nowego projektu do portfolio realizacji — galeria, opis, zakres, lokalizacja.
|
||||
---
|
||||
|
||||
# Nowa realizacja (portfolio)
|
||||
|
||||
1. Zapytaj o: nazwę inwestycji, lokalizację, zakres prac, zdjęcia (przed/po jeśli są), datę realizacji.
|
||||
2. Utwórz plik w /app/realizacje/[slug]/page.tsx.
|
||||
3. Zbuduj układ: galeria zdjęć na górze → opis inwestycji (H1) → zakres prac (H2, lista) → lokalizacja.
|
||||
4. Dodaj kartę tej realizacji do siatki na /realizacje (miniatura + tytuł + skrócony opis).
|
||||
5. Zoptymalizuj obrazy (kompresja, lazy loading, alt text z opisem realizacji).
|
||||
6. Sprawdź responsywność galerii na mobile.
|
||||
7. Pokaż podsumowanie zmian przed commitem.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
description: Dodanie nowej podstrony usługi budowlanej — opis, zakres prac, SEO, link w menu.
|
||||
---
|
||||
|
||||
# Nowa podstrona usługi
|
||||
|
||||
1. Zapytaj o: nazwę usługi, krótki opis (2-3 zdania), zakres prac (lista punktów), czy są zdjęcia do dodania.
|
||||
2. Utwórz plik w /app/uslugi/[slug]/page.tsx zgodnie ze strukturą sitemap z workspace rules.
|
||||
3. Ustaw unikalny title i meta description pod SEO (fraza: nazwa usługi + lokalizacja/zasięg firmy).
|
||||
4. Zbuduj sekcje: Hero (H1 + lead + CTA wycena) → Zakres prac (H2) → Galeria/proces realizacji (H2) → CTA końcowe.
|
||||
5. Dodaj link do nowej usługi w liście na /uslugi oraz w menu nawigacyjnym, jeśli to usługa główna.
|
||||
6. Sprawdź responsywność (mobile/desktop) i brak console.error.
|
||||
7. Pokaż podsumowanie zmian przed commitem.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
description: Audyt SEO strony — title, meta description, nagłówki, alt, sitemap.xml.
|
||||
---
|
||||
|
||||
# Test formularza kontaktowego
|
||||
|
||||
1. Sprawdź walidację pól po stronie klienta (wymagane pola, format e-maila, format telefonu).
|
||||
2. Sprawdź walidację po stronie serwera (nie ufaj tylko frontendowi).
|
||||
3. Wyślij testowe zgłoszenie i sprawdź, czy trafia tam gdzie powinno (e-mail/baza danych/Supabase).
|
||||
4. Sprawdź komunikaty dla użytkownika: sukces, błąd walidacji, błąd wysyłki.
|
||||
5. Sprawdź czy formularz zabezpieczony jest przed spamem (honeypot/rate limiting) — jeśli nie, zaproponuj dodanie.
|
||||
6. Sprawdź responsywność formularza na mobile.
|
||||
7. Zgłoś wszystkie znalezione problemy przed poprawkami.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
description: Test formularza kontaktowego/wyceny — walidacja, dostarczanie, zabezpieczenie przed spamem.
|
||||
---
|
||||
|
||||
# Test formularza kontaktowego
|
||||
|
||||
1. Sprawdź walidację pól po stronie klienta (wymagane pola, format e-maila, format telefonu).
|
||||
2. Sprawdź walidację po stronie serwera (nie ufaj tylko frontendowi).
|
||||
3. Wyślij testowe zgłoszenie i sprawdź, czy trafia tam gdzie powinno (e-mail/baza danych/Supabase).
|
||||
4. Sprawdź komunikaty dla użytkownika: sukces, błąd walidacji, błąd wysyłki.
|
||||
5. Sprawdź czy formularz zabezpieczony jest przed spamem (honeypot/rate limiting) — jeśli nie, zaproponuj dodanie.
|
||||
6. Sprawdź responsywność formularza na mobile.
|
||||
7. Zgłoś wszystkie znalezione problemy przed poprawkami.
|
||||
@@ -0,0 +1,2 @@
|
||||
# Zmienne środowiskowe dla Resend (obsługa formularzy)
|
||||
RESEND_API_KEY=your_resend_api_key
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["next/core-web-vitals", "next/typescript"]
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
.yarn/install-state.gz
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
@@ -0,0 +1,36 @@
|
||||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
bun dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,43 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@keyframes custom-marquee {
|
||||
0% { transform: translateX(0); }
|
||||
100% { transform: translateX(-50%); }
|
||||
}
|
||||
|
||||
.animate-custom-marquee {
|
||||
animation: custom-marquee 40s linear infinite;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
/* Skala Typografii z Workspace Rules - Responsywna */
|
||||
h1 {
|
||||
@apply text-h1-mobile md:text-h1-tablet lg:text-h1-desktop font-heading text-brand-text;
|
||||
}
|
||||
|
||||
h2 {
|
||||
@apply text-h2-mobile md:text-h2-tablet lg:text-h2-desktop font-heading text-brand-text;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@apply text-h3-mobile md:text-h3-tablet lg:text-h3-desktop font-heading text-brand-text;
|
||||
}
|
||||
|
||||
h4 {
|
||||
@apply text-h4-mobile md:text-h4-tablet lg:text-h4-desktop font-heading text-brand-text;
|
||||
}
|
||||
|
||||
p, body {
|
||||
@apply text-body-mobile lg:text-body-desktop font-body text-brand-muted;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
/* Wymuszenie grayscale antialiasing na systemach Windows, aby zapobiec kolorowemu fringingowi (ClearType) na małych czcionkach mono */
|
||||
text-shadow: 0 0 1px rgba(0,0,0,0.01);
|
||||
}
|
||||
|
||||
small, caption {
|
||||
@apply text-small-mobile lg:text-small-desktop font-body text-brand-muted;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Inter, Space_Grotesk, JetBrains_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { Header } from "@/components/layout/Header";
|
||||
import { Footer } from "@/components/layout/Footer";
|
||||
|
||||
const inter = Inter({
|
||||
subsets: ["latin-ext"],
|
||||
display: "swap",
|
||||
variable: "--font-inter",
|
||||
weight: ["400", "500", "600"],
|
||||
});
|
||||
|
||||
const spaceGrotesk = Space_Grotesk({
|
||||
subsets: ["latin-ext"],
|
||||
display: "swap",
|
||||
variable: "--font-heading",
|
||||
weight: ["500", "600", "700"],
|
||||
});
|
||||
|
||||
const jetbrainsMono = JetBrains_Mono({
|
||||
subsets: ["latin-ext"],
|
||||
display: "swap",
|
||||
variable: "--font-mono",
|
||||
weight: ["400", "500"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "BNT Budownictwo",
|
||||
description: "Generalny wykonawca inwestycji budowlanych",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="pl">
|
||||
<body className={`${inter.variable} ${spaceGrotesk.variable} ${jetbrainsMono.variable} font-body bg-brand-bg text-brand-text antialiased flex flex-col min-h-screen overflow-x-hidden`}>
|
||||
<Header />
|
||||
<main className="flex-grow">
|
||||
{children}
|
||||
</main>
|
||||
<Footer />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
import FuzzyText from "@/components/ui/FuzzyText";
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<main className="min-h-screen bg-brand-deepDark relative z-10 flex flex-col items-center justify-center overflow-hidden">
|
||||
|
||||
{/* Subtelne tło - ciemna przestrzeń z ledwo widocznym detalem */}
|
||||
<div className="absolute inset-0 overflow-hidden pointer-events-none">
|
||||
<div className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-brand-primary/5 rounded-full blur-[120px] opacity-30" />
|
||||
</div>
|
||||
|
||||
<div className="relative z-10 flex flex-col items-center text-center px-4">
|
||||
|
||||
{/* Komponent FuzzyText */}
|
||||
<FuzzyText
|
||||
fontSize="clamp(4rem, 20vw, 14rem)"
|
||||
fontWeight={700}
|
||||
fontFamily="inherit"
|
||||
color="#ffffff"
|
||||
baseIntensity={0.12}
|
||||
hoverIntensity={0.45}
|
||||
direction="horizontal"
|
||||
transitionDuration={8}
|
||||
enableHover={true}
|
||||
className="mb-8 font-heading"
|
||||
>
|
||||
404
|
||||
</FuzzyText>
|
||||
|
||||
{/* Tekst pod błędem */}
|
||||
<div className="font-mono text-small-mobile tracking-widest text-slate-300 mb-6 uppercase">
|
||||
Błąd 404
|
||||
</div>
|
||||
<p className="text-[1.25rem] md:text-[1.5rem] text-slate-300 max-w-2xl font-light leading-relaxed mb-12">
|
||||
Strona, której szukasz, nie istnieje lub została przeniesiona.
|
||||
</p>
|
||||
|
||||
{/* CTAs */}
|
||||
<div className="flex flex-col sm:flex-row items-center gap-6">
|
||||
<Button variant="primary" size="lg" href="/">
|
||||
Wróć na stronę główną
|
||||
</Button>
|
||||
<Link
|
||||
href="/uslugi"
|
||||
className="group flex items-center text-[1.125rem] text-slate-300 hover:text-white transition-colors duration-300 font-medium"
|
||||
>
|
||||
Zobacz nasze usługi
|
||||
<ArrowRight className="w-5 h-5 ml-2 transform group-hover:translate-x-1 transition-transform duration-300" />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
+396
@@ -0,0 +1,396 @@
|
||||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
import { AnimatedCounter } from "@/components/ui/AnimatedCounter";
|
||||
import { Reveal } from "@/components/ui/Reveal";
|
||||
import { Accordion } from "@/components/ui/Accordion";
|
||||
import { ProcessTimeline } from "@/components/ui/ProcessTimeline";
|
||||
import { ImageWithSkeleton } from "@/components/ui/ImageWithSkeleton";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import ScrollExpand from "@/components/ui/ScrollExpand";
|
||||
import { SectionHeader } from "@/components/ui/SectionHeader";
|
||||
import { fixOrphans } from "@/lib/typography";
|
||||
import { TechCorners } from "@/components/ui/TechCorners";
|
||||
import { TechTag } from "@/components/ui/TechTag";
|
||||
import { services } from "@/lib/data/services";
|
||||
import { realizacje } from "@/lib/data/realizacje";
|
||||
|
||||
export default function HomePage() {
|
||||
return (
|
||||
<>
|
||||
{/* 1. Hero - ScrollExpand */}
|
||||
<section id="hero" className="relative w-full bg-brand-deepDark">
|
||||
<ScrollExpand
|
||||
style={{}}
|
||||
src="https://images.unsplash.com/photo-1541888086425-d81bb19240f5?auto=format&fit=crop&q=80&w=2000" // TODO: Podmienić na nasze realne zdjęcie z budowy/biura (np. plac budowy z lotu ptaka)
|
||||
alt="Plac budowy - generalne wykonawstwo"
|
||||
title="Generalny Wykonawca i Nadzór Inwestorski"
|
||||
scrollHint="Przewiń, aby zobaczyć więcej"
|
||||
useWindowScroll={true}
|
||||
mediaZoom={1.3}
|
||||
overlayScrim={0.5}
|
||||
>
|
||||
<div className="flex flex-col items-center justify-center pt-8 md:pt-16 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 w-full z-10 relative">
|
||||
<div className="max-w-4xl mx-auto flex flex-col items-center text-center">
|
||||
<div className="font-mono text-small-mobile md:text-small-desktop tracking-[0.2em] text-slate-300 mb-4 md:mb-6 uppercase drop-shadow-sm">
|
||||
ZARZĄDZANIE INWESTYCJAMI // WROCŁAW
|
||||
</div>
|
||||
<p className="text-white/90 text-[1.125rem] md:text-[1.5rem] leading-relaxed max-w-2xl mb-8 md:mb-12 font-light drop-shadow-sm text-pretty">
|
||||
{fixOrphans("Bezkompromisowa kontrola nad jakością, harmonogramem i budżetem na każdym etapie budowy.")}
|
||||
</p>
|
||||
<div className="flex flex-col sm:flex-row items-center gap-6">
|
||||
<Button variant="primary" size="md" href="/kontakt">Rozpocznij projekt</Button>
|
||||
<Button variant="secondary" size="md" tone="dark" href="/realizacje">
|
||||
Zobacz realizacje <ArrowRight className="w-4 h-4 ml-2" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ScrollExpand>
|
||||
</section>
|
||||
|
||||
{/* 2. Trust bar - Infinite Marquee */}
|
||||
<section className="w-full bg-brand-surface border-b border-brand-border overflow-hidden relative z-10">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex items-center h-20 md:h-24 w-full">
|
||||
|
||||
{/* Lewa strona - Nieruchoma etykieta */}
|
||||
<div className="flex-shrink-0 pr-3 sm:pr-6 lg:pr-8 border-r border-brand-border/70 h-full flex items-center bg-brand-surface z-10 shadow-[10px_0_15px_-10px_rgba(0,0,0,0.05)] relative">
|
||||
<span className="font-mono text-[10px] sm:text-small-mobile md:text-small-desktop tracking-widest uppercase font-bold text-brand-primary">
|
||||
ZAUFALI NAM:
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Prawa strona - Marquee */}
|
||||
<div className="flex-grow min-w-0 overflow-hidden flex items-center h-full group relative z-0">
|
||||
<div className="flex w-max animate-custom-marquee group-hover:[animation-play-state:paused]">
|
||||
<div className="flex gap-8 sm:gap-12 lg:gap-16 px-4 sm:px-6 lg:px-8 items-center">
|
||||
{[1, 2, 3, 4, 5].map(i => (
|
||||
<div key={`logo-1-${i}`} className="w-36 sm:w-32 lg:w-44 h-12 sm:h-10 lg:h-12 bg-brand-border/50 flex items-center justify-center text-xs sm:text-[10px] md:text-xs lg:text-sm font-mono text-brand-muted/60 uppercase tracking-widest rounded-[2px] transition-all">Logo {i}</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex gap-8 sm:gap-12 lg:gap-16 px-4 sm:px-6 lg:px-8 items-center" aria-hidden="true">
|
||||
{[1, 2, 3, 4, 5].map(i => (
|
||||
<div key={`logo-2-${i}`} className="w-36 sm:w-32 lg:w-44 h-12 sm:h-10 lg:h-12 bg-brand-border/50 flex items-center justify-center text-xs sm:text-[10px] md:text-xs lg:text-sm font-mono text-brand-muted/60 uppercase tracking-widest rounded-[2px] transition-all">Logo {i}</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 3. Usługi - Breathing Section */}
|
||||
<section className="py-24 md:py-32 lg:py-48 w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<SectionHeader
|
||||
eyebrow="Kompetencje"
|
||||
title="Twój interes, nasza odpowiedzialność."
|
||||
lead="Od pierwszego szkicu po końcowe odbiory, bierzemy na siebie pełen ciężar koordynacji, pozwalając Ci skupić się na biznesie."
|
||||
size="xl"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 3.1 Usługi - Grid */}
|
||||
<section className="pb-24 md:pb-32 lg:pb-48 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-6 gap-6 lg:gap-8 items-stretch">
|
||||
{services.map((service, idx) => {
|
||||
const colSpan = idx < 3 ? "lg:col-span-2" : "lg:col-span-3";
|
||||
return (
|
||||
<Reveal key={service.id} delay={0.1 * (idx + 1)} className={`h-full ${colSpan}`}>
|
||||
<div className="group relative bg-white p-8 border border-brand-border/60 shadow-none hover:bg-brand-surface/30 transition-colors duration-300 flex flex-col h-full">
|
||||
<TechCorners />
|
||||
<div className="font-mono text-brand-muted group-hover:text-brand-primary transition-colors text-[1.25rem] mb-6">{service.id}</div>
|
||||
<h3 className="mb-4 text-[1.5rem] md:text-[1.75rem] min-h-[4.5rem] flex items-start text-balance">{fixOrphans(service.title)}</h3>
|
||||
<p className="mb-8 text-brand-muted flex-grow text-pretty">{fixOrphans(service.shortDesc)}</p>
|
||||
<Button variant="secondary" size="sm" href={`/uslugi/${service.slug}`} className="mt-auto w-fit">
|
||||
Dowiedz się więcej <ArrowRight className="w-4 h-4 ml-2" />
|
||||
</Button>
|
||||
</div>
|
||||
</Reveal>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
<Reveal delay={0.4}>
|
||||
<div className="flex justify-center mt-12 lg:mt-16">
|
||||
<Button variant="outline" size="md" href="/kontakt" className="mx-auto lg:mx-0">
|
||||
Nie wiesz, która usługa pasuje do Twojej inwestycji? Porozmawiajmy <ArrowRight className="w-4 h-4 ml-2" />
|
||||
</Button>
|
||||
</div>
|
||||
</Reveal>
|
||||
</section>
|
||||
|
||||
{/* 3.2 Dlaczego my */}
|
||||
<section className="py-24 md:py-32 lg:py-48 bg-zinc-50 border-t border-brand-border/50 w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 w-full flex flex-col items-center">
|
||||
<SectionHeader
|
||||
eyebrow="Wartości"
|
||||
title="Dlaczego my"
|
||||
size="xl"
|
||||
className="mb-8"
|
||||
/>
|
||||
|
||||
<div className="w-full">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 lg:gap-8 items-stretch text-left">
|
||||
{[
|
||||
{ num: "01", title: "Osobisty nadzór na każdym etapie", desc: "Kierownik Projektu osobiście koordynuje i kontroluje przebieg inwestycji, nie zleca tego anonimowemu zespołowi." },
|
||||
{ num: "02", title: "Transparentne rozliczenia", desc: "Jasny harmonogram płatności powiązany z realnym postępem prac, bez ukrytych kosztów." },
|
||||
{ num: "03", title: "Terminowość zapisana w umowie", desc: "Konkretne terminy i konsekwencje ich niedotrzymania, nie ogólnikowe deklaracje." },
|
||||
{ num: "04", title: "Pełna dokumentacja i zgodność prawna", desc: "Kompletna dokumentacja odbiorowa i bezkompromisowa zgodność z przepisami na każdym etapie." },
|
||||
].map((feature, idx) => (
|
||||
<Reveal key={idx} delay={0.1 * (idx + 1)} className="h-full">
|
||||
<div className="group relative bg-white p-6 md:p-8 border border-brand-border/60 shadow-none hover:bg-brand-surface/30 transition-colors duration-300 flex flex-col h-full">
|
||||
<TechCorners />
|
||||
<div className="font-mono text-brand-muted group-hover:text-brand-primary transition-colors text-[1rem] mb-4">{feature.num}</div>
|
||||
<h3 className="mb-3 text-[1.25rem] md:text-[1.35rem] font-heading font-semibold leading-tight text-brand-text text-balance">{fixOrphans(feature.title)}</h3>
|
||||
<p className="text-[0.9375rem] md:text-[1rem] text-brand-muted flex-grow text-pretty leading-relaxed">{fixOrphans(feature.desc)}</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 4. Proces - Breathing Section */}
|
||||
<section className="py-24 md:py-32 lg:py-48 bg-brand-surface border-t border-brand-border w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<SectionHeader
|
||||
eyebrow="Proces"
|
||||
title="Porządek w chaosie budowy."
|
||||
lead="Wdrożyliśmy rygorystyczne standardy zarządzania, dzięki którym każda inwestycja przebiega transparentnie, terminowo i w założonym budżecie."
|
||||
size="xl"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 4.1 Proces - Grid */}
|
||||
<section className="pb-24 md:pb-32 lg:pb-48 bg-brand-surface overflow-hidden">
|
||||
<ProcessTimeline steps={[
|
||||
{ num: "01", title: "Analiza i wycena", desc: "Szczegółowy audyt dokumentacji i rzetelny kosztorys." },
|
||||
{ num: "02", title: "Harmonogram", desc: "Ścieżka krytyczna i logistyka dostaw." },
|
||||
{ num: "03", title: "Realizacja", desc: "Nadzór nad wykonawcami i zgodnością prac." },
|
||||
{ num: "04", title: "Kontrola jakości", desc: "Odbiory zanikające i weryfikacja techniczna." },
|
||||
{ num: "05", title: "Przekazanie", desc: "Końcowa inspekcja i kompletowanie dokumentacji." },
|
||||
]} />
|
||||
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative">
|
||||
<Reveal delay={0.4}>
|
||||
<div className="flex justify-center mt-16 lg:mt-24">
|
||||
<Button variant="secondary" size="md" href="/kontakt" className="mx-auto lg:mx-0">
|
||||
Zobacz jak zaczynamy Twój projekt <ArrowRight className="w-4 h-4 ml-2" />
|
||||
</Button>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 5. Liczniki - Czysta Typografia */}
|
||||
<section className="py-24 md:py-32 lg:py-48 bg-white border-y border-brand-border/50 text-brand-text relative w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 w-full">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-12 lg:gap-8 text-center">
|
||||
|
||||
<Reveal delay={0.1}>
|
||||
<div className="flex flex-col items-center justify-center h-full">
|
||||
<div className="text-[3.5rem] md:text-[4rem] lg:text-[5.5rem] font-heading font-bold text-brand-text leading-none mb-4 tracking-tighter">
|
||||
<AnimatedCounter value={40} suffix="+" />
|
||||
</div>
|
||||
<p className="font-mono text-[0.75rem] md:text-[0.85rem] text-brand-muted uppercase tracking-[0.2em] text-balance">{fixOrphans("Aktywne / Zrealizowane")}</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
<Reveal delay={0.2}>
|
||||
<div className="flex flex-col items-center justify-center h-full">
|
||||
<div className="text-[3.5rem] md:text-[4rem] lg:text-[5.5rem] font-heading font-bold text-brand-text leading-none mb-4 tracking-tighter">
|
||||
<AnimatedCounter value={32} suffix="" />
|
||||
</div>
|
||||
<p className="font-mono text-[0.75rem] md:text-[0.85rem] text-brand-muted uppercase tracking-[0.2em] text-balance">{fixOrphans("Lata Doświadczenia")}</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
<Reveal delay={0.3}>
|
||||
<div className="flex flex-col items-center justify-center h-full">
|
||||
<div className="text-[3.5rem] md:text-[4rem] lg:text-[5.5rem] font-heading font-bold text-brand-text leading-none mb-4 tracking-tighter flex items-baseline">
|
||||
<AnimatedCounter value={800} suffix="" />
|
||||
<span className="text-[1.5rem] md:text-[2rem] ml-2 tracking-normal">mln zł</span>
|
||||
</div>
|
||||
<p className="font-mono text-[0.75rem] md:text-[0.85rem] text-brand-muted uppercase tracking-[0.2em] text-balance">{fixOrphans("Łączna wartość inwestycji")}</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
<Reveal delay={0.4}>
|
||||
<div className="flex flex-col items-center justify-center h-full">
|
||||
<div className="text-[3.5rem] md:text-[4rem] lg:text-[5.5rem] font-heading font-bold text-brand-primary leading-none mb-4 tracking-tighter">
|
||||
<AnimatedCounter value={100} suffix="%" />
|
||||
</div>
|
||||
<p className="font-mono text-[0.75rem] md:text-[0.85rem] text-brand-muted uppercase tracking-[0.2em] text-balance">{fixOrphans("Gotowość Operacyjna")}</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 6. Realizacje - Breathing Section */}
|
||||
<section className="py-24 md:py-32 lg:py-48 w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<SectionHeader
|
||||
eyebrow="Portfolio"
|
||||
title="Dowody, nie obietnice."
|
||||
lead="Przestrzenie przemysłowe i komercyjne, które zrealizowaliśmy, każdego dnia pracują na sukces biznesowy naszych klientów."
|
||||
size="xl"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 6.1 Realizacje - Grid */}
|
||||
<section className="pb-24 md:pb-32 lg:pb-48 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 lg:gap-8 mb-12 lg:mb-16">
|
||||
{realizacje.filter(p => p.featured).slice(0, 4).map((project, idx) => (
|
||||
<Reveal key={project.id} delay={0.1 * (idx + 1)}>
|
||||
<Link href={`/realizacje/${project.slug}`} className="group block relative border border-brand-border/40 p-6 lg:p-8 shadow-none bg-white">
|
||||
<TechCorners />
|
||||
<ImageWithSkeleton
|
||||
src={project.mainImg}
|
||||
alt={project.title}
|
||||
wrapperClassName="aspect-[16/9] bg-zinc-200 mb-6 relative"
|
||||
className="w-full h-full object-cover grayscale group-hover:grayscale-0 transition-all duration-500 ease-out"
|
||||
/>
|
||||
|
||||
<div className="mb-4">
|
||||
<TechTag className="inline-flex">{project.type} // {project.year}</TechTag>
|
||||
</div>
|
||||
|
||||
<h3 className="mb-3 text-[1.5rem] md:text-[1.75rem] group-hover:text-brand-primary transition-colors text-balance">{fixOrphans(project.title)}</h3>
|
||||
<p className="text-brand-muted text-pretty text-[1rem] leading-relaxed">{fixOrphans(project.shortDesc)}</p>
|
||||
</Link>
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Reveal delay={0.4}>
|
||||
<div className="flex flex-col sm:flex-row items-center justify-center gap-4">
|
||||
<Button variant="secondary" size="md" href="/realizacje" className="w-full sm:w-auto">
|
||||
Zobacz wszystkie realizacje <ArrowRight className="w-5 h-5 ml-2" />
|
||||
</Button>
|
||||
<Button variant="primary" size="md" href="/kontakt" className="w-full sm:w-auto">
|
||||
Umów bezpłatną konsultację
|
||||
</Button>
|
||||
</div>
|
||||
</Reveal>
|
||||
</section>
|
||||
|
||||
{/* 6.2 FAQ */}
|
||||
<section className="py-24 md:py-32 lg:py-48 bg-white border-t border-brand-border/50 w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 w-full">
|
||||
<div className="max-w-3xl mx-auto">
|
||||
<SectionHeader
|
||||
eyebrow="FAQ"
|
||||
title="Najczęściej zadawane pytania"
|
||||
align="center"
|
||||
size="lg"
|
||||
className="mb-12"
|
||||
/>
|
||||
<Reveal delay={0.2}>
|
||||
<Accordion items={[
|
||||
{
|
||||
question: "Ile kosztuje wycena i czy jest bezpłatna?",
|
||||
answer: "Wstępna wycena oraz audyt dokumentacji są całkowicie bezpłatne i niezobowiązujące. Dopiero po akceptacji warunków przechodzimy do podpisania umowy."
|
||||
},
|
||||
{
|
||||
question: "Jak długo trwa realizacja typowej inwestycji?",
|
||||
answer: "Czas trwania zależy od skali projektu, jednak dla standardowych hal magazynowych czy mniejszych obiektów komercyjnych wynosi średnio od 6 do 12 miesięcy."
|
||||
},
|
||||
{
|
||||
question: "Jaki jest zakres nadzoru inwestorskiego?",
|
||||
answer: "Nadzór obejmuje m.in. kontrolę jakości wykonywanych robót, weryfikację kosztorysów, odbiory częściowe oraz dbanie o zgodność z projektem i przepisami Prawa Budowlanego."
|
||||
},
|
||||
{
|
||||
question: "Na jakim obszarze działacie?",
|
||||
answer: "Realizujemy inwestycje na terenie całego kraju, ze szczególnym uwzględnieniem województwa dolnośląskiego, wielkopolskiego i mazowieckiego."
|
||||
},
|
||||
{
|
||||
question: "Co się dzieje, jeśli harmonogram się opóźni?",
|
||||
answer: "Wszelkie terminy oraz ewentualne konsekwencje ich niedotrzymania (kary umowne) są rygorystycznie określone w umowie. Chroni to Inwestora przed nieuzasadnionymi przestojami."
|
||||
}
|
||||
]} />
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 7. Referencje */}
|
||||
<section className="py-24 md:py-32 lg:py-48 bg-brand-surface border-y border-brand-border/50 w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 w-full">
|
||||
|
||||
<div className="mb-16 lg:mb-24">
|
||||
<SectionHeader
|
||||
eyebrow="Rekomendacje"
|
||||
title="Głosy naszych inwestorów."
|
||||
size="lg"
|
||||
delay={0.1}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-12 lg:gap-16 mb-16">
|
||||
{[
|
||||
{
|
||||
quote: "Współpraca z BNT charakteryzowała się wysoką kulturą techniczną. Dostarczyli precyzyjne raporty i optymalizacje, które przełożyły się na realne oszczędności finansowe.",
|
||||
name: "Jan Kowalski",
|
||||
role: "Prezes Zarządu, ABC Inwestycje"
|
||||
},
|
||||
{
|
||||
quote: "Pełen profesjonalizm i dbałość o detale. Przez cały proces budowy mieliśmy poczucie pełnej kontroli nad inwestycją. Zdecydowanie polecamy BNT jako zaufanego partnera.",
|
||||
name: "Michał Nowak",
|
||||
role: "Dyrektor ds. Rozwoju, Logistics Group"
|
||||
},
|
||||
{
|
||||
quote: "Terminowość i transparentność kosztów to największe atuty BNT. Reagowali na wyzwania projektowe natychmiastowo, co pozwoliło uniknąć opóźnień i przestojów na budowie.",
|
||||
name: "Anna Wiśniewska",
|
||||
role: "Członek Zarządu, Developer Sp. z o.o."
|
||||
}
|
||||
].map((testimonial, idx) => (
|
||||
<Reveal key={idx} delay={0.1 * (idx + 1)} className="h-full">
|
||||
<div className="flex flex-col h-full pl-6 md:pl-8 border-l border-brand-border hover:border-brand-primary transition-colors duration-300 relative group">
|
||||
<p className="text-[1.125rem] md:text-[1.25rem] italic text-brand-text leading-relaxed font-light mb-8 flex-grow text-pretty">
|
||||
{fixOrphans(`"${testimonial.quote}"`)}
|
||||
</p>
|
||||
<div>
|
||||
<p className="font-heading font-semibold text-[1rem] md:text-[1.125rem] text-brand-text uppercase tracking-wide text-balance">{fixOrphans(testimonial.name)}</p>
|
||||
<p className="font-mono text-[0.75rem] text-brand-muted uppercase tracking-widest mt-1 text-balance">{fixOrphans(testimonial.role)}</p>
|
||||
</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Reveal delay={0.4}>
|
||||
<div className="flex justify-center">
|
||||
<Button variant="secondary" size="md" href="/referencje" className="mx-auto lg:mx-0">
|
||||
Czytaj pełne referencje <ArrowRight className="w-4 h-4 ml-2" />
|
||||
</Button>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 8. CTA Końcowe */}
|
||||
<section className="py-32 md:py-48 lg:py-56 bg-brand-deepDark text-center relative overflow-hidden w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 w-full relative z-10 flex flex-col items-center">
|
||||
<SectionHeader
|
||||
title="Zaplanujmy Twoją inwestycję"
|
||||
lead="Skontaktuj się w celu omówienia technicznych i finansowych aspektów Twojego projektu. Zapewniamy profesjonalny audyt i rzetelną wycenę."
|
||||
theme="dark"
|
||||
size="xl"
|
||||
className="mb-10 md:mb-12"
|
||||
/>
|
||||
<Reveal delay={0.4}>
|
||||
<Button variant="primary" size="lg" href="/kontakt">Porozmawiajmy o projekcie</Button>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import React from "react";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
|
||||
export default function PreviewPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-brand-bg p-8 md:p-16">
|
||||
<div className="max-w-4xl mx-auto space-y-16">
|
||||
|
||||
<header>
|
||||
<h1 className="mb-2">Button Component Preview</h1>
|
||||
<p className="text-body-medium">Koncepcja: solidność, inżynierski charakter, ostre krawędzie.</p>
|
||||
</header>
|
||||
|
||||
<section className="space-y-6">
|
||||
<h2>Warianty (Rozmiar: md)</h2>
|
||||
<div className="flex flex-wrap gap-4 items-end bg-brand-surface p-6 rounded-sm border border-brand-border">
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Primary</small>
|
||||
<Button variant="primary">Wycena projektu</Button>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Secondary</small>
|
||||
<Button variant="secondary">Zobacz realizacje</Button>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Outline</small>
|
||||
<Button variant="secondary">Skontaktuj się z nami</Button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="space-y-6">
|
||||
<h2>Rozmiary (Wariant: primary)</h2>
|
||||
<div className="flex flex-wrap gap-6 items-end bg-brand-surface p-6 rounded-sm border border-brand-border">
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Small (sm)</small>
|
||||
<Button size="sm">Zapisz się</Button>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Medium (md)</small>
|
||||
<Button size="md">Bezpłatna wycena</Button>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Large (lg)</small>
|
||||
<Button size="lg">Rozpocznij Inwestycję</Button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="space-y-6">
|
||||
<h2>Stany i Mikrointerakcje (Primary, md)</h2>
|
||||
<div className="flex flex-wrap gap-6 items-end bg-brand-surface p-6 rounded-sm border border-brand-border">
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Default / Hover / Active</small>
|
||||
<Button>Kliknij mnie</Button>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Disabled</small>
|
||||
<Button disabled>Opcja niedostępna</Button>
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<small>Loading (isLoading)</small>
|
||||
<Button isLoading>Przetwarzanie...</Button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { ArrowRight, ArrowLeft } from "lucide-react";
|
||||
import { realizacje } from "@/lib/data/realizacje";
|
||||
import { SectionHeader } from "@/components/ui/SectionHeader";
|
||||
import { TechTag } from "@/components/ui/TechTag";
|
||||
import { Reveal } from "@/components/ui/Reveal";
|
||||
import { AnimatedCounter } from "@/components/ui/AnimatedCounter";
|
||||
import { ImageWithSkeleton } from "@/components/ui/ImageWithSkeleton";
|
||||
import { fixOrphans } from "@/lib/typography";
|
||||
import { TechCorners } from "@/components/ui/TechCorners";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
|
||||
interface PageProps {
|
||||
params: {
|
||||
slug: string;
|
||||
};
|
||||
}
|
||||
|
||||
export function generateStaticParams() {
|
||||
return realizacje.map((project) => ({
|
||||
slug: project.slug,
|
||||
}));
|
||||
}
|
||||
|
||||
export function generateMetadata({ params }: PageProps) {
|
||||
const project = realizacje.find((p) => p.slug === params.slug);
|
||||
if (!project) return { title: "Nie znaleziono realizacji | BNT Budownictwo" };
|
||||
|
||||
return {
|
||||
title: `${project.title} | Realizacje BNT Budownictwo`,
|
||||
description: project.shortDesc,
|
||||
};
|
||||
}
|
||||
|
||||
export default function RealizacjaPage({ params }: PageProps) {
|
||||
const projectIndex = realizacje.findIndex((p) => p.slug === params.slug);
|
||||
const project = realizacje[projectIndex];
|
||||
|
||||
if (!project) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const prevProject = projectIndex > 0 ? realizacje[projectIndex - 1] : null;
|
||||
const nextProject = projectIndex < realizacje.length - 1 ? realizacje[projectIndex + 1] : null;
|
||||
|
||||
// Parzyste: tekst z lewej (flex-row), Nieparzyste: tekst z prawej (flex-row-reverse)
|
||||
const isImageRight = projectIndex % 2 === 0;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen">
|
||||
{/* 1. Hero */}
|
||||
<section className="pt-32 pb-24 md:pt-48 md:pb-32 lg:pt-56 lg:pb-48 bg-brand-deepDark w-full relative overflow-hidden">
|
||||
<div className="absolute inset-0 z-0 opacity-20">
|
||||
<ImageWithSkeleton
|
||||
src={project.mainImg}
|
||||
alt={project.title}
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-brand-deepDark/80" />
|
||||
</div>
|
||||
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 w-full">
|
||||
<Reveal>
|
||||
<div className="font-mono text-small-mobile tracking-widest text-brand-muted uppercase mb-8">
|
||||
<Link href="/" className="hover:text-white transition-colors">Strona główna</Link>
|
||||
<span className="mx-3 opacity-50">/</span>
|
||||
<Link href="/realizacje" className="hover:text-white transition-colors">Realizacje</Link>
|
||||
<span className="mx-3 opacity-50">/</span>
|
||||
<span className="text-white">{project.title}</span>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
<SectionHeader
|
||||
title={project.title}
|
||||
lead={project.shortDesc}
|
||||
theme="dark"
|
||||
align="left"
|
||||
size="xl"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 2. Statystyki */}
|
||||
<section className="py-16 md:py-24 bg-white border-b border-brand-border/50 relative w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 w-full">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-3 gap-12 lg:gap-8 text-center divide-y sm:divide-y-0 sm:divide-x divide-brand-border/40">
|
||||
{project.stats.map((stat, idx) => (
|
||||
<Reveal key={idx} delay={0.1 * (idx + 1)}>
|
||||
<div className="flex flex-col items-center justify-center h-full pt-8 sm:pt-0">
|
||||
<div className="text-[3rem] md:text-[3.5rem] lg:text-[4.5rem] font-heading font-bold text-brand-text leading-none mb-4 tracking-tighter">
|
||||
{stat.isNumber ? (
|
||||
<AnimatedCounter value={stat.value as number} />
|
||||
) : (
|
||||
<span>{stat.value}</span>
|
||||
)}
|
||||
</div>
|
||||
<p className="font-mono text-[0.75rem] md:text-[0.85rem] text-brand-muted uppercase tracking-[0.2em] text-balance">
|
||||
{fixOrphans(stat.label)}
|
||||
</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 3. Pełny Opis projektu */}
|
||||
<section className="py-24 md:py-32 lg:py-48 bg-brand-surface w-full overflow-hidden">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className={`flex flex-col lg:flex-row items-center gap-12 lg:gap-24 ${isImageRight ? '' : 'lg:flex-row-reverse'}`}>
|
||||
<Reveal delay={0.2} className="w-full lg:w-1/2">
|
||||
<SectionHeader
|
||||
eyebrow="O projekcie"
|
||||
title="Wizja i nadzór inwestorski"
|
||||
align="left"
|
||||
size="lg"
|
||||
className="mb-8"
|
||||
/>
|
||||
<div className="prose prose-lg prose-zinc max-w-none text-brand-muted font-light leading-relaxed">
|
||||
<p>{fixOrphans(project.fullDesc)}</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
<Reveal delay={0.4} className="w-full lg:w-1/2">
|
||||
<div className="relative border border-brand-border/40 p-4 bg-white shadow-xl shadow-brand-primary/5">
|
||||
<TechCorners />
|
||||
<ImageWithSkeleton
|
||||
src={project.gallery[0]} // Zawsze pierwsze zdjęcie na główny obraz obok opisu
|
||||
alt={`Widok projektu ${project.title}`}
|
||||
wrapperClassName="aspect-[4/3] bg-zinc-200 relative"
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 4. Cechy / Zakres */}
|
||||
<section className="py-24 md:py-32 bg-white border-y border-brand-border/50 w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center flex flex-col items-center">
|
||||
<SectionHeader
|
||||
eyebrow="Specyfikacja"
|
||||
title="Charakterystyka inwestycji"
|
||||
lead="Kluczowe udogodnienia i parametry obiektu, zrealizowane pod nadzorem BNT Budownictwo."
|
||||
align="center"
|
||||
size="md"
|
||||
className="mb-16"
|
||||
/>
|
||||
<Reveal delay={0.3} className="w-full">
|
||||
<div className="flex flex-wrap items-center justify-center gap-y-3">
|
||||
{project.features.map((feature, idx) => (
|
||||
<TechTag key={idx}>{feature}</TechTag>
|
||||
))}
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 5. Galeria Zdjęć */}
|
||||
<section className="py-24 md:py-32 lg:py-48 bg-brand-surface w-full">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<SectionHeader
|
||||
eyebrow="Galeria"
|
||||
title="Wizualizacje i postęp prac"
|
||||
align="left"
|
||||
size="lg"
|
||||
className="mb-16"
|
||||
/>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8">
|
||||
{project.gallery.slice(1).map((imgUrl, idx) => (
|
||||
<Reveal key={idx} delay={0.1 * (idx + 1)}>
|
||||
<div className="group relative border border-brand-border/40 p-2 bg-white shadow-none">
|
||||
<ImageWithSkeleton
|
||||
src={imgUrl}
|
||||
alt={`Galeria ${project.title} - ${idx + 1}`}
|
||||
wrapperClassName="aspect-square bg-zinc-200 relative overflow-hidden"
|
||||
className="w-full h-full object-cover grayscale group-hover:grayscale-0 transition-all duration-700 ease-out transform group-hover:scale-105"
|
||||
/>
|
||||
</div>
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 6. Nawigacja między projektami */}
|
||||
<section className="py-16 bg-brand-deepDark w-full text-white">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col sm:flex-row justify-between items-center gap-6">
|
||||
{prevProject ? (
|
||||
<Link href={`/realizacje/${prevProject.slug}`} className="group flex items-center gap-4 hover:text-brand-primary transition-colors">
|
||||
<ArrowLeft className="w-5 h-5 text-brand-muted group-hover:text-brand-primary transition-colors" />
|
||||
<div className="text-left">
|
||||
<div className="font-mono text-[0.7rem] text-brand-muted uppercase tracking-widest mb-1">Poprzedni etap</div>
|
||||
<div className="font-heading font-semibold text-[1.125rem]">{prevProject.title}</div>
|
||||
</div>
|
||||
</Link>
|
||||
) : <div className="w-1/2 hidden sm:block"></div>}
|
||||
|
||||
<div className="h-10 w-px bg-white/10 hidden sm:block"></div>
|
||||
|
||||
{nextProject ? (
|
||||
<Link href={`/realizacje/${nextProject.slug}`} className="group flex items-center gap-4 hover:text-brand-primary transition-colors text-right flex-row-reverse sm:flex-row">
|
||||
<div className="text-right sm:text-left">
|
||||
<div className="font-mono text-[0.7rem] text-brand-muted uppercase tracking-widest mb-1">Następny etap</div>
|
||||
<div className="font-heading font-semibold text-[1.125rem]">{nextProject.title}</div>
|
||||
</div>
|
||||
<ArrowRight className="w-5 h-5 text-brand-muted group-hover:text-brand-primary transition-colors" />
|
||||
</Link>
|
||||
) : <div className="w-1/2 hidden sm:block"></div>}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 7. CTA Końcowe */}
|
||||
<section className="py-24 md:py-32 lg:py-48 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center flex flex-col items-center">
|
||||
<SectionHeader
|
||||
eyebrow="Konsultacja"
|
||||
title="Zainteresowany podobną realizacją?"
|
||||
lead="Skontaktuj się w celu omówienia technicznych i finansowych aspektów Twojego projektu. Zapewniamy profesjonalny audyt i rzetelną wycenę."
|
||||
align="center"
|
||||
size="xl"
|
||||
className="mb-12"
|
||||
/>
|
||||
<Reveal delay={0.4} className="flex justify-center">
|
||||
<Button variant="primary" size="lg" href="/kontakt">
|
||||
Porozmawiajmy o projekcie
|
||||
</Button>
|
||||
</Reveal>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import { SectionHeader } from "@/components/ui/SectionHeader";
|
||||
import { Reveal } from "@/components/ui/Reveal";
|
||||
import { TechCorners } from "@/components/ui/TechCorners";
|
||||
import { TechTag } from "@/components/ui/TechTag";
|
||||
import { ImageWithSkeleton } from "@/components/ui/ImageWithSkeleton";
|
||||
import { fixOrphans } from "@/lib/typography";
|
||||
import { realizacje } from "@/lib/data/realizacje";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
|
||||
export const metadata = {
|
||||
title: "Realizacje | BNT Budownictwo",
|
||||
description: "Poznaj dorobek firmy BNT Budownictwo. Zobacz nasze realizacje w zakresie budownictwa mieszkaniowego i przemysłowego.",
|
||||
};
|
||||
|
||||
export default function RealizacjePage() {
|
||||
return (
|
||||
<div className="flex flex-col min-h-screen">
|
||||
{/* 1. Hero */}
|
||||
<section className="pt-32 pb-24 md:pt-48 md:pb-32 lg:pt-56 lg:pb-48 bg-brand-deepDark w-full relative overflow-hidden">
|
||||
<div className="absolute right-0 top-0 w-1/3 h-full bg-gradient-to-l from-brand-primary/5 to-transparent blur-3xl opacity-50 pointer-events-none" />
|
||||
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 w-full">
|
||||
<Reveal>
|
||||
<div className="font-mono text-small-mobile tracking-widest text-brand-muted uppercase mb-8">
|
||||
<Link href="/" className="hover:text-white transition-colors">Strona główna</Link>
|
||||
<span className="mx-3 opacity-50">/</span>
|
||||
<span className="text-white">Realizacje</span>
|
||||
</div>
|
||||
</Reveal>
|
||||
|
||||
<SectionHeader
|
||||
title="Nasze Realizacje"
|
||||
lead="Przestrzenie, które zbudowaliśmy z myślą o ludziach i ich potrzebach. Zobacz nasze najważniejsze projekty deweloperskie i inwestycje budowlane."
|
||||
theme="dark"
|
||||
align="left"
|
||||
size="xl"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 2. Grid Realizacji */}
|
||||
<section className="py-24 md:py-32 lg:py-48 w-full bg-brand-surface">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 lg:gap-8 mb-16 lg:mb-24">
|
||||
{realizacje.map((project, idx) => (
|
||||
<Reveal key={project.id} delay={0.1 * (idx + 1)}>
|
||||
<Link href={`/realizacje/${project.slug}`} className="group block relative border border-brand-border/40 p-6 lg:p-8 shadow-none bg-white">
|
||||
<TechCorners />
|
||||
<ImageWithSkeleton
|
||||
src={project.mainImg}
|
||||
alt={project.title}
|
||||
wrapperClassName="aspect-[16/9] bg-zinc-200 mb-6 relative"
|
||||
className="w-full h-full object-cover grayscale group-hover:grayscale-0 transition-all duration-500 ease-out"
|
||||
/>
|
||||
|
||||
<div className="mb-4">
|
||||
<TechTag className="inline-flex">{project.type} // {project.year}</TechTag>
|
||||
</div>
|
||||
|
||||
<h3 className="mb-3 text-[1.5rem] md:text-[1.75rem] group-hover:text-brand-primary transition-colors text-balance font-heading font-semibold text-brand-text leading-tight">{fixOrphans(project.title)}</h3>
|
||||
<p className="text-brand-muted text-pretty text-[1rem] leading-relaxed">{fixOrphans(project.shortDesc)}</p>
|
||||
</Link>
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Reveal delay={0.2}>
|
||||
<div className="flex flex-col items-center justify-center border-t border-brand-border/40 pt-16">
|
||||
<h3 className="text-[2rem] md:text-[2.5rem] font-heading font-bold text-brand-text mb-6">Planujesz nową inwestycję?</h3>
|
||||
<Button variant="primary" size="lg" href="/kontakt">Porozmawiajmy o współpracy</Button>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,271 @@
|
||||
import React from "react";
|
||||
import { notFound } from "next/navigation";
|
||||
import { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
import { services } from "@/lib/data/services";
|
||||
import { fixOrphans } from "@/lib/typography";
|
||||
import { Reveal } from "@/components/ui/Reveal";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
import { SectionHeader } from "@/components/ui/SectionHeader";
|
||||
import { TechTag } from "@/components/ui/TechTag";
|
||||
import { TechCorners } from "@/components/ui/TechCorners";
|
||||
|
||||
export function generateStaticParams() {
|
||||
return services.map((s) => ({
|
||||
slug: s.slug,
|
||||
}));
|
||||
}
|
||||
|
||||
export function generateMetadata({ params }: { params: { slug: string } }): Metadata {
|
||||
const service = services.find((s) => s.slug === params.slug);
|
||||
if (!service) return {};
|
||||
|
||||
return {
|
||||
title: `${service.title} | BNT Budownictwo`,
|
||||
description: service.shortDesc,
|
||||
};
|
||||
}
|
||||
|
||||
export default function ServiceDetailPage({ params }: { params: { slug: string } }) {
|
||||
const service = services.find((s) => s.slug === params.slug);
|
||||
|
||||
if (!service) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
// FAQ Schema JSON-LD
|
||||
const jsonLd = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "FAQPage",
|
||||
mainEntity: [
|
||||
{
|
||||
"@type": "Question",
|
||||
name: `Czym jest ${service.title}?`,
|
||||
acceptedAnswer: {
|
||||
"@type": "Answer",
|
||||
text: service.shortDesc,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const isNewTemplate = !!service.introSection;
|
||||
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
/>
|
||||
<main className="min-h-screen bg-brand-surface relative z-10 overflow-hidden">
|
||||
|
||||
{/* WSPÓLNY HERO */}
|
||||
<section className="relative pt-32 pb-16 md:pt-40 md:pb-24 bg-brand-deepDark w-full border-b border-white/10">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 flex flex-col justify-end min-h-[300px]">
|
||||
<Reveal>
|
||||
<div className="flex items-center text-small-mobile font-mono text-white/50 mb-6 uppercase tracking-widest">
|
||||
<Link href="/" className="hover:text-white transition-colors">Strona główna</Link>
|
||||
<span className="mx-2">/</span>
|
||||
<Link href="/uslugi" className="hover:text-white transition-colors">Usługi</Link>
|
||||
<span className="mx-2">/</span>
|
||||
<span className="text-slate-300">{service.title}</span>
|
||||
</div>
|
||||
<div className="font-mono text-small-mobile tracking-widest text-slate-300 mb-6 uppercase">Oferta</div>
|
||||
<h1 className="text-[2.5rem] md:text-[3.5rem] lg:text-[4.5rem] leading-[1.1] mb-8 max-w-4xl font-heading font-bold text-white text-balance">
|
||||
{fixOrphans(service.title)}
|
||||
</h1>
|
||||
<p className="text-[1.25rem] md:text-[1.5rem] text-white/70 max-w-3xl font-light leading-relaxed text-pretty">
|
||||
{fixOrphans(service.lead)}
|
||||
</p>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{isNewTemplate ? (
|
||||
/* =========================================
|
||||
NOWY, ROZBUDOWANY SZABLON USŁUGI
|
||||
========================================= */
|
||||
<>
|
||||
{/* Sekcja 2: Wprowadzająca (jasne tło) */}
|
||||
<section className="py-16 md:py-24 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center">
|
||||
<div>
|
||||
<SectionHeader
|
||||
title={service.introSection!.heading}
|
||||
align="left"
|
||||
size="md"
|
||||
className="mb-8"
|
||||
/>
|
||||
<Reveal delay={0.2}>
|
||||
<div className="space-y-6">
|
||||
{service.introSection!.paragraphs.map((p, idx) => (
|
||||
<p key={idx} className="text-[1.125rem] text-brand-muted leading-relaxed text-pretty">
|
||||
{fixOrphans(p)}
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
<Reveal delay={0.4} className="h-full">
|
||||
<div className="relative w-full aspect-square lg:aspect-[4/5] bg-brand-border/30 rounded-xl overflow-hidden flex items-center justify-center">
|
||||
{/* Placeholder image */}
|
||||
<div className="absolute inset-0 bg-gradient-to-tr from-slate-200 to-slate-100" />
|
||||
<span className="relative font-mono text-brand-muted/50 text-sm uppercase">[{service.introSection!.imagePlaceholder}]</span>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Sekcja 3: Karta-callout (jasnoszare tło) */}
|
||||
<section className="py-16 md:py-24 bg-slate-50 border-y border-brand-border/50">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<SectionHeader
|
||||
title={service.calloutSection!.heading}
|
||||
size="md"
|
||||
className="mb-12"
|
||||
/>
|
||||
|
||||
<Reveal delay={0.2} className="w-full flex justify-center">
|
||||
<div className="relative bg-white p-8 md:p-12 border border-brand-border/60 shadow-sm w-full max-w-3xl text-left mx-auto">
|
||||
<TechCorners />
|
||||
<p className="text-[1.25rem] text-brand-text font-light leading-relaxed text-pretty mb-8">
|
||||
{fixOrphans(service.calloutSection!.content)}
|
||||
</p>
|
||||
|
||||
<div className="pt-8 border-t border-brand-border/40 flex flex-wrap items-center gap-y-3">
|
||||
{service.calloutSection!.tags.map((tag, idx) => (
|
||||
<TechTag key={idx}>{tag}</TechTag>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Sekcja 4: Grid ikon (jasne tło) */}
|
||||
<section className="py-16 md:py-24 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<SectionHeader
|
||||
title={service.gridSection!.heading}
|
||||
lead={service.gridSection!.content}
|
||||
size="lg"
|
||||
className="mb-16"
|
||||
/>
|
||||
|
||||
<div className="grid grid-cols-2 md:grid-cols-3 gap-4 md:gap-6 w-full">
|
||||
{service.gridSection!.items.map((item, idx) => (
|
||||
<Reveal key={idx} delay={0.1 * idx}>
|
||||
<div className="group relative bg-white p-8 border border-brand-border/60 shadow-none transition-colors duration-300 h-full flex flex-col">
|
||||
<TechCorners />
|
||||
<div className="font-mono text-brand-muted group-hover:text-brand-primary transition-colors text-[1.25rem] mb-6">
|
||||
{(idx + 1).toString().padStart(2, '0')}
|
||||
</div>
|
||||
<h3 className="text-[1.5rem] md:text-[1.75rem] text-brand-text flex items-start text-balance">
|
||||
{item}
|
||||
</h3>
|
||||
</div>
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Sekcja 5: Ciemna (rytmiczny układ naprzemienny) */}
|
||||
<section className="py-16 md:py-24 bg-brand-deepDark w-full border-t border-white/10 relative overflow-hidden">
|
||||
<div className="absolute right-0 top-1/2 -translate-y-1/2 w-1/2 h-full bg-gradient-to-l from-brand-primary/10 to-transparent blur-3xl opacity-30 pointer-events-none" />
|
||||
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center">
|
||||
<div className="order-2 lg:order-1">
|
||||
<SectionHeader
|
||||
title={service.darkSection!.heading}
|
||||
lead={service.darkSection!.content}
|
||||
align="left"
|
||||
theme="dark"
|
||||
size="md"
|
||||
/>
|
||||
</div>
|
||||
<Reveal delay={0.4} className="h-full order-1 lg:order-2">
|
||||
<div className="relative w-full aspect-square lg:aspect-[4/3] bg-white/5 rounded-xl overflow-hidden flex items-center justify-center border border-white/10">
|
||||
{/* Placeholder image */}
|
||||
<span className="relative font-mono text-white/30 text-sm uppercase">[{service.darkSection!.imagePlaceholder}]</span>
|
||||
</div>
|
||||
</Reveal>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Sekcja 6: CTA (spójne z resztą podstron) */}
|
||||
<section className="py-24 md:py-32 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center flex flex-col items-center">
|
||||
<SectionHeader
|
||||
eyebrow="Współpraca"
|
||||
title="Porozmawiajmy o Twojej inwestycji"
|
||||
lead="Zapewnij swojej inwestycji fachowy nadzór od pierwszego dnia budowy. Umów się z nami na spotkanie, aby omówić szczegóły."
|
||||
size="xl"
|
||||
className="mb-12"
|
||||
/>
|
||||
<Reveal delay={0.4} className="flex justify-center">
|
||||
<Button variant="primary" size="lg" href="/kontakt">
|
||||
Umów bezpłatną konsultację
|
||||
</Button>
|
||||
</Reveal>
|
||||
</section>
|
||||
</>
|
||||
) : (
|
||||
/* =========================================
|
||||
STARY SZABLON USŁUGI (FALLBACK)
|
||||
========================================= */
|
||||
<>
|
||||
{/* Sekcja 1: Zakres / Obowiązki */}
|
||||
<section className="py-16 md:py-24 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col items-center">
|
||||
<SectionHeader
|
||||
title={service.sections?.first.title || "Zakres usług"}
|
||||
size="lg"
|
||||
className="mb-12"
|
||||
/>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-6 max-w-5xl w-full">
|
||||
{service.sections?.first.items.map((item, index) => (
|
||||
<Reveal key={index} delay={index * 0.1}>
|
||||
<div className="flex items-start">
|
||||
<div className="w-1.5 h-1.5 bg-brand-primary mt-2.5 mr-4 flex-shrink-0" />
|
||||
<p className="text-[1.125rem] text-brand-muted leading-relaxed text-pretty">
|
||||
{fixOrphans(item)}
|
||||
</p>
|
||||
</div>
|
||||
</Reveal>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Sekcja 2: Dla kogo / Dlaczego warto */}
|
||||
<section className="py-16 md:py-24 bg-white border-y border-brand-border/50">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<SectionHeader
|
||||
title={service.sections?.second.title || "Szczegóły"}
|
||||
lead={service.sections?.second.content || ""}
|
||||
size="lg"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Sekcja CTA */}
|
||||
<section className="py-24 md:py-32 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center flex flex-col items-center">
|
||||
<SectionHeader
|
||||
eyebrow="Konsultacja"
|
||||
title="Gotowy na współpracę?"
|
||||
lead="Porozmawiajmy o Twojej inwestycji i dopasujmy najlepsze rozwiązania techniczne i organizacyjne."
|
||||
size="xl"
|
||||
className="mb-12"
|
||||
/>
|
||||
<Reveal delay={0.4} className="flex justify-center">
|
||||
<Button variant="primary" size="lg" href="/kontakt">
|
||||
Umów bezpłatną konsultację
|
||||
</Button>
|
||||
</Reveal>
|
||||
</section>
|
||||
</>
|
||||
)}
|
||||
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import React from "react";
|
||||
import { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
import { ArrowRight } from "lucide-react";
|
||||
import { Reveal } from "@/components/ui/Reveal";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
import { TechCorners } from "@/components/ui/TechCorners";
|
||||
import { fixOrphans } from "@/lib/typography";
|
||||
import { services } from "@/lib/data/services";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Usługi Inżynieryjno-Budowlane | BNT Budownictwo",
|
||||
description: "Kompleksowa obsługa inwestycji budowlanych. Od analizy i wyceny, przez nadzór inwestorski, aż po kierowanie budową. Poznaj nasze usługi.",
|
||||
};
|
||||
|
||||
export default function ServicesPage() {
|
||||
return (
|
||||
<main className="min-h-screen bg-brand-surface relative z-10">
|
||||
|
||||
{/* Hero Sekcji */}
|
||||
<section className="relative pt-32 pb-16 md:pt-40 md:pb-24 bg-brand-deepDark w-full border-b border-white/10">
|
||||
|
||||
{/* Subtelny akcent wizualny (cienkie linie tła) */}
|
||||
<div className="absolute inset-0 overflow-hidden pointer-events-none">
|
||||
<div className="absolute right-0 top-0 w-1/3 h-full bg-gradient-to-l from-brand-primary/5 to-transparent blur-3xl opacity-50" />
|
||||
<div className="absolute -right-24 -top-24 w-96 h-96 rounded-full border-[1px] border-white/5 opacity-20" />
|
||||
</div>
|
||||
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 flex flex-col justify-end min-h-[320px] md:min-h-[360px]">
|
||||
<Reveal>
|
||||
<div className="flex items-center text-small-mobile font-mono text-white/50 mb-6 uppercase tracking-widest">
|
||||
<Link href="/" className="hover:text-white transition-colors">Strona główna</Link>
|
||||
<span className="mx-2">/</span>
|
||||
<span className="text-slate-300">Usługi</span>
|
||||
</div>
|
||||
<div className="font-mono text-small-mobile tracking-widest text-slate-300 mb-6 uppercase">Oferta</div>
|
||||
<h1 className="text-[2.5rem] md:text-[3.5rem] lg:text-[4.5rem] leading-[1.1] mb-8 max-w-4xl font-heading font-bold text-white text-balance">
|
||||
{fixOrphans("Usługi Inżynieryjno-Budowlane")}
|
||||
</h1>
|
||||
<p className="text-[1.25rem] md:text-[1.5rem] text-white/70 max-w-3xl font-light leading-relaxed text-pretty">
|
||||
{fixOrphans("Świadczymy kompleksowe usługi zarządzania procesem budowlanym, reprezentując interesy Inwestora na każdym etapie. Nasze wsparcie to gwarancja terminowości, optymalizacji kosztów i bezkompromisowej jakości wykonania.")}
|
||||
</p>
|
||||
</Reveal>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* Kontener dla siatki usług */}
|
||||
<div className="py-16 md:py-24 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
|
||||
{/* Grid 5 kart */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-6 gap-6 lg:gap-8 items-stretch">
|
||||
{services.map((service, idx) => {
|
||||
// Pierwsze 3 karty - po 2 kolumny (3 w rzędzie na lg), ostatnie 2 karty - po 3 kolumny (2 w rzędzie na lg, wyśrodkowane)
|
||||
const colSpan = idx < 3 ? "lg:col-span-2" : "lg:col-span-3";
|
||||
return (
|
||||
<Reveal key={service.id} delay={0.1 * (idx + 1)} className={`h-full ${colSpan}`}>
|
||||
<div className="group relative bg-white p-8 border border-brand-border/60 shadow-none hover:bg-brand-surface/30 transition-colors duration-300 flex flex-col h-full">
|
||||
<TechCorners />
|
||||
<div className="font-mono text-brand-muted group-hover:text-brand-primary transition-colors text-[1.25rem] mb-6">{service.id}</div>
|
||||
<h3 className="mb-4 text-[1.5rem] md:text-[1.75rem] min-h-[4.5rem] flex items-start text-balance">{fixOrphans(service.title)}</h3>
|
||||
<p className="mb-8 text-brand-muted flex-grow text-pretty">{fixOrphans(service.shortDesc)}</p>
|
||||
<Button variant="secondary" size="sm" href={`/uslugi/${service.slug}`} className="mt-auto w-fit">
|
||||
Dowiedz się więcej <ArrowRight className="w-4 h-4 ml-2" />
|
||||
</Button>
|
||||
</div>
|
||||
</Reveal>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
|
||||
// Set viewport to mobile to force text wrapping
|
||||
await page.setViewport({ width: 375, height: 812 });
|
||||
|
||||
// The service slug for 'uslugi-inzynieryjne-budowlane' contains this darkSection
|
||||
await page.goto('http://localhost:3001/uslugi/uslugi-inzynieryjne-budowlane', { waitUntil: 'networkidle0' });
|
||||
|
||||
// Scroll down to trigger the ScrollFloat animation
|
||||
await page.evaluate(async () => {
|
||||
// Find the element containing "Kompetencje konstrukcyjno-budowlane"
|
||||
const headings = Array.from(document.querySelectorAll('h2, h3'));
|
||||
const target = headings.find(h => h.textContent.includes('Kompetencje konstrukcyjno-budowlane'));
|
||||
if (target) {
|
||||
target.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
});
|
||||
|
||||
// Wait for animation to finish
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
|
||||
const screenshotPath = "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\kompetencje_fix.png";
|
||||
|
||||
await page.screenshot({ path: screenshotPath });
|
||||
|
||||
// Audit script to check all ScrollFloat instances across a few key pages
|
||||
const urlsToTest = [
|
||||
'http://localhost:3001/',
|
||||
'http://localhost:3001/uslugi',
|
||||
'http://localhost:3001/uslugi/uslugi-inzynieryjne-budowlane'
|
||||
];
|
||||
const viewports = [375, 768, 1440];
|
||||
let auditPassed = true;
|
||||
let auditLog = "";
|
||||
|
||||
for (const url of urlsToTest) {
|
||||
await page.goto(url, { waitUntil: 'networkidle0' });
|
||||
for (const w of viewports) {
|
||||
await page.setViewport({ width: w, height: 900 });
|
||||
await new Promise(r => setTimeout(r, 1000)); // wait for layout
|
||||
|
||||
const wordsWrapCheck = await page.evaluate(() => {
|
||||
const words = Array.from(document.querySelectorAll('.scroll-float-word'));
|
||||
let brokenWords = 0;
|
||||
words.forEach(word => {
|
||||
const chars = Array.from(word.querySelectorAll('.char'));
|
||||
if (chars.length > 1) {
|
||||
const firstCharTop = chars[0].getBoundingClientRect().top;
|
||||
const lastCharTop = chars[chars.length - 1].getBoundingClientRect().top;
|
||||
// if chars are on different lines, their top positions will differ significantly
|
||||
if (Math.abs(firstCharTop - lastCharTop) > 5) {
|
||||
brokenWords++;
|
||||
}
|
||||
}
|
||||
});
|
||||
return { totalWords: words.length, brokenWords };
|
||||
});
|
||||
|
||||
auditLog += `URL: ${url} | Viewport: ${w}px | Checked: ${wordsWrapCheck.totalWords} words | Broken: ${wordsWrapCheck.brokenWords}\n`;
|
||||
if (wordsWrapCheck.brokenWords > 0) {
|
||||
auditPassed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fs.writeFileSync("C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\audit_log.txt", auditLog);
|
||||
console.log("Audit complete. Passed: " + auditPassed);
|
||||
|
||||
await browser.close();
|
||||
})();
|
||||
@@ -0,0 +1,148 @@
|
||||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import { Phone, Mail, MapPin, Clock } from "lucide-react";
|
||||
|
||||
const FacebookIcon = ({ className = "" }: { className?: string }) => (
|
||||
<svg role="img" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className={className}>
|
||||
<title>Facebook</title>
|
||||
<path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-1.125 0-2.517.236-2.517 1.443v2.53h3.692c-.104 1.848-.314 3.667-.314 3.667h-3.378v7.98H9.101Z"/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
const LinkedinIcon = ({ className = "" }: { className?: string }) => (
|
||||
<svg role="img" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className={className}>
|
||||
<title>LinkedIn</title>
|
||||
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
const InstagramIcon = ({ className = "" }: { className?: string }) => (
|
||||
<svg role="img" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className={className}>
|
||||
<title>Instagram</title>
|
||||
<path d="M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558a5.873 5.873 0 0 0 2.126-1.384 5.86 5.86 0 0 0 1.384-2.126c.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913a5.89 5.89 0 0 0-1.384-2.126 5.86 5.86 0 0 0-2.126-1.384c-.765-.296-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.359 1.058.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227a3.81 3.81 0 0 1-.899 1.382 3.744 3.744 0 0 1-1.38.896c-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421a3.716 3.716 0 0 1-1.379-.899 3.644 3.644 0 0 1-.9-1.38c-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.757 6.162 6.162 6.162 3.405 0 6.162-2.757 6.162-6.162 0-3.402-2.757-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
export function Footer() {
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
return (
|
||||
<footer className="bg-brand-dark text-white/80 py-16 lg:py-24">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-12 gap-12 lg:gap-8">
|
||||
|
||||
{/* Kolumna 1: O firmie i Social Media */}
|
||||
<div className="md:col-span-12 lg:col-span-4 space-y-6 lg:pr-8">
|
||||
<Link href="/" className="inline-block text-h3-desktop font-heading font-bold text-white mb-2">
|
||||
BNT<span className="text-brand-primary">.</span>
|
||||
</Link>
|
||||
<p className="text-body-mobile text-white/60 mb-6 max-w-sm text-pretty">
|
||||
Generalny wykonawca inwestycji budowlanych. Solidność i terminowość na każdym etapie.
|
||||
</p>
|
||||
<div className="pt-2 text-small-mobile text-white/50 mb-6 font-mono">
|
||||
NIP: 913-128-29-95
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4 pt-2">
|
||||
<a href="#" className="w-10 h-10 rounded-full border border-white/10 flex items-center justify-center text-white/60 hover:bg-brand-primary hover:text-white hover:border-brand-primary transition-all duration-300" aria-label="Facebook">
|
||||
<FacebookIcon className="w-4 h-4" />
|
||||
</a>
|
||||
<a href="#" className="w-10 h-10 rounded-full border border-white/10 flex items-center justify-center text-white/60 hover:bg-brand-primary hover:text-white hover:border-brand-primary transition-all duration-300" aria-label="LinkedIn">
|
||||
<LinkedinIcon className="w-4 h-4" />
|
||||
</a>
|
||||
<a href="#" className="w-10 h-10 rounded-full border border-white/10 flex items-center justify-center text-white/60 hover:bg-brand-primary hover:text-white hover:border-brand-primary transition-all duration-300" aria-label="Instagram">
|
||||
<InstagramIcon className="w-4 h-4" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Kolumna 2: Dane kontaktowe */}
|
||||
<div className="md:col-span-6 lg:col-span-4 lg:pl-8">
|
||||
<h3 className="text-h4-desktop font-heading font-semibold text-white mb-6">Dane kontaktowe</h3>
|
||||
<ul className="space-y-4">
|
||||
<li className="flex items-start">
|
||||
<MapPin className="w-5 h-5 mr-3 text-brand-primary flex-shrink-0 mt-0.5" strokeWidth={1.5} />
|
||||
<span className="text-body-mobile">
|
||||
ul. Budowlana 12<br />
|
||||
00-000 Warszawa
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-center">
|
||||
<Phone className="w-5 h-5 mr-3 text-brand-primary flex-shrink-0" strokeWidth={1.5} />
|
||||
<a href="tel:+48000000000" className="text-body-mobile hover:text-white transition-colors">
|
||||
+48 000 000 000
|
||||
</a>
|
||||
</li>
|
||||
<li className="flex items-center">
|
||||
<Mail className="w-5 h-5 mr-3 text-brand-primary flex-shrink-0" strokeWidth={1.5} />
|
||||
<a href="mailto:[email protected]" className="text-body-mobile hover:text-white transition-colors">
|
||||
biuro@bntbudownictwo.pl
|
||||
</a>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<Clock className="w-5 h-5 mr-3 text-brand-primary flex-shrink-0 mt-0.5" strokeWidth={1.5} />
|
||||
<span className="text-body-mobile text-white/60">
|
||||
Pon - Pt: 8:00 - 16:00
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Kolumna 3: Nawigacja */}
|
||||
<div className="md:col-span-3 lg:col-span-2 lg:pl-8">
|
||||
<h3 className="text-h4-desktop font-heading font-semibold text-white mb-6">Nawigacja</h3>
|
||||
<ul className="space-y-3">
|
||||
{[
|
||||
{ label: "Usługi", href: "/uslugi" },
|
||||
{ label: "Realizacje", href: "/realizacje" },
|
||||
{ label: "Referencje", href: "/referencje" },
|
||||
{ label: "O nas", href: "/o-nas" },
|
||||
{ label: "Kontakt", href: "/kontakt" },
|
||||
].map((link) => (
|
||||
<li key={link.href}>
|
||||
<Link
|
||||
href={link.href}
|
||||
className="text-body-mobile hover:text-brand-primary transition-colors duration-150 ease-out"
|
||||
>
|
||||
{link.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Kolumna 4: Informacje */}
|
||||
<div className="md:col-span-3 lg:col-span-2 lg:pl-4">
|
||||
<h3 className="text-h4-desktop font-heading font-semibold text-white mb-6">Informacje</h3>
|
||||
<ul className="space-y-3">
|
||||
{[
|
||||
{ label: "Polityka prywatności", href: "/polityka-prywatnosci" },
|
||||
{ label: "Regulamin", href: "/regulamin" },
|
||||
{ label: "Blog poradnikowy", href: "/blog" },
|
||||
].map((link) => (
|
||||
<li key={link.href}>
|
||||
<Link
|
||||
href={link.href}
|
||||
className="text-body-mobile text-white/50 hover:text-white transition-colors duration-150 ease-out"
|
||||
>
|
||||
{link.label}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="mt-16 pt-8 border-t border-white/10 flex flex-col md:flex-row justify-between items-center gap-4">
|
||||
<p className="text-small-mobile text-white/50 text-center md:text-left">
|
||||
© {currentYear} BNT Budownictwo. Wszelkie prawa zastrzeżone.
|
||||
</p>
|
||||
<div className="text-small-mobile text-white/40">
|
||||
Realizacja: <a href="https://intecion.pl" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">Intecion Group Sp. z o.o.</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,279 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState, useEffect } from "react";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { Menu, X, Phone, ArrowRight } from "lucide-react";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
|
||||
const NAV_LINKS = [
|
||||
{ label: "Usługi", href: "/uslugi" },
|
||||
{ label: "Realizacje", href: "/realizacje" },
|
||||
{ label: "Referencje", href: "/referencje" },
|
||||
{ label: "O nas", href: "/o-nas" },
|
||||
];
|
||||
|
||||
export function Header() {
|
||||
const [isScrolled, setIsScrolled] = useState(false);
|
||||
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
||||
const pathname = usePathname();
|
||||
|
||||
// Pomocnik — ustawia stan menu (zostawiłem tę funkcję, by nie musieć zmieniać wszędzie wywołań w pliku)
|
||||
const setMenuOpen = (value: boolean) => {
|
||||
setIsMobileMenuOpen(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const handleScroll = () => {
|
||||
setIsScrolled(window.scrollY > 20);
|
||||
};
|
||||
window.addEventListener("scroll", handleScroll);
|
||||
return () => window.removeEventListener("scroll", handleScroll);
|
||||
}, []);
|
||||
|
||||
// Zamknij menu po zmianie trasy
|
||||
useEffect(() => {
|
||||
setMenuOpen(false);
|
||||
}, [pathname]);
|
||||
|
||||
|
||||
// Blokuj scroll body gdy menu otwarte
|
||||
useEffect(() => {
|
||||
if (isMobileMenuOpen) {
|
||||
document.body.style.overflow = "hidden";
|
||||
} else {
|
||||
document.body.style.overflow = "";
|
||||
}
|
||||
return () => {
|
||||
document.body.style.overflow = "";
|
||||
};
|
||||
}, [isMobileMenuOpen]);
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<header
|
||||
className={`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ease-out flex justify-center w-full px-2 sm:px-4 lg:px-8 pointer-events-none ${
|
||||
isScrolled ? "pt-2 lg:pt-3" : "pt-4 lg:pt-5"
|
||||
} ${isMobileMenuOpen ? "lg:flex hidden" : "flex"}`}
|
||||
>
|
||||
<div
|
||||
className={`w-full max-w-7xl mx-auto rounded-[24px] transition-all duration-300 ease-out border pointer-events-auto flex items-center justify-between px-4 sm:px-5 lg:px-8 py-3 lg:py-4 ${
|
||||
isScrolled
|
||||
? "bg-brand-deepDark/90 backdrop-blur-md border-white/10 shadow-[0_8px_32px_-8px_rgba(0,0,0,0.5)]"
|
||||
: "bg-brand-deepDark/80 backdrop-blur-md border-white/10 shadow-lg"
|
||||
}`}
|
||||
>
|
||||
<Link
|
||||
href="/"
|
||||
className="flex flex-col items-start flex-shrink-0 group"
|
||||
>
|
||||
<span className="font-heading font-bold text-white leading-none tracking-tight transition-all duration-300 ease-out text-[1.5rem] lg:text-[1.75rem]">
|
||||
BNT<span className="text-brand-primary">.</span>
|
||||
</span>
|
||||
<span className="font-mono tracking-[0.25em] text-white/60 uppercase group-hover:text-white transition-all duration-300 ease-out text-[8px] sm:text-[9px] lg:text-[10px] mt-1 whitespace-nowrap">
|
||||
Generalne Wykonawstwo
|
||||
</span>
|
||||
</Link>
|
||||
|
||||
<nav className="hidden lg:flex items-center space-x-6 xl:space-x-10 ml-auto mr-8 xl:mr-12">
|
||||
{NAV_LINKS.map((link) => {
|
||||
const isActive =
|
||||
pathname === link.href ||
|
||||
(link.href !== "/" && pathname.startsWith(`${link.href}/`));
|
||||
return (
|
||||
<Link
|
||||
key={link.href}
|
||||
href={link.href}
|
||||
className={`relative text-[0.9375rem] font-medium transition-colors duration-200 ease-out group px-2 py-1 ${
|
||||
isActive ? "text-white" : "text-white/70 hover:text-white"
|
||||
}`}
|
||||
>
|
||||
{link.label}
|
||||
<span
|
||||
className={`absolute left-1/2 bottom-0 h-[2px] bg-brand-primary transition-all duration-300 ease-out -translate-x-1/2 ${
|
||||
isActive
|
||||
? "w-[calc(100%-16px)]"
|
||||
: "w-0 group-hover:w-[calc(100%-16px)]"
|
||||
}`}
|
||||
/>
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</nav>
|
||||
|
||||
<div className="hidden lg:flex items-center space-x-6 flex-shrink-0">
|
||||
<a
|
||||
href="tel:+48000000000"
|
||||
className="hidden xl:flex items-center text-[0.9375rem] font-medium text-white/80 hover:text-white transition-colors group"
|
||||
>
|
||||
<Phone
|
||||
className="w-4 h-4 mr-2 text-white/60 group-hover:text-white transition-colors"
|
||||
aria-hidden="true"
|
||||
strokeWidth={2}
|
||||
/>
|
||||
<span>+48 000 000 000</span>
|
||||
</a>
|
||||
<Button
|
||||
variant="secondary"
|
||||
size="md"
|
||||
href="/kontakt"
|
||||
className="shadow-sm px-8"
|
||||
>
|
||||
Kontakt
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* Mobile: Kontakt + hamburger */}
|
||||
<div className="flex items-center lg:hidden ml-auto gap-3 flex-shrink-0">
|
||||
<Button
|
||||
variant="secondary"
|
||||
size="sm"
|
||||
href="/kontakt"
|
||||
className="shadow-sm"
|
||||
>
|
||||
Kontakt
|
||||
</Button>
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center justify-center w-10 h-10 text-white hover:text-brand-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary rounded-sm"
|
||||
onClick={() => setMenuOpen(!isMobileMenuOpen)}
|
||||
aria-label={isMobileMenuOpen ? "Zamknij menu" : "Otwórz menu"}
|
||||
aria-expanded={isMobileMenuOpen}
|
||||
>
|
||||
{isMobileMenuOpen ? (
|
||||
<X className="w-6 h-6" aria-hidden="true" strokeWidth={1.5} />
|
||||
) : (
|
||||
<Menu
|
||||
className="w-6 h-6"
|
||||
aria-hidden="true"
|
||||
strokeWidth={1.5}
|
||||
/>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* Mobile overlay menu */}
|
||||
<div
|
||||
className={`fixed inset-0 z-[60] flex flex-col lg:hidden transition-opacity duration-300 ease-out ${
|
||||
isMobileMenuOpen
|
||||
? "opacity-100 pointer-events-auto"
|
||||
: "opacity-0 pointer-events-none"
|
||||
}`}
|
||||
style={{ backgroundColor: "#0A0E14" }}
|
||||
aria-hidden={!isMobileMenuOpen}
|
||||
>
|
||||
{/* Top bar — logo + zamknij */}
|
||||
<div className="flex items-center justify-between px-4 sm:px-6 pt-4 pb-0 flex-shrink-0">
|
||||
<Link
|
||||
href="/"
|
||||
className="flex flex-col items-start group"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
>
|
||||
<span className="font-heading font-bold text-white leading-none tracking-tight text-[1.5rem]">
|
||||
BNT<span className="text-brand-primary">.</span>
|
||||
</span>
|
||||
<span className="font-mono tracking-[0.25em] text-white/60 uppercase text-[8px] mt-1 whitespace-nowrap">
|
||||
Generalne Wykonawstwo
|
||||
</span>
|
||||
</Link>
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center justify-center w-10 h-10 text-white hover:text-brand-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary rounded-sm"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
aria-label="Zamknij menu"
|
||||
>
|
||||
<X className="w-6 h-6" aria-hidden="true" strokeWidth={1.5} />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Nawigacja — lista linków */}
|
||||
<nav className="flex-1 px-4 sm:px-6 pt-10 overflow-y-auto">
|
||||
<ul role="list" className="list-none p-0 m-0">
|
||||
{NAV_LINKS.map((link, index) => (
|
||||
<li
|
||||
key={link.href}
|
||||
className="border-b border-white/10 last:border-b-0"
|
||||
style={{
|
||||
opacity: isMobileMenuOpen ? 1 : 0,
|
||||
transform: isMobileMenuOpen
|
||||
? "translateY(0)"
|
||||
: "translateY(12px)",
|
||||
transition: `opacity 300ms ease-out ${index * 70}ms, transform 300ms ease-out ${index * 70}ms`,
|
||||
}}
|
||||
>
|
||||
<Link
|
||||
href={link.href}
|
||||
className="flex items-center justify-between w-full py-6 group"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
>
|
||||
<div className="flex items-center gap-4">
|
||||
{/* Numer techniczny */}
|
||||
<span
|
||||
className="font-mono text-[14px] leading-none select-none flex-shrink-0"
|
||||
style={{ color: "#8A94A6" }}
|
||||
aria-hidden="true"
|
||||
>
|
||||
{String(index + 1).padStart(2, "0")}
|
||||
</span>
|
||||
{/* Nazwa linku */}
|
||||
<span
|
||||
className="font-semibold text-white leading-none tracking-tight group-hover:text-brand-primary transition-colors duration-200"
|
||||
style={{
|
||||
fontFamily: "'Space Grotesk', sans-serif",
|
||||
fontSize: "32px",
|
||||
}}
|
||||
>
|
||||
{link.label}
|
||||
</span>
|
||||
</div>
|
||||
{/* Strzałka */}
|
||||
<ArrowRight
|
||||
className="w-5 h-5 flex-shrink-0 transition-transform duration-200 group-hover:translate-x-1"
|
||||
style={{ color: "#8A94A6" }}
|
||||
aria-hidden="true"
|
||||
strokeWidth={1.5}
|
||||
/>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{/* Dolna sekcja — telefon + CTA */}
|
||||
<div
|
||||
className="flex-shrink-0 px-4 sm:px-6 pt-8 pb-10 border-t border-white/10"
|
||||
style={{
|
||||
opacity: isMobileMenuOpen ? 1 : 0,
|
||||
transition: `opacity 300ms ease-out ${NAV_LINKS.length * 70 + 60}ms`,
|
||||
}}
|
||||
>
|
||||
<a
|
||||
href="tel:+48000000000"
|
||||
className="flex items-center text-white/80 hover:text-white transition-colors mb-5 group"
|
||||
>
|
||||
<Phone
|
||||
className="w-5 h-5 mr-3 text-brand-primary flex-shrink-0"
|
||||
aria-hidden="true"
|
||||
strokeWidth={1.5}
|
||||
/>
|
||||
<span className="font-heading font-semibold text-[1.125rem]">
|
||||
+48 000 000 000
|
||||
</span>
|
||||
</a>
|
||||
<Button
|
||||
variant="primary"
|
||||
size="lg"
|
||||
className="w-full"
|
||||
href="/kontakt"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
>
|
||||
Bezpłatna wycena
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { Plus, Minus } from "lucide-react";
|
||||
import { fixOrphans } from "@/lib/typography";
|
||||
|
||||
export interface AccordionItem {
|
||||
question: string;
|
||||
answer: string;
|
||||
}
|
||||
|
||||
interface AccordionProps {
|
||||
items: AccordionItem[];
|
||||
}
|
||||
|
||||
export function Accordion({ items }: AccordionProps) {
|
||||
const [openIndex, setOpenIndex] = useState<number | null>(0); // Pierwsze otwarte domyślnie? User says: "tylko jedno pytanie rozwinięte naraz", let's default to null to be clean, or 0. Let's do 0.
|
||||
|
||||
const toggle = (index: number) => {
|
||||
setOpenIndex(openIndex === index ? null : index);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="w-full divide-y divide-brand-border/60 border-t border-b border-brand-border/60">
|
||||
{items.map((item, index) => {
|
||||
const isOpen = openIndex === index;
|
||||
return (
|
||||
<div key={index} className="w-full">
|
||||
<button
|
||||
onClick={() => toggle(index)}
|
||||
className="w-full py-6 flex items-center justify-between text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary group"
|
||||
aria-expanded={isOpen}
|
||||
>
|
||||
<h3 className="text-[1.125rem] md:text-[1.25rem] font-heading font-semibold text-brand-text group-hover:text-brand-primary transition-colors pr-8">
|
||||
{fixOrphans(item.question)}
|
||||
</h3>
|
||||
<div className="flex-shrink-0 w-8 h-8 flex items-center justify-center border border-brand-border rounded-full group-hover:border-brand-primary transition-colors">
|
||||
{isOpen ? (
|
||||
<Minus className="w-4 h-4 text-brand-primary" />
|
||||
) : (
|
||||
<Plus className="w-4 h-4 text-brand-muted group-hover:text-brand-primary transition-colors" />
|
||||
)}
|
||||
</div>
|
||||
</button>
|
||||
<div
|
||||
className={`grid transition-all duration-300 ease-out ${
|
||||
isOpen ? "grid-rows-[1fr] opacity-100 mb-6" : "grid-rows-[0fr] opacity-0"
|
||||
}`}
|
||||
>
|
||||
<div className="overflow-hidden">
|
||||
<p className="text-[1rem] lg:text-[1.125rem] text-brand-muted leading-relaxed font-light text-pretty pr-8 md:pr-16">
|
||||
{fixOrphans(item.answer)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
"use client";
|
||||
|
||||
import React, { useEffect, useRef } from "react";
|
||||
import { useInView, useMotionValue, useSpring, useTransform, motion } from "framer-motion";
|
||||
|
||||
interface AnimatedCounterProps {
|
||||
value: number;
|
||||
suffix?: string;
|
||||
duration?: number;
|
||||
}
|
||||
|
||||
export function AnimatedCounter({ value, suffix = "", duration = 2 }: AnimatedCounterProps) {
|
||||
const ref = useRef<HTMLSpanElement>(null);
|
||||
const isInView = useInView(ref, { once: true, margin: "-100px" });
|
||||
|
||||
const motionValue = useMotionValue(0);
|
||||
const springValue = useSpring(motionValue, {
|
||||
duration: duration * 1000,
|
||||
bounce: 0,
|
||||
});
|
||||
|
||||
const displayValue = useTransform(springValue, (latest) => {
|
||||
return Intl.NumberFormat("pl-PL").format(Math.floor(latest)) + suffix;
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (isInView) {
|
||||
motionValue.set(value);
|
||||
}
|
||||
}, [isInView, motionValue, value]);
|
||||
|
||||
return <motion.span ref={ref}>{displayValue}</motion.span>;
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
"use client";
|
||||
|
||||
import * as React from "react";
|
||||
import Link from "next/link";
|
||||
import { useSpecularEffect } from "./SpecularEffect";
|
||||
|
||||
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
variant?: "primary" | "secondary" | "outline";
|
||||
size?: "sm" | "md" | "lg";
|
||||
tone?: "light" | "dark";
|
||||
isLoading?: boolean;
|
||||
href?: string;
|
||||
}
|
||||
|
||||
export const Button = React.forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(
|
||||
({ className = "", variant = "primary", size = "md", tone = "light", isLoading, children, disabled, href, ...props }, ref) => {
|
||||
// Wewnętrzny ref dla efektu WebGL
|
||||
const internalRef = React.useRef<HTMLButtonElement | HTMLAnchorElement | null>(null);
|
||||
|
||||
// Synchronizujemy przekazany ref z wewnętrznym
|
||||
React.useImperativeHandle(ref, () => internalRef.current as HTMLButtonElement | HTMLAnchorElement);
|
||||
|
||||
const isPrimary = variant === "primary";
|
||||
const isDark = tone === "dark";
|
||||
const isDisabledOrLoading = disabled || isLoading;
|
||||
|
||||
// Kolory efektu w zależności od wariantu
|
||||
const getEffectColors = () => {
|
||||
if (variant === "primary") {
|
||||
return { lineColor: '#E8EEF5', baseColor: '#1E3A5F' }; // Jasny połysk na granatowym tle
|
||||
}
|
||||
// Pogłębiony granat dla mocniejszego kontrastu
|
||||
return { lineColor: '#0A1E3F', baseColor: '#ffffff' };
|
||||
};
|
||||
const effectColors = getEffectColors();
|
||||
|
||||
const isSmall = size === "sm";
|
||||
|
||||
// Wywołanie hooka WebGL tylko dla głównych przycisków (primary), pomijane dla secondary/outline
|
||||
// aby uniknąć problemów z renderowaniem canvasu (broken icon) na białych przyciskach w Headerze
|
||||
const fxRef = useSpecularEffect({
|
||||
targetRef: internalRef,
|
||||
enabled: !isDisabledOrLoading && isPrimary,
|
||||
radius: 8,
|
||||
lineColor: effectColors.lineColor,
|
||||
baseColor: effectColors.baseColor,
|
||||
// Znacznie wyższa intensywność bazowa + boost dla małych przycisków
|
||||
intensity: (isDark && !isPrimary ? 2.5 : 1.8) * (isSmall ? 1.5 : 1),
|
||||
shineSize: 10,
|
||||
shineFade: 40,
|
||||
// Grubsza linia ułatwiająca zauważenie efektu na małym obwodzie
|
||||
thickness: (isDark && !isPrimary ? 4.0 : 3.2) + (isSmall ? 1.0 : 0),
|
||||
speed: 0.35,
|
||||
followMouse: true,
|
||||
autoAnimate: false,
|
||||
});
|
||||
|
||||
// Bazowe klasy dla każdego przycisku
|
||||
const baseClasses =
|
||||
"inline-flex items-center justify-center whitespace-nowrap rounded-lg font-body font-medium transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]";
|
||||
|
||||
// Warianty (kolory)
|
||||
const variants = {
|
||||
primary: "relative overflow-visible bg-brand-primary text-white border border-[#2c4f82]",
|
||||
secondary: "relative overflow-visible bg-white hover:bg-brand-surface text-brand-text border border-brand-border",
|
||||
outline: "relative overflow-visible bg-transparent hover:bg-brand-surface text-brand-text border border-brand-border",
|
||||
};
|
||||
|
||||
// Rozmiary (korzystamy z bazy 8px)
|
||||
const sizes = {
|
||||
sm: "py-[11px] px-4 text-small-desktop leading-none", // 11+11+14 = 36px
|
||||
md: "py-[14px] px-6 text-body-medium leading-none", // 14+14+16 = 44px
|
||||
lg: "py-[17px] px-8 text-[1.125rem] leading-none", // 17+17+18 = 52px
|
||||
};
|
||||
|
||||
const classes = `${baseClasses} ${variants[variant]} ${sizes[size]} ${className}`;
|
||||
|
||||
// Zawartość wspólna (żeby tekst i spinner miały wyższy z-index niż canvas z efektem)
|
||||
const content = (
|
||||
<>
|
||||
{fxRef && (
|
||||
<span ref={fxRef} className="absolute -inset-5 pointer-events-none" aria-hidden="true" />
|
||||
)}
|
||||
<span className="relative z-10 flex items-center justify-center pointer-events-none">
|
||||
{isLoading && (
|
||||
<svg
|
||||
className="mr-2 h-4 w-4 animate-spin"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle>
|
||||
<path
|
||||
className="opacity-75"
|
||||
fill="currentColor"
|
||||
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
||||
></path>
|
||||
</svg>
|
||||
)}
|
||||
{children}
|
||||
</span>
|
||||
</>
|
||||
);
|
||||
|
||||
if (href) {
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className={classes}
|
||||
ref={internalRef as React.Ref<HTMLAnchorElement>}
|
||||
{...(props as React.AnchorHTMLAttributes<HTMLAnchorElement>)}
|
||||
>
|
||||
{content}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<button
|
||||
ref={internalRef as React.Ref<HTMLButtonElement>}
|
||||
className={classes}
|
||||
disabled={isDisabledOrLoading}
|
||||
{...props}
|
||||
>
|
||||
{content}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
Button.displayName = "Button";
|
||||
@@ -0,0 +1,92 @@
|
||||
.menu-wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.menu__item {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
border-top: 1px solid;
|
||||
}
|
||||
|
||||
.menu__item:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.menu__item-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
text-transform: uppercase;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
font-weight: 600;
|
||||
font-family: var(--font-heading), sans-serif;
|
||||
font-size: 5vh;
|
||||
}
|
||||
|
||||
.marquee {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
transform: translate3d(0, 101%, 0);
|
||||
}
|
||||
|
||||
.marquee__inner-wrap {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.marquee__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: fit-content;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.marquee__part {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.marquee span {
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
font-weight: 400;
|
||||
font-family: var(--font-mono), monospace;
|
||||
font-size: 3vh;
|
||||
line-height: 1;
|
||||
padding: 0 1vw;
|
||||
}
|
||||
|
||||
.marquee__img {
|
||||
width: 150px;
|
||||
height: 6vh;
|
||||
margin: 2em 2vw;
|
||||
padding: 1em 0;
|
||||
border-radius: 8px;
|
||||
background-size: cover;
|
||||
background-position: 50% 50%;
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
'use client';
|
||||
|
||||
import { useRef, useEffect, useState } from 'react';
|
||||
import { gsap } from 'gsap';
|
||||
import { useRouter } from 'next/navigation';
|
||||
|
||||
import './FlowingMenu.css';
|
||||
|
||||
interface MenuItemProps {
|
||||
link: string;
|
||||
text: string;
|
||||
image: string;
|
||||
speed?: number;
|
||||
textColor?: string;
|
||||
marqueeBgColor?: string;
|
||||
marqueeTextColor?: string;
|
||||
borderColor?: string;
|
||||
}
|
||||
|
||||
interface FlowingMenuProps {
|
||||
items: MenuItemProps[];
|
||||
speed?: number;
|
||||
textColor?: string;
|
||||
bgColor?: string;
|
||||
marqueeBgColor?: string;
|
||||
marqueeTextColor?: string;
|
||||
borderColor?: string;
|
||||
}
|
||||
|
||||
function FlowingMenu({
|
||||
items = [],
|
||||
speed = 15,
|
||||
textColor = '#fff',
|
||||
bgColor = 'transparent',
|
||||
marqueeBgColor = '#fff',
|
||||
marqueeTextColor = '#0A0E14',
|
||||
borderColor = 'rgba(255,255,255,0.1)'
|
||||
}: FlowingMenuProps) {
|
||||
return (
|
||||
<div className="menu-wrap" style={{ backgroundColor: bgColor }}>
|
||||
<nav className="menu">
|
||||
{items.map((item, idx) => (
|
||||
<MenuItem
|
||||
key={idx}
|
||||
{...item}
|
||||
speed={speed}
|
||||
textColor={textColor}
|
||||
marqueeBgColor={marqueeBgColor}
|
||||
marqueeTextColor={marqueeTextColor}
|
||||
borderColor={borderColor}
|
||||
/>
|
||||
))}
|
||||
</nav>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function MenuItem({ link, text, image, speed, textColor, marqueeBgColor, marqueeTextColor, borderColor }: MenuItemProps) {
|
||||
const itemRef = useRef<HTMLDivElement>(null);
|
||||
const marqueeRef = useRef<HTMLDivElement>(null);
|
||||
const marqueeInnerRef = useRef<HTMLDivElement>(null);
|
||||
const animationRef = useRef<any>(null);
|
||||
const [repetitions, setRepetitions] = useState(4);
|
||||
const [isActive, setIsActive] = useState(false);
|
||||
const router = useRouter();
|
||||
|
||||
const animationDefaults = { duration: 0.5, ease: 'expo' };
|
||||
|
||||
useEffect(() => {
|
||||
let timer: NodeJS.Timeout;
|
||||
const calculateRepetitions = () => {
|
||||
if (!marqueeInnerRef.current) return;
|
||||
const marqueeContent = marqueeInnerRef.current.querySelector('.marquee__part') as HTMLElement;
|
||||
if (!marqueeContent) return;
|
||||
const contentWidth = marqueeContent.offsetWidth;
|
||||
if (contentWidth === 0) return;
|
||||
const viewportWidth = window.innerWidth;
|
||||
const needed = Math.ceil(viewportWidth / contentWidth) + 2;
|
||||
setRepetitions(Math.max(4, needed));
|
||||
};
|
||||
timer = setTimeout(calculateRepetitions, 50);
|
||||
window.addEventListener('resize', calculateRepetitions);
|
||||
return () => {
|
||||
clearTimeout(timer);
|
||||
window.removeEventListener('resize', calculateRepetitions);
|
||||
};
|
||||
}, [text, image]);
|
||||
|
||||
useEffect(() => {
|
||||
const setupMarquee = () => {
|
||||
if (!marqueeInnerRef.current) return;
|
||||
const marqueeContent = marqueeInnerRef.current.querySelector('.marquee__part') as HTMLElement;
|
||||
if (!marqueeContent) return;
|
||||
const contentWidth = marqueeContent.offsetWidth;
|
||||
if (contentWidth === 0) return;
|
||||
if (animationRef.current) animationRef.current.kill();
|
||||
animationRef.current = gsap.to(marqueeInnerRef.current, {
|
||||
x: -contentWidth,
|
||||
duration: speed,
|
||||
ease: 'none',
|
||||
repeat: -1
|
||||
});
|
||||
};
|
||||
const timer = setTimeout(setupMarquee, 50);
|
||||
return () => {
|
||||
clearTimeout(timer);
|
||||
if (animationRef.current) animationRef.current.kill();
|
||||
};
|
||||
}, [text, image, repetitions, speed]);
|
||||
|
||||
const handleTap = () => {
|
||||
if (!marqueeRef.current || !marqueeInnerRef.current) return;
|
||||
const next = !isActive;
|
||||
setIsActive(next);
|
||||
|
||||
if (next) {
|
||||
gsap
|
||||
.timeline({ defaults: animationDefaults })
|
||||
.set(marqueeRef.current, { y: '101%' }, 0)
|
||||
.set(marqueeInnerRef.current, { y: '-101%' }, 0)
|
||||
.to([marqueeRef.current, marqueeInnerRef.current], { y: '0%' }, 0);
|
||||
} else {
|
||||
gsap
|
||||
.timeline({ defaults: animationDefaults })
|
||||
.to(marqueeRef.current, { y: '101%' }, 0)
|
||||
.to(marqueeInnerRef.current, { y: '-101%' }, 0);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="menu__item" ref={itemRef} style={{ borderColor }}>
|
||||
<a
|
||||
className="menu__item-link"
|
||||
href={link}
|
||||
onClick={e => {
|
||||
if (!isActive) {
|
||||
e.preventDefault();
|
||||
handleTap();
|
||||
} else {
|
||||
// Drugie kliknięcie - nawigacja Next.js (jeśli to wewnętrzny link)
|
||||
if (link.startsWith('/')) {
|
||||
e.preventDefault();
|
||||
router.push(link);
|
||||
}
|
||||
}
|
||||
}}
|
||||
style={{ color: textColor }}
|
||||
>
|
||||
{text}
|
||||
</a>
|
||||
<div className="marquee" ref={marqueeRef} style={{ backgroundColor: marqueeBgColor }}>
|
||||
<div className="marquee__inner-wrap">
|
||||
<div className="marquee__inner" ref={marqueeInnerRef} aria-hidden="true">
|
||||
{[...Array(repetitions)].map((_, idx) => (
|
||||
<div className="marquee__part" key={idx} style={{ color: marqueeTextColor }}>
|
||||
<span>{text}</span>
|
||||
<div className="marquee__img" style={{ backgroundImage: `url(${image})` }} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default FlowingMenu;
|
||||
@@ -0,0 +1,332 @@
|
||||
'use client';
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
|
||||
const FuzzyText = ({
|
||||
children,
|
||||
fontSize = 'clamp(2rem, 10vw, 10rem)',
|
||||
fontWeight = 900,
|
||||
fontFamily = 'inherit',
|
||||
color = '#fff',
|
||||
enableHover = true,
|
||||
baseIntensity = 0.18,
|
||||
hoverIntensity = 0.5,
|
||||
fuzzRange = 30,
|
||||
fps = 60,
|
||||
direction = 'horizontal',
|
||||
transitionDuration = 0,
|
||||
clickEffect = false,
|
||||
glitchMode = false,
|
||||
glitchInterval = 2000,
|
||||
glitchDuration = 200,
|
||||
gradient = null,
|
||||
letterSpacing = 0,
|
||||
className = ''
|
||||
}) => {
|
||||
const canvasRef = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
let animationFrameId;
|
||||
let isCancelled = false;
|
||||
let glitchTimeoutId;
|
||||
let glitchEndTimeoutId;
|
||||
let clickTimeoutId;
|
||||
const canvas = canvasRef.current;
|
||||
if (!canvas) return;
|
||||
|
||||
const init = async () => {
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (!ctx) return;
|
||||
|
||||
const computedFontFamily =
|
||||
fontFamily === 'inherit' ? window.getComputedStyle(canvas).fontFamily || 'sans-serif' : fontFamily;
|
||||
|
||||
const fontSizeStr = typeof fontSize === 'number' ? `${fontSize}px` : fontSize;
|
||||
const fontString = `${fontWeight} ${fontSizeStr} ${computedFontFamily}`;
|
||||
|
||||
try {
|
||||
await document.fonts.load(fontString);
|
||||
} catch {
|
||||
await document.fonts.ready;
|
||||
}
|
||||
if (isCancelled) return;
|
||||
|
||||
let numericFontSize;
|
||||
if (typeof fontSize === 'number') {
|
||||
numericFontSize = fontSize;
|
||||
} else {
|
||||
const temp = document.createElement('span');
|
||||
temp.style.fontSize = fontSize;
|
||||
document.body.appendChild(temp);
|
||||
const computedSize = window.getComputedStyle(temp).fontSize;
|
||||
numericFontSize = parseFloat(computedSize);
|
||||
document.body.removeChild(temp);
|
||||
}
|
||||
|
||||
const text = React.Children.toArray(children).join('');
|
||||
|
||||
const offscreen = document.createElement('canvas');
|
||||
const offCtx = offscreen.getContext('2d');
|
||||
if (!offCtx) return;
|
||||
|
||||
offCtx.font = `${fontWeight} ${fontSizeStr} ${computedFontFamily}`;
|
||||
offCtx.textBaseline = 'alphabetic';
|
||||
|
||||
let totalWidth = 0;
|
||||
if (letterSpacing !== 0) {
|
||||
for (const char of text) {
|
||||
totalWidth += offCtx.measureText(char).width + letterSpacing;
|
||||
}
|
||||
totalWidth -= letterSpacing;
|
||||
} else {
|
||||
totalWidth = offCtx.measureText(text).width;
|
||||
}
|
||||
|
||||
const metrics = offCtx.measureText(text);
|
||||
const actualLeft = metrics.actualBoundingBoxLeft ?? 0;
|
||||
const actualRight = letterSpacing !== 0 ? totalWidth : (metrics.actualBoundingBoxRight ?? metrics.width);
|
||||
const actualAscent = metrics.actualBoundingBoxAscent ?? numericFontSize;
|
||||
const actualDescent = metrics.actualBoundingBoxDescent ?? numericFontSize * 0.2;
|
||||
|
||||
const textBoundingWidth = Math.ceil(letterSpacing !== 0 ? totalWidth : actualLeft + actualRight);
|
||||
const tightHeight = Math.ceil(actualAscent + actualDescent);
|
||||
|
||||
const extraWidthBuffer = 10;
|
||||
const offscreenWidth = textBoundingWidth + extraWidthBuffer;
|
||||
|
||||
offscreen.width = offscreenWidth;
|
||||
offscreen.height = tightHeight;
|
||||
|
||||
const xOffset = extraWidthBuffer / 2;
|
||||
offCtx.font = `${fontWeight} ${fontSizeStr} ${computedFontFamily}`;
|
||||
offCtx.textBaseline = 'alphabetic';
|
||||
|
||||
if (gradient && Array.isArray(gradient) && gradient.length >= 2) {
|
||||
const grad = offCtx.createLinearGradient(0, 0, offscreenWidth, 0);
|
||||
gradient.forEach((c, i) => grad.addColorStop(i / (gradient.length - 1), c));
|
||||
offCtx.fillStyle = grad;
|
||||
} else {
|
||||
offCtx.fillStyle = color;
|
||||
}
|
||||
|
||||
if (letterSpacing !== 0) {
|
||||
let xPos = xOffset;
|
||||
for (const char of text) {
|
||||
offCtx.fillText(char, xPos, actualAscent);
|
||||
xPos += offCtx.measureText(char).width + letterSpacing;
|
||||
}
|
||||
} else {
|
||||
offCtx.fillText(text, xOffset - actualLeft, actualAscent);
|
||||
}
|
||||
|
||||
const horizontalMargin = fuzzRange + 20;
|
||||
const verticalMargin = 0;
|
||||
canvas.width = offscreenWidth + horizontalMargin * 2;
|
||||
canvas.height = tightHeight + verticalMargin * 2;
|
||||
ctx.translate(horizontalMargin, verticalMargin);
|
||||
|
||||
const interactiveLeft = horizontalMargin + xOffset;
|
||||
const interactiveTop = verticalMargin;
|
||||
const interactiveRight = interactiveLeft + textBoundingWidth;
|
||||
const interactiveBottom = interactiveTop + tightHeight;
|
||||
|
||||
let isHovering = false;
|
||||
let isClicking = false;
|
||||
let isGlitching = false;
|
||||
let currentIntensity = baseIntensity;
|
||||
let targetIntensity = baseIntensity;
|
||||
let lastFrameTime = 0;
|
||||
const frameDuration = 1000 / fps;
|
||||
|
||||
const startGlitchLoop = () => {
|
||||
if (!glitchMode || isCancelled) return;
|
||||
glitchTimeoutId = setTimeout(() => {
|
||||
if (isCancelled) return;
|
||||
isGlitching = true;
|
||||
glitchEndTimeoutId = setTimeout(() => {
|
||||
isGlitching = false;
|
||||
startGlitchLoop();
|
||||
}, glitchDuration);
|
||||
}, glitchInterval);
|
||||
};
|
||||
|
||||
if (glitchMode) startGlitchLoop();
|
||||
|
||||
const run = timestamp => {
|
||||
if (isCancelled) return;
|
||||
|
||||
if (timestamp - lastFrameTime < frameDuration) {
|
||||
animationFrameId = window.requestAnimationFrame(run);
|
||||
return;
|
||||
}
|
||||
lastFrameTime = timestamp;
|
||||
|
||||
ctx.clearRect(
|
||||
-fuzzRange - 20,
|
||||
-fuzzRange - 10,
|
||||
offscreenWidth + 2 * (fuzzRange + 20),
|
||||
tightHeight + 2 * (fuzzRange + 10)
|
||||
);
|
||||
|
||||
if (isClicking) {
|
||||
targetIntensity = 1;
|
||||
} else if (isGlitching) {
|
||||
targetIntensity = 1;
|
||||
} else if (isHovering) {
|
||||
targetIntensity = hoverIntensity;
|
||||
} else {
|
||||
targetIntensity = baseIntensity;
|
||||
}
|
||||
|
||||
if (transitionDuration > 0) {
|
||||
const step = 1 / (transitionDuration / frameDuration);
|
||||
if (currentIntensity < targetIntensity) {
|
||||
currentIntensity = Math.min(currentIntensity + step, targetIntensity);
|
||||
} else if (currentIntensity > targetIntensity) {
|
||||
currentIntensity = Math.max(currentIntensity - step, targetIntensity);
|
||||
}
|
||||
} else {
|
||||
currentIntensity = targetIntensity;
|
||||
}
|
||||
|
||||
if (direction === 'horizontal') {
|
||||
for (let j = 0; j < tightHeight; j++) {
|
||||
const dx = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);
|
||||
ctx.drawImage(offscreen, 0, j, offscreenWidth, 1, dx, j, offscreenWidth, 1);
|
||||
}
|
||||
} else if (direction === 'vertical') {
|
||||
for (let i = 0; i < offscreenWidth; i++) {
|
||||
const dy = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);
|
||||
ctx.drawImage(offscreen, i, 0, 1, tightHeight, i, dy, 1, tightHeight);
|
||||
}
|
||||
} else {
|
||||
for (let j = 0; j < tightHeight; j++) {
|
||||
const dx = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange);
|
||||
ctx.drawImage(offscreen, 0, j, offscreenWidth, 1, dx, j, offscreenWidth, 1);
|
||||
}
|
||||
const tempData = ctx.getImageData(0, 0, offscreenWidth + fuzzRange, tightHeight + fuzzRange);
|
||||
ctx.clearRect(
|
||||
-fuzzRange - 20,
|
||||
-fuzzRange - 10,
|
||||
offscreenWidth + 2 * (fuzzRange + 20),
|
||||
tightHeight + 2 * (fuzzRange + 10)
|
||||
);
|
||||
ctx.putImageData(tempData, 0, 0);
|
||||
for (let i = 0; i < offscreenWidth + fuzzRange; i++) {
|
||||
const dy = Math.floor(currentIntensity * (Math.random() - 0.5) * fuzzRange * 0.5);
|
||||
const colData = ctx.getImageData(i, 0, 1, tightHeight + fuzzRange);
|
||||
ctx.clearRect(i, -fuzzRange, 1, tightHeight + 2 * fuzzRange);
|
||||
ctx.putImageData(colData, i, dy);
|
||||
}
|
||||
}
|
||||
animationFrameId = window.requestAnimationFrame(run);
|
||||
};
|
||||
|
||||
animationFrameId = window.requestAnimationFrame(run);
|
||||
|
||||
const isInsideTextArea = (x, y) => {
|
||||
return x >= interactiveLeft && x <= interactiveRight && y >= interactiveTop && y <= interactiveBottom;
|
||||
};
|
||||
|
||||
const handleMouseMove = e => {
|
||||
if (!enableHover) return;
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const x = e.clientX - rect.left;
|
||||
const y = e.clientY - rect.top;
|
||||
isHovering = isInsideTextArea(x, y);
|
||||
};
|
||||
|
||||
const handleMouseLeave = () => {
|
||||
isHovering = false;
|
||||
};
|
||||
|
||||
const handleClick = () => {
|
||||
if (!clickEffect) return;
|
||||
isClicking = true;
|
||||
clearTimeout(clickTimeoutId);
|
||||
clickTimeoutId = setTimeout(() => {
|
||||
isClicking = false;
|
||||
}, 150);
|
||||
};
|
||||
|
||||
const handleTouchMove = e => {
|
||||
if (!enableHover) return;
|
||||
e.preventDefault();
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const touch = e.touches[0];
|
||||
const x = touch.clientX - rect.left;
|
||||
const y = touch.clientY - rect.top;
|
||||
isHovering = isInsideTextArea(x, y);
|
||||
};
|
||||
|
||||
const handleTouchEnd = () => {
|
||||
isHovering = false;
|
||||
};
|
||||
|
||||
if (enableHover) {
|
||||
canvas.addEventListener('mousemove', handleMouseMove);
|
||||
canvas.addEventListener('mouseleave', handleMouseLeave);
|
||||
canvas.addEventListener('touchmove', handleTouchMove, { passive: false });
|
||||
canvas.addEventListener('touchend', handleTouchEnd);
|
||||
}
|
||||
|
||||
if (clickEffect) {
|
||||
canvas.addEventListener('click', handleClick);
|
||||
}
|
||||
|
||||
const cleanup = () => {
|
||||
window.cancelAnimationFrame(animationFrameId);
|
||||
clearTimeout(glitchTimeoutId);
|
||||
clearTimeout(glitchEndTimeoutId);
|
||||
clearTimeout(clickTimeoutId);
|
||||
if (enableHover) {
|
||||
canvas.removeEventListener('mousemove', handleMouseMove);
|
||||
canvas.removeEventListener('mouseleave', handleMouseLeave);
|
||||
canvas.removeEventListener('touchmove', handleTouchMove);
|
||||
canvas.removeEventListener('touchend', handleTouchEnd);
|
||||
}
|
||||
if (clickEffect) {
|
||||
canvas.removeEventListener('click', handleClick);
|
||||
}
|
||||
};
|
||||
|
||||
canvas.cleanupFuzzyText = cleanup;
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
return () => {
|
||||
isCancelled = true;
|
||||
window.cancelAnimationFrame(animationFrameId);
|
||||
clearTimeout(glitchTimeoutId);
|
||||
clearTimeout(glitchEndTimeoutId);
|
||||
clearTimeout(clickTimeoutId);
|
||||
if (canvas && canvas.cleanupFuzzyText) {
|
||||
canvas.cleanupFuzzyText();
|
||||
}
|
||||
};
|
||||
}, [
|
||||
children,
|
||||
fontSize,
|
||||
fontWeight,
|
||||
fontFamily,
|
||||
color,
|
||||
enableHover,
|
||||
baseIntensity,
|
||||
hoverIntensity,
|
||||
fuzzRange,
|
||||
fps,
|
||||
direction,
|
||||
transitionDuration,
|
||||
clickEffect,
|
||||
glitchMode,
|
||||
glitchInterval,
|
||||
glitchDuration,
|
||||
gradient,
|
||||
letterSpacing
|
||||
]);
|
||||
|
||||
return <canvas ref={canvasRef} className={className} />;
|
||||
};
|
||||
|
||||
export default FuzzyText;
|
||||
@@ -0,0 +1,43 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState, forwardRef } from "react";
|
||||
import { Skeleton } from "./Skeleton";
|
||||
|
||||
interface ImageWithSkeletonProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
||||
wrapperClassName?: string;
|
||||
}
|
||||
|
||||
export const ImageWithSkeleton = forwardRef<HTMLImageElement, ImageWithSkeletonProps>(
|
||||
({ wrapperClassName = "", className = "", alt, ...props }, ref) => {
|
||||
const [isLoaded, setIsLoaded] = useState(false);
|
||||
|
||||
return (
|
||||
<div className={`relative overflow-hidden ${wrapperClassName}`}>
|
||||
{/* Shimmer Skeleton widoczny dopóki obrazek się nie załaduje */}
|
||||
{!isLoaded && <Skeleton className="absolute inset-0 w-full h-full" />}
|
||||
|
||||
{/* Rzeczywisty obrazek */}
|
||||
<img
|
||||
{...props}
|
||||
ref={(node) => {
|
||||
if (node?.complete) {
|
||||
setIsLoaded(true);
|
||||
}
|
||||
if (typeof ref === 'function') {
|
||||
ref(node);
|
||||
} else if (ref) {
|
||||
ref.current = node;
|
||||
}
|
||||
}}
|
||||
alt={alt || ""}
|
||||
className={`${className} transition-opacity duration-500 ease-out ${
|
||||
isLoaded ? "opacity-100" : "opacity-0"
|
||||
}`}
|
||||
onLoad={() => setIsLoaded(true)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
ImageWithSkeleton.displayName = "ImageWithSkeleton";
|
||||
@@ -0,0 +1,70 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Phone } from "lucide-react";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
export function MobileStickyBar() {
|
||||
const [isVisible, setIsVisible] = useState(false);
|
||||
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
||||
const pathname = usePathname();
|
||||
|
||||
// Nasłuchuj na zdarzenie emitowane przez Header gdy mobilne menu się otwiera/zamyka
|
||||
useEffect(() => {
|
||||
const handler = (e: Event) => {
|
||||
setIsMobileMenuOpen((e as CustomEvent<boolean>).detail);
|
||||
};
|
||||
window.addEventListener("mobilemenuchange", handler);
|
||||
return () => window.removeEventListener("mobilemenuchange", handler);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const heroElement = document.getElementById("hero");
|
||||
|
||||
if (heroElement) {
|
||||
const observer = new IntersectionObserver(
|
||||
([entry]) => {
|
||||
setIsVisible(!entry.isIntersecting);
|
||||
},
|
||||
{ root: null, threshold: 0 }
|
||||
);
|
||||
observer.observe(heroElement);
|
||||
return () => observer.disconnect();
|
||||
} else {
|
||||
const handleScroll = () => setIsVisible(window.scrollY > 100);
|
||||
window.addEventListener("scroll", handleScroll);
|
||||
return () => window.removeEventListener("scroll", handleScroll);
|
||||
}
|
||||
}, [pathname]);
|
||||
|
||||
// Gdy mobilne menu jest otwarte — całkowicie ukryj pasek (nie tylko translate)
|
||||
if (isMobileMenuOpen) return null;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`md:hidden fixed bottom-0 left-0 right-0 z-50 transition-transform duration-300 ease-out transform ${
|
||||
isVisible ? "translate-y-0" : "translate-y-full"
|
||||
}`}
|
||||
>
|
||||
<div
|
||||
className="rounded-t-[16px] border-t border-white/10 shadow-[0_-8px_32px_rgba(0,0,0,0.6)] p-4 flex flex-col"
|
||||
style={{ backgroundColor: "#0A0E14" }}
|
||||
>
|
||||
<a
|
||||
href="tel:+48000000000"
|
||||
className="flex items-center gap-2 text-white/80 active:text-white transition-colors mb-3"
|
||||
>
|
||||
<Phone className="w-5 h-5 text-brand-primary flex-shrink-0" aria-hidden="true" strokeWidth={1.5} />
|
||||
<span className="font-heading font-semibold text-[1.125rem]">
|
||||
+48 000 000 000
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<Button variant="primary" size="md" href="/kontakt" className="w-full">
|
||||
Bezpłatna wycena
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
.pill-nav-container {
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.pill-nav {
|
||||
--nav-h: 44px;
|
||||
--pill-pad-x: 18px;
|
||||
--pill-gap: 3px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pill-logo {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pill-nav-items {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: var(--nav-h);
|
||||
background: var(--base, #000);
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.pill-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
gap: var(--pill-gap);
|
||||
margin: 0;
|
||||
padding: 3px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pill-list > li {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
padding: 0 var(--pill-pad-x);
|
||||
background: var(--pill-bg, #fff);
|
||||
color: var(--pill-text, var(--base, #000));
|
||||
text-decoration: none;
|
||||
border-radius: 9999px;
|
||||
box-sizing: border-box;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 0;
|
||||
letter-spacing: 0.2px;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pill .hover-circle {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
border-radius: 50%;
|
||||
background: var(--base, #000);
|
||||
z-index: 1;
|
||||
display: block;
|
||||
pointer-events: none;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.pill .label-stack {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.pill .pill-label {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.pill .pill-label-hover {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
color: var(--hover-text, #fff);
|
||||
z-index: 3;
|
||||
display: inline-block;
|
||||
will-change: transform, opacity;
|
||||
}
|
||||
|
||||
.pill.is-active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -6px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: var(--base, #000);
|
||||
border-radius: 50px;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.desktop-only { display: block; }
|
||||
.mobile-only { display: none; }
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.desktop-only { display: none; }
|
||||
.mobile-only { display: flex; }
|
||||
}
|
||||
|
||||
.mobile-menu-button {
|
||||
width: var(--nav-h);
|
||||
height: var(--nav-h);
|
||||
border-radius: 50%;
|
||||
background: var(--base, #000);
|
||||
border: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hamburger-line {
|
||||
width: 16px;
|
||||
height: 2px;
|
||||
background: var(--pill-bg, #fff);
|
||||
border-radius: 1px;
|
||||
transition: all 0.2s ease;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
.mobile-menu-popover {
|
||||
position: absolute;
|
||||
top: 3.5em;
|
||||
left: 1rem;
|
||||
right: 1rem;
|
||||
background: var(--base, #f0f0f0);
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
|
||||
z-index: 998;
|
||||
opacity: 0;
|
||||
transform-origin: top center;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.mobile-menu-list {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.mobile-menu-popover .mobile-menu-link {
|
||||
display: block;
|
||||
padding: 12px 16px;
|
||||
color: var(--pill-text, #fff);
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
border-radius: 10px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.mobile-menu-popover .mobile-menu-link:hover,
|
||||
.mobile-menu-popover .mobile-menu-link.is-active {
|
||||
background-color: var(--pill-bg);
|
||||
color: var(--hover-text, #fff);
|
||||
}
|
||||
|
||||
.mobile-menu-actions {
|
||||
margin-top: 16px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { gsap } from 'gsap';
|
||||
import './PillNav.css';
|
||||
|
||||
const PillNav = ({
|
||||
logoContent,
|
||||
items,
|
||||
activeHref,
|
||||
className = '',
|
||||
ease = 'power3.easeOut',
|
||||
baseColor = '#fff',
|
||||
pillColor = '#120F17',
|
||||
hoveredPillTextColor = '#120F17',
|
||||
pillTextColor,
|
||||
onMobileMenuClick,
|
||||
initialLoadAnimation = true,
|
||||
actions,
|
||||
mobileActions
|
||||
}) => {
|
||||
const resolvedPillTextColor = pillTextColor ?? baseColor;
|
||||
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
||||
const circleRefs = useRef([]);
|
||||
const tlRefs = useRef([]);
|
||||
const activeTweenRefs = useRef([]);
|
||||
const hamburgerRef = useRef(null);
|
||||
const mobileMenuRef = useRef(null);
|
||||
const navItemsRef = useRef(null);
|
||||
const logoRef = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
const layout = () => {
|
||||
circleRefs.current.forEach(circle => {
|
||||
if (!circle?.parentElement) return;
|
||||
|
||||
const pill = circle.parentElement;
|
||||
const rect = pill.getBoundingClientRect();
|
||||
const { width: w, height: h } = rect;
|
||||
const R = ((w * w) / 4 + h * h) / (2 * h);
|
||||
const D = Math.ceil(2 * R) + 2;
|
||||
const delta = Math.ceil(R - Math.sqrt(Math.max(0, R * R - (w * w) / 4))) + 1;
|
||||
const originY = D - delta;
|
||||
|
||||
circle.style.width = `${D}px`;
|
||||
circle.style.height = `${D}px`;
|
||||
circle.style.bottom = `-${delta}px`;
|
||||
|
||||
gsap.set(circle, {
|
||||
xPercent: -50,
|
||||
scale: 0,
|
||||
transformOrigin: `50% ${originY}px`
|
||||
});
|
||||
|
||||
const label = pill.querySelector('.pill-label');
|
||||
const white = pill.querySelector('.pill-label-hover');
|
||||
|
||||
if (label) gsap.set(label, { y: 0 });
|
||||
if (white) gsap.set(white, { y: h + 12, opacity: 0 });
|
||||
|
||||
const index = circleRefs.current.indexOf(circle);
|
||||
if (index === -1) return;
|
||||
|
||||
tlRefs.current[index]?.kill();
|
||||
const tl = gsap.timeline({ paused: true });
|
||||
|
||||
tl.to(circle, { scale: 1.2, xPercent: -50, duration: 2, ease, overwrite: 'auto' }, 0);
|
||||
|
||||
if (label) {
|
||||
tl.to(label, { y: -(h + 8), duration: 2, ease, overwrite: 'auto' }, 0);
|
||||
}
|
||||
|
||||
if (white) {
|
||||
gsap.set(white, { y: Math.ceil(h + 100), opacity: 0 });
|
||||
tl.to(white, { y: 0, opacity: 1, duration: 2, ease, overwrite: 'auto' }, 0);
|
||||
}
|
||||
|
||||
tlRefs.current[index] = tl;
|
||||
});
|
||||
};
|
||||
|
||||
layout();
|
||||
|
||||
const onResize = () => layout();
|
||||
window.addEventListener('resize', onResize);
|
||||
|
||||
if (document.fonts?.ready) {
|
||||
document.fonts.ready.then(layout).catch(() => {});
|
||||
}
|
||||
|
||||
const menu = mobileMenuRef.current;
|
||||
if (menu) {
|
||||
gsap.set(menu, { visibility: 'hidden', opacity: 0, scaleY: 1 });
|
||||
}
|
||||
|
||||
if (initialLoadAnimation) {
|
||||
const logoEl = logoRef.current;
|
||||
const navItems = navItemsRef.current;
|
||||
|
||||
if (logoEl) {
|
||||
gsap.set(logoEl, { scale: 0 });
|
||||
gsap.to(logoEl, { scale: 1, duration: 0.6, ease });
|
||||
}
|
||||
|
||||
if (navItems) {
|
||||
gsap.set(navItems, { width: 0, overflow: 'hidden' });
|
||||
gsap.to(navItems, { width: 'auto', duration: 0.6, ease });
|
||||
}
|
||||
}
|
||||
|
||||
return () => window.removeEventListener('resize', onResize);
|
||||
}, [items, ease, initialLoadAnimation]);
|
||||
|
||||
const handleEnter = i => {
|
||||
const tl = tlRefs.current[i];
|
||||
if (!tl) return;
|
||||
activeTweenRefs.current[i]?.kill();
|
||||
activeTweenRefs.current[i] = tl.tweenTo(tl.duration(), { duration: 0.3, ease, overwrite: 'auto' });
|
||||
};
|
||||
|
||||
const handleLeave = i => {
|
||||
const tl = tlRefs.current[i];
|
||||
if (!tl) return;
|
||||
activeTweenRefs.current[i]?.kill();
|
||||
activeTweenRefs.current[i] = tl.tweenTo(0, { duration: 0.2, ease, overwrite: 'auto' });
|
||||
};
|
||||
|
||||
const toggleMobileMenu = () => {
|
||||
const newState = !isMobileMenuOpen;
|
||||
setIsMobileMenuOpen(newState);
|
||||
|
||||
const hamburger = hamburgerRef.current;
|
||||
const menu = mobileMenuRef.current;
|
||||
|
||||
if (hamburger) {
|
||||
const lines = hamburger.querySelectorAll('.hamburger-line');
|
||||
if (newState) {
|
||||
gsap.to(lines[0], { rotation: 45, y: 3, duration: 0.3, ease });
|
||||
gsap.to(lines[1], { rotation: -45, y: -3, duration: 0.3, ease });
|
||||
} else {
|
||||
gsap.to(lines[0], { rotation: 0, y: 0, duration: 0.3, ease });
|
||||
gsap.to(lines[1], { rotation: 0, y: 0, duration: 0.3, ease });
|
||||
}
|
||||
}
|
||||
|
||||
if (menu) {
|
||||
if (newState) {
|
||||
gsap.set(menu, { visibility: 'visible' });
|
||||
gsap.fromTo(
|
||||
menu,
|
||||
{ opacity: 0, y: 10, scaleY: 1 },
|
||||
{ opacity: 1, y: 0, scaleY: 1, duration: 0.3, ease, transformOrigin: 'top center' }
|
||||
);
|
||||
} else {
|
||||
gsap.to(menu, {
|
||||
opacity: 0,
|
||||
y: 10,
|
||||
scaleY: 1,
|
||||
duration: 0.2,
|
||||
ease,
|
||||
transformOrigin: 'top center',
|
||||
onComplete: () => gsap.set(menu, { visibility: 'hidden' })
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onMobileMenuClick?.();
|
||||
};
|
||||
|
||||
const cssVars = {
|
||||
['--base']: baseColor,
|
||||
['--pill-bg']: pillColor,
|
||||
['--hover-text']: hoveredPillTextColor,
|
||||
['--pill-text']: resolvedPillTextColor
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="pill-nav-container">
|
||||
<nav className={`pill-nav ${className}`} aria-label="Primary" style={cssVars}>
|
||||
<Link className="pill-logo" href="/" aria-label="Strona główna" ref={logoRef}>
|
||||
{logoContent}
|
||||
</Link>
|
||||
|
||||
<div className="pill-nav-items desktop-only" ref={navItemsRef}>
|
||||
<ul className="pill-list" role="menubar">
|
||||
{items.map((item, i) => {
|
||||
const isExternal = item.href.startsWith('http') || item.href.startsWith('tel:') || item.href.startsWith('mailto:');
|
||||
const Element = isExternal ? 'a' : Link;
|
||||
|
||||
return (
|
||||
<li key={item.href || `item-${i}`} role="none">
|
||||
<Element
|
||||
role="menuitem"
|
||||
href={item.href}
|
||||
className={`pill${activeHref === item.href ? ' is-active' : ''}`}
|
||||
aria-label={item.ariaLabel || item.label}
|
||||
onMouseEnter={() => handleEnter(i)}
|
||||
onMouseLeave={() => handleLeave(i)}
|
||||
>
|
||||
<span
|
||||
className="hover-circle"
|
||||
aria-hidden="true"
|
||||
ref={el => {
|
||||
circleRefs.current[i] = el;
|
||||
}}
|
||||
/>
|
||||
<span className="label-stack">
|
||||
<span className="pill-label">{item.label}</span>
|
||||
<span className="pill-label-hover" aria-hidden="true">
|
||||
{item.label}
|
||||
</span>
|
||||
</span>
|
||||
</Element>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{actions && (
|
||||
<div className="pill-nav-actions desktop-only" style={{ marginLeft: 'auto', paddingLeft: '24px' }}>
|
||||
{actions}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<button
|
||||
className="mobile-menu-button mobile-only"
|
||||
onClick={toggleMobileMenu}
|
||||
aria-label="Otwórz menu"
|
||||
ref={hamburgerRef}
|
||||
>
|
||||
<span className="hamburger-line" />
|
||||
<span className="hamburger-line" />
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div className="mobile-menu-popover mobile-only" ref={mobileMenuRef} style={cssVars}>
|
||||
<ul className="mobile-menu-list">
|
||||
{items.map((item, i) => {
|
||||
const isExternal = item.href.startsWith('http') || item.href.startsWith('tel:') || item.href.startsWith('mailto:');
|
||||
const Element = isExternal ? 'a' : Link;
|
||||
return (
|
||||
<li key={item.href || `mobile-item-${i}`}>
|
||||
<Element
|
||||
href={item.href}
|
||||
className={`mobile-menu-link${activeHref === item.href ? ' is-active' : ''}`}
|
||||
onClick={() => setIsMobileMenuOpen(false)}
|
||||
>
|
||||
{item.label}
|
||||
</Element>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
{mobileActions && (
|
||||
<div className="mobile-menu-actions">
|
||||
{mobileActions}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default PillNav;
|
||||
@@ -0,0 +1,150 @@
|
||||
"use client";
|
||||
|
||||
import React, { useRef, useEffect } from "react";
|
||||
import gsap from "gsap";
|
||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
import { fixOrphans } from "@/lib/typography";
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
}
|
||||
|
||||
export interface ProcessStep {
|
||||
num: string;
|
||||
title: string;
|
||||
desc: string;
|
||||
}
|
||||
|
||||
interface ProcessTimelineProps {
|
||||
steps: ProcessStep[];
|
||||
}
|
||||
|
||||
export function ProcessTimeline({ steps }: ProcessTimelineProps) {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const lineRef = useRef<HTMLDivElement>(null);
|
||||
const dotRefs = useRef<(HTMLDivElement | null)[]>([]);
|
||||
const textRefs = useRef<(HTMLDivElement | null)[]>([]);
|
||||
const mobileLineRefs = useRef<(HTMLDivElement | null)[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
const isReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||||
|
||||
if (isReducedMotion) {
|
||||
gsap.set(lineRef.current, { scaleX: 1 });
|
||||
gsap.set(dotRefs.current, { backgroundColor: "#1E3A5F", borderColor: "#1E3A5F", color: "#ffffff" });
|
||||
gsap.set(textRefs.current, { opacity: 1 });
|
||||
gsap.set(mobileLineRefs.current, { scaleY: 1 });
|
||||
return;
|
||||
}
|
||||
|
||||
const tl = gsap.timeline({
|
||||
scrollTrigger: {
|
||||
trigger: containerRef.current,
|
||||
start: "top center+=20%",
|
||||
end: "bottom center",
|
||||
scrub: true,
|
||||
},
|
||||
});
|
||||
|
||||
// 1. Pozioma linia (desktop) - od lewej do prawej
|
||||
tl.to(lineRef.current, { scaleX: 1, ease: "none", duration: 1 }, 0);
|
||||
|
||||
// 2. Kropki i tekst oraz pionowe linie (mobile)
|
||||
steps.forEach((_, i) => {
|
||||
// Progress w skali 0-1 wzdłuż osi czasu (każdy krok to ułamek całkowitego czasu)
|
||||
const progress = i / (steps.length - 1 || 1);
|
||||
|
||||
// Punkt aktywacji - natychmiastowa zmiana koloru kropki
|
||||
tl.to(
|
||||
dotRefs.current[i],
|
||||
{
|
||||
backgroundColor: "#1E3A5F",
|
||||
borderColor: "#1E3A5F",
|
||||
color: "#ffffff",
|
||||
duration: 0.05,
|
||||
},
|
||||
progress
|
||||
);
|
||||
|
||||
// Fade in tekstu (wchodzenie od 0.3 do 1.0 opacity)
|
||||
tl.fromTo(
|
||||
textRefs.current[i],
|
||||
{ opacity: 0.4 },
|
||||
{ opacity: 1, duration: 0.15 },
|
||||
progress
|
||||
);
|
||||
|
||||
// Pionowa linia do następnego punktu (na mobile) - wypełnia się między progresem i następnym progresem
|
||||
if (i < steps.length - 1 && mobileLineRefs.current[i]) {
|
||||
const nextProgress = (i + 1) / (steps.length - 1);
|
||||
const segmentDuration = nextProgress - progress;
|
||||
tl.fromTo(
|
||||
mobileLineRefs.current[i],
|
||||
{ scaleY: 0 },
|
||||
{ scaleY: 1, ease: "none", duration: segmentDuration },
|
||||
progress
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
return () => {
|
||||
if (tl.scrollTrigger) {
|
||||
tl.scrollTrigger.kill();
|
||||
}
|
||||
tl.kill();
|
||||
};
|
||||
}, [steps]);
|
||||
|
||||
return (
|
||||
<div ref={containerRef} className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative">
|
||||
{/* Pozioma linia przerywana (Tło) - tylko Desktop */}
|
||||
<div className="hidden lg:block absolute top-[15px] left-10 right-10 h-[2px] border-b-[2px] border-dashed border-brand-border" />
|
||||
|
||||
{/* Pozioma linia wypełniająca (Postęp) - tylko Desktop */}
|
||||
<div
|
||||
ref={lineRef}
|
||||
className="hidden lg:block absolute top-[15px] left-10 right-10 h-[2px] bg-brand-primary origin-left scale-x-0 z-0"
|
||||
/>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-5 gap-8 lg:gap-4 relative z-10">
|
||||
{steps.map((step, idx) => (
|
||||
<div key={idx} className="relative pl-12 lg:pl-0">
|
||||
|
||||
{/* Pionowa linia przerywana (Tło) - tylko Mobile */}
|
||||
{idx < steps.length - 1 && (
|
||||
<div className="block lg:hidden absolute left-[15px] top-8 bottom-[-2rem] w-[2px] border-l-[2px] border-dashed border-brand-border" />
|
||||
)}
|
||||
|
||||
{/* Pionowa linia wypełniająca (Postęp) - tylko Mobile */}
|
||||
{idx < steps.length - 1 && (
|
||||
<div
|
||||
ref={(el) => { mobileLineRefs.current[idx] = el; }}
|
||||
className="block lg:hidden absolute left-[15px] top-8 bottom-[-2rem] w-[2px] bg-brand-primary origin-top scale-y-0"
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="flex lg:flex-col gap-4 lg:gap-6 items-start">
|
||||
{/* Kropka / Numer */}
|
||||
<div
|
||||
ref={(el) => { dotRefs.current[idx] = el; }}
|
||||
className="absolute left-0 lg:static flex-shrink-0 w-8 h-8 rounded-full bg-brand-surface border-[2px] border-brand-border text-brand-muted flex items-center justify-center font-mono text-[11px] font-bold transition-colors z-10"
|
||||
>
|
||||
{step.num}
|
||||
</div>
|
||||
|
||||
{/* Tekst (Tytuł i Opis) */}
|
||||
<div ref={(el) => { textRefs.current[idx] = el; }} className="opacity-40 lg:pt-2">
|
||||
<h4 className="mb-2 text-[1.125rem] lg:text-[1.25rem] leading-tight text-balance text-brand-text font-heading font-semibold">
|
||||
{fixOrphans(step.title)}
|
||||
</h4>
|
||||
<p className="text-[0.9375rem] lg:text-[1rem] text-brand-muted text-pretty">
|
||||
{fixOrphans(step.desc)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
"use client";
|
||||
|
||||
import React, { useRef } from "react";
|
||||
import { motion, useInView } from "framer-motion";
|
||||
|
||||
interface RevealProps {
|
||||
children: React.ReactNode;
|
||||
delay?: number;
|
||||
direction?: "up" | "down" | "left" | "right";
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function Reveal({ children, delay = 0, direction = "up", className = "" }: RevealProps) {
|
||||
const ref = useRef(null);
|
||||
const isInView = useInView(ref, { once: true, margin: "-100px" });
|
||||
|
||||
const getInitial = () => {
|
||||
switch (direction) {
|
||||
case "up":
|
||||
return { y: 60, opacity: 0 };
|
||||
case "down":
|
||||
return { y: -60, opacity: 0 };
|
||||
case "left":
|
||||
return { x: 60, opacity: 0 };
|
||||
case "right":
|
||||
return { x: -60, opacity: 0 };
|
||||
default:
|
||||
return { y: 60, opacity: 0 };
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div ref={ref} className={`relative overflow-hidden ${className}`}>
|
||||
<motion.div
|
||||
className="w-full h-full"
|
||||
variants={{
|
||||
hidden: getInitial(),
|
||||
visible: {
|
||||
y: 0,
|
||||
x: 0,
|
||||
opacity: 1,
|
||||
// Ostre, "mechaniczne" zwolnienie na końcu ruchu
|
||||
transition: { duration: 0.6, delay, ease: [0.16, 1, 0.3, 1] }
|
||||
},
|
||||
}}
|
||||
initial="hidden"
|
||||
animate={isInView ? "visible" : "hidden"}
|
||||
>
|
||||
{children}
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
.scroll-expand {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.scroll-expand--scroller {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
|
||||
.scroll-expand--scroller::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scroll-expand__track {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.scroll-expand__stage {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
--se-title-size: 4rem;
|
||||
}
|
||||
|
||||
.scroll-expand__frame {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
clip-path: inset(21% 29% 21% 29% round 24px);
|
||||
will-change: clip-path;
|
||||
}
|
||||
|
||||
.scroll-expand__media {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
will-change: transform;
|
||||
transform-origin: center;
|
||||
user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
|
||||
.scroll-expand__scrim {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
pointer-events: none;
|
||||
background: linear-gradient(to top, rgba(10, 14, 20, 0.85), rgba(10, 14, 20, 0.15) 45%, rgba(10, 14, 20, 0.4));
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.scroll-expand__overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
padding: 6%;
|
||||
opacity: 0;
|
||||
will-change: opacity, transform;
|
||||
}
|
||||
|
||||
.scroll-expand__title {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
padding: 0 6%;
|
||||
text-align: center;
|
||||
font-size: var(--se-title-size);
|
||||
font-weight: 700;
|
||||
font-family: var(--font-heading), sans-serif;
|
||||
letter-spacing: -0.02em;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
|
||||
pointer-events: none;
|
||||
will-change: opacity, transform;
|
||||
}
|
||||
|
||||
.scroll-expand__hint {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 1.25rem;
|
||||
text-align: center;
|
||||
font-size: 0.8125rem;
|
||||
font-family: var(--font-mono), monospace;
|
||||
letter-spacing: 0.05em;
|
||||
text-transform: uppercase;
|
||||
color: rgba(255, 255, 255, 0.55);
|
||||
pointer-events: none;
|
||||
will-change: opacity, transform;
|
||||
}
|
||||
@@ -0,0 +1,263 @@
|
||||
'use client';
|
||||
|
||||
import { useCallback, useEffect, useRef } from 'react';
|
||||
import { ImageWithSkeleton } from './ImageWithSkeleton';
|
||||
|
||||
import './ScrollExpand.css';
|
||||
|
||||
const clamp = (v, a, b) => (v < a ? a : v > b ? b : v);
|
||||
|
||||
const smoothstep = (edge0, edge1, x) => {
|
||||
const t = clamp((x - edge0) / (edge1 - edge0 || 1e-6), 0, 1);
|
||||
return t * t * (3 - 2 * t);
|
||||
};
|
||||
|
||||
const ScrollExpand = ({
|
||||
src = '',
|
||||
mediaType = 'image',
|
||||
poster = '',
|
||||
alt = '',
|
||||
title = '',
|
||||
scrollHint = '',
|
||||
startWidth = 42,
|
||||
startHeight = 58,
|
||||
startRadius = 24,
|
||||
endRadius = 0,
|
||||
mediaZoom = 1.35,
|
||||
scrollDistance = 1.2,
|
||||
holdDistance = 0.35,
|
||||
smoothing = 0.1,
|
||||
overlayScrim = 0.45,
|
||||
useWindowScroll = false,
|
||||
enabled = true,
|
||||
children,
|
||||
className = '',
|
||||
style,
|
||||
...rest
|
||||
}) => {
|
||||
const rootRef = useRef(null);
|
||||
const trackRef = useRef(null);
|
||||
const stageRef = useRef(null);
|
||||
const frameRef = useRef(null);
|
||||
const mediaRef = useRef(null);
|
||||
const titleRef = useRef(null);
|
||||
const overlayRef = useRef(null);
|
||||
const scrimRef = useRef(null);
|
||||
const hintRef = useRef(null);
|
||||
|
||||
const propsRef = useRef({});
|
||||
propsRef.current = {
|
||||
startWidth,
|
||||
startHeight,
|
||||
startRadius,
|
||||
endRadius,
|
||||
mediaZoom,
|
||||
scrollDistance,
|
||||
holdDistance,
|
||||
smoothing,
|
||||
overlayScrim,
|
||||
useWindowScroll,
|
||||
useWindowScroll,
|
||||
enabled,
|
||||
mobileStartWidth: 85,
|
||||
mobileStartHeight: 45,
|
||||
mobileStartRadius: 12,
|
||||
mobileScrollDistance: 0.8,
|
||||
mobileHoldDistance: 0.15
|
||||
};
|
||||
|
||||
const applyProgress = useCallback(p => {
|
||||
const frame = frameRef.current;
|
||||
const media = mediaRef.current;
|
||||
if (!frame || !media) return;
|
||||
const c = propsRef.current;
|
||||
|
||||
const e = smoothstep(0, 1, p);
|
||||
|
||||
const w = (c._activeStartWidth || c.startWidth) + (100 - (c._activeStartWidth || c.startWidth)) * e;
|
||||
const h = (c._activeStartHeight || c.startHeight) + (100 - (c._activeStartHeight || c.startHeight)) * e;
|
||||
const ix = Math.max(0, (100 - w) / 2);
|
||||
const iy = Math.max(0, (100 - h) / 2);
|
||||
const r = (c._activeStartRadius || c.startRadius) + (c.endRadius - (c._activeStartRadius || c.startRadius)) * e;
|
||||
frame.style.clipPath = `inset(${iy}% ${ix}% ${iy}% ${ix}% round ${r}px)`;
|
||||
|
||||
media.style.transform = `scale(${c.mediaZoom + (1 - c.mediaZoom) * e})`;
|
||||
|
||||
if (scrimRef.current) scrimRef.current.style.opacity = `${c.overlayScrim * e}`;
|
||||
|
||||
if (titleRef.current) {
|
||||
const out = smoothstep(0.4, 0.88, p);
|
||||
titleRef.current.style.opacity = `${1 - out}`;
|
||||
titleRef.current.style.transform = `translate3d(0, ${-28 * out}px, 0) scale(${1 + 0.06 * out})`;
|
||||
}
|
||||
|
||||
if (hintRef.current) {
|
||||
const gone = smoothstep(0, 0.12, p);
|
||||
hintRef.current.style.opacity = `${1 - gone}`;
|
||||
hintRef.current.style.transform = `translate3d(0, ${8 * gone}px, 0)`;
|
||||
}
|
||||
|
||||
if (overlayRef.current) {
|
||||
const inn = smoothstep(0.68, 1, p);
|
||||
overlayRef.current.style.opacity = `${inn}`;
|
||||
overlayRef.current.style.transform = `translate3d(0, ${18 * (1 - inn)}px, 0)`;
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const root = rootRef.current;
|
||||
const track = trackRef.current;
|
||||
const stage = stageRef.current;
|
||||
if (!root || !track || !stage) return;
|
||||
|
||||
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
let raf = 0;
|
||||
let current = 0;
|
||||
let target = 0;
|
||||
let stageH = 0;
|
||||
let running = false;
|
||||
|
||||
const measure = () => {
|
||||
const c = propsRef.current;
|
||||
const w = root.clientWidth || window.innerWidth;
|
||||
const isMobile = w < 768;
|
||||
|
||||
// Update dynamic props for applyProgress and measure
|
||||
c._activeStartWidth = isMobile ? c.mobileStartWidth : c.startWidth;
|
||||
c._activeStartHeight = isMobile ? c.mobileStartHeight : c.startHeight;
|
||||
c._activeStartRadius = isMobile ? c.mobileStartRadius : c.startRadius;
|
||||
c._activeScrollDistance = isMobile ? c.mobileScrollDistance : c.scrollDistance;
|
||||
c._activeHoldDistance = isMobile ? c.mobileHoldDistance : c.holdDistance;
|
||||
|
||||
stageH = c.useWindowScroll ? window.innerHeight : root.clientHeight;
|
||||
if (stageH <= 0) return;
|
||||
stage.style.height = `${stageH}px`;
|
||||
track.style.height = `${stageH * (1 + Math.max(0, c._activeScrollDistance) + Math.max(0, c._activeHoldDistance))}px`;
|
||||
|
||||
stage.style.setProperty('--se-title-size', `${clamp(w * 0.075, 20, 84)}px`);
|
||||
};
|
||||
|
||||
const readProgress = () => {
|
||||
const c = propsRef.current;
|
||||
if (!c.enabled) return 1;
|
||||
const span = stageH * Math.max(0.01, c._activeScrollDistance || c.scrollDistance);
|
||||
if (c.useWindowScroll) {
|
||||
const top = track.getBoundingClientRect().top;
|
||||
return clamp(-top / span, 0, 1);
|
||||
}
|
||||
return clamp(root.scrollTop / span, 0, 1);
|
||||
};
|
||||
|
||||
const tick = () => {
|
||||
const c = propsRef.current;
|
||||
const k = c.smoothing <= 0 ? 1 : 1 - Math.exp(-1 / (60 * c.smoothing));
|
||||
current += (target - current) * k;
|
||||
if (Math.abs(target - current) < 0.0004) {
|
||||
current = target;
|
||||
running = false;
|
||||
}
|
||||
applyProgress(current);
|
||||
raf = running ? requestAnimationFrame(tick) : 0;
|
||||
};
|
||||
|
||||
const kick = () => {
|
||||
if (running) return;
|
||||
running = true;
|
||||
if (!raf) raf = requestAnimationFrame(tick);
|
||||
};
|
||||
|
||||
const onScroll = () => {
|
||||
target = readProgress();
|
||||
if (propsRef.current.smoothing <= 0 || reduceMotion) {
|
||||
current = target;
|
||||
applyProgress(current);
|
||||
return;
|
||||
}
|
||||
kick();
|
||||
};
|
||||
|
||||
const onResize = () => {
|
||||
measure();
|
||||
target = readProgress();
|
||||
current = target;
|
||||
applyProgress(current);
|
||||
};
|
||||
|
||||
measure();
|
||||
target = readProgress();
|
||||
current = target;
|
||||
applyProgress(current);
|
||||
|
||||
const scroller = useWindowScroll ? window : root;
|
||||
scroller.addEventListener('scroll', onScroll, { passive: true });
|
||||
window.addEventListener('resize', onResize);
|
||||
const ro = new ResizeObserver(onResize);
|
||||
ro.observe(root);
|
||||
|
||||
return () => {
|
||||
if (raf) cancelAnimationFrame(raf);
|
||||
scroller.removeEventListener('scroll', onScroll);
|
||||
window.removeEventListener('resize', onResize);
|
||||
ro.disconnect();
|
||||
};
|
||||
}, [applyProgress, useWindowScroll]);
|
||||
|
||||
const media =
|
||||
mediaType === 'video' ? (
|
||||
<video
|
||||
ref={mediaRef}
|
||||
className="scroll-expand__media"
|
||||
src={src}
|
||||
poster={poster}
|
||||
autoPlay
|
||||
muted
|
||||
loop
|
||||
playsInline
|
||||
/>
|
||||
) : (
|
||||
<ImageWithSkeleton
|
||||
ref={mediaRef}
|
||||
wrapperClassName="scroll-expand__media"
|
||||
className="w-full h-full object-cover"
|
||||
src={src}
|
||||
alt={alt}
|
||||
draggable={false}
|
||||
/>
|
||||
);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={rootRef}
|
||||
className={`scroll-expand ${useWindowScroll ? '' : 'scroll-expand--scroller'} ${className}`.trim()}
|
||||
style={style}
|
||||
{...rest}
|
||||
>
|
||||
<div ref={trackRef} className="scroll-expand__track">
|
||||
<div ref={stageRef} className="scroll-expand__stage">
|
||||
<div ref={frameRef} className="scroll-expand__frame">
|
||||
{media}
|
||||
<div ref={scrimRef} className="scroll-expand__scrim" />
|
||||
{children ? (
|
||||
<div ref={overlayRef} className="scroll-expand__overlay">
|
||||
{children}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{title ? (
|
||||
<div ref={titleRef} className="scroll-expand__title text-balance">
|
||||
{title}
|
||||
</div>
|
||||
) : null}
|
||||
{scrollHint ? (
|
||||
<div ref={hintRef} className="scroll-expand__hint">
|
||||
{scrollHint}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ScrollExpand;
|
||||
@@ -0,0 +1,11 @@
|
||||
.scroll-float {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.scroll-float-text {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.char {
|
||||
display: inline-block;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
'use client';
|
||||
|
||||
import React, { useEffect, useMemo, useRef } from 'react';
|
||||
import { gsap } from 'gsap';
|
||||
import { ScrollTrigger } from 'gsap/ScrollTrigger';
|
||||
import './ScrollFloat.css';
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
|
||||
const ScrollFloat = ({
|
||||
children,
|
||||
scrollContainerRef = null,
|
||||
containerClassName = '',
|
||||
textClassName = '',
|
||||
animationDuration = 1,
|
||||
ease = 'power3.out',
|
||||
scrollStart = 'center bottom+=50%',
|
||||
scrollEnd = 'bottom bottom-=40%',
|
||||
stagger = 0.03
|
||||
}) => {
|
||||
const containerRef = useRef(null);
|
||||
const splitText = useMemo(() => {
|
||||
const text = typeof children === 'string' ? children : '';
|
||||
// Dzielimy na słowa, żeby nie łamać wpół słów przy zawijaniu
|
||||
return text.split(' ').map((word, wordIndex, wordsArray) => (
|
||||
<React.Fragment key={wordIndex}>
|
||||
<span className="scroll-float-word" style={{ display: 'inline-block', whiteSpace: 'nowrap' }}>
|
||||
{word.split('').map((char, index) => (
|
||||
<span className="char" key={index} style={{ display: 'inline-block' }}>
|
||||
{char}
|
||||
</span>
|
||||
))}
|
||||
</span>
|
||||
{/* Dodajemy spację po każdym słowie, z wyjątkiem ostatniego */}
|
||||
{wordIndex < wordsArray.length - 1 ? ' ' : ''}
|
||||
</React.Fragment>
|
||||
));
|
||||
}, [children]);
|
||||
|
||||
useEffect(() => {
|
||||
const el = containerRef.current;
|
||||
if (!el) return;
|
||||
const scroller = scrollContainerRef && scrollContainerRef.current ? scrollContainerRef.current : window;
|
||||
const charElements = el.querySelectorAll('.char');
|
||||
|
||||
// We remove the prefers-reduced-motion check to ensure the animation runs on all mobile devices
|
||||
// as requested by the user, since some mobile OS aggressively enable it.
|
||||
|
||||
gsap.fromTo(
|
||||
charElements,
|
||||
{
|
||||
willChange: 'opacity, transform',
|
||||
opacity: 0,
|
||||
yPercent: 120,
|
||||
scaleY: 2.3,
|
||||
scaleX: 0.7,
|
||||
transformOrigin: '50% 0%'
|
||||
},
|
||||
{
|
||||
duration: animationDuration,
|
||||
ease: ease,
|
||||
opacity: 1,
|
||||
yPercent: 0,
|
||||
scaleY: 1,
|
||||
scaleX: 1,
|
||||
stagger: stagger,
|
||||
scrollTrigger: {
|
||||
trigger: el,
|
||||
scroller,
|
||||
start: scrollStart,
|
||||
end: scrollEnd,
|
||||
scrub: true
|
||||
}
|
||||
}
|
||||
);
|
||||
}, [scrollContainerRef, animationDuration, ease, scrollStart, scrollEnd, stagger]);
|
||||
|
||||
return (
|
||||
<h2 ref={containerRef} className={`scroll-float ${containerClassName}`}>
|
||||
<span className={`scroll-float-text ${textClassName}`}>{splitText}</span>
|
||||
</h2>
|
||||
);
|
||||
};
|
||||
|
||||
export default ScrollFloat;
|
||||
@@ -0,0 +1,86 @@
|
||||
import React from "react";
|
||||
import { Reveal } from "@/components/ui/Reveal";
|
||||
import ScrollFloat from "@/components/ui/ScrollFloat";
|
||||
import { fixOrphans } from "@/lib/typography";
|
||||
|
||||
interface SectionHeaderProps {
|
||||
eyebrow?: React.ReactNode;
|
||||
title: string;
|
||||
lead?: string;
|
||||
align?: "left" | "center";
|
||||
theme?: "light" | "dark";
|
||||
size?: "md" | "lg" | "xl";
|
||||
className?: string;
|
||||
delay?: number;
|
||||
}
|
||||
|
||||
export function SectionHeader({
|
||||
eyebrow,
|
||||
title,
|
||||
lead,
|
||||
align = "center",
|
||||
theme = "light",
|
||||
size = "lg",
|
||||
className = "",
|
||||
delay = 0,
|
||||
}: SectionHeaderProps) {
|
||||
const isCenter = align === "center";
|
||||
const isDark = theme === "dark";
|
||||
|
||||
const wrapperClass = `flex flex-col w-full ${
|
||||
isCenter ? "items-center text-center mx-auto" : "items-start text-left"
|
||||
} ${className}`;
|
||||
|
||||
const eyebrowClass = `font-mono text-small-mobile tracking-widest uppercase mb-6 ${
|
||||
isDark ? "text-white/70" : "text-brand-primary"
|
||||
}`;
|
||||
|
||||
let sizeClass = "";
|
||||
let leadSizeClass = "text-[1.125rem] md:text-[1.25rem]";
|
||||
let leadMaxW = "max-w-3xl";
|
||||
|
||||
if (size === "md") {
|
||||
sizeClass = "text-[2rem] md:text-[2.5rem] lg:text-[3rem] max-w-2xl";
|
||||
leadMaxW = "max-w-2xl";
|
||||
} else if (size === "lg") {
|
||||
sizeClass = "text-[2rem] md:text-[2.5rem] lg:text-[3.5rem] max-w-3xl";
|
||||
leadMaxW = "max-w-3xl";
|
||||
} else if (size === "xl") {
|
||||
sizeClass = "text-[2.5rem] md:text-[3.5rem] lg:text-[4.5rem] max-w-4xl";
|
||||
leadSizeClass = "text-[1.25rem] md:text-[1.5rem]";
|
||||
leadMaxW = "max-w-2xl";
|
||||
}
|
||||
|
||||
const titleClass = `${sizeClass} leading-[1.1] mb-8 font-heading font-bold text-balance ${
|
||||
isDark ? "text-white" : "text-brand-text"
|
||||
} ${isCenter ? "mx-auto text-center" : ""}`;
|
||||
|
||||
const leadClass = `${leadSizeClass} font-light leading-relaxed text-pretty ${leadMaxW} ${
|
||||
isDark ? "text-white/70" : "text-brand-muted"
|
||||
} ${isCenter ? "mx-auto text-center" : ""}`;
|
||||
|
||||
return (
|
||||
<div className={wrapperClass}>
|
||||
{eyebrow && (
|
||||
<Reveal delay={delay} className={`w-full flex ${isCenter ? "justify-center" : "justify-start"}`}>
|
||||
<div className={eyebrowClass}>{eyebrow}</div>
|
||||
</Reveal>
|
||||
)}
|
||||
<ScrollFloat
|
||||
animationDuration={1}
|
||||
ease="power3.out"
|
||||
scrollStart="center bottom+=20%"
|
||||
scrollEnd="bottom bottom-=20%"
|
||||
stagger={0.02}
|
||||
containerClassName={titleClass}
|
||||
>
|
||||
{title}
|
||||
</ScrollFloat>
|
||||
{lead && (
|
||||
<Reveal delay={delay + 0.2} className={`w-full flex ${isCenter ? "justify-center" : "justify-start"}`}>
|
||||
<p className={leadClass}>{fixOrphans(lead)}</p>
|
||||
</Reveal>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
|
||||
interface SkeletonProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function Skeleton({ className = "" }: SkeletonProps) {
|
||||
return (
|
||||
<div
|
||||
className={`relative overflow-hidden bg-zinc-100 ${className}`}
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div
|
||||
className="absolute inset-0 -translate-x-full animate-shimmer"
|
||||
style={{
|
||||
backgroundImage:
|
||||
"linear-gradient(90deg, transparent 0%, rgba(228, 228, 231, 0.6) 50%, transparent 100%)",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
.specular-button {
|
||||
--sb-radius: 8px;
|
||||
--sb-tint: #ffffff;
|
||||
--sb-tint-opacity: 0;
|
||||
--sb-blur: 0px;
|
||||
--sb-text-color: #f5f5f5;
|
||||
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.01em;
|
||||
line-height: 1;
|
||||
color: var(--sb-text-color);
|
||||
background: color-mix(in srgb, var(--sb-tint) calc(var(--sb-tint-opacity) * 100%), transparent);
|
||||
border-radius: var(--sb-radius);
|
||||
backdrop-filter: blur(var(--sb-blur));
|
||||
-webkit-backdrop-filter: blur(var(--sb-blur));
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.specular-button:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.specular-button:focus-visible {
|
||||
outline: 2px solid color-mix(in srgb, var(--sb-text-color) 60%, transparent);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.specular-button:disabled {
|
||||
opacity: 0.55;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.specular-button--sm {
|
||||
font-size: 14px;
|
||||
height: 36px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.specular-button--md {
|
||||
font-size: 15px;
|
||||
height: 44px;
|
||||
padding: 0 24px;
|
||||
}
|
||||
|
||||
.specular-button--lg {
|
||||
font-size: 16px;
|
||||
height: 52px;
|
||||
padding: 0 32px;
|
||||
}
|
||||
|
||||
.specular-button__fx {
|
||||
position: absolute;
|
||||
inset: -20px;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.specular-button__fx canvas {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.specular-button__label {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
"use client";
|
||||
|
||||
import { useRef, useEffect } from 'react';
|
||||
import Link from 'next/link';
|
||||
import { Renderer, Program, Mesh, Triangle, Color } from 'ogl';
|
||||
import './SpecularButton.css';
|
||||
|
||||
const PAD = 20;
|
||||
|
||||
const VERT = `#version 300 es
|
||||
in vec2 position;
|
||||
void main() {
|
||||
gl_Position = vec4(position, 0.0, 1.0);
|
||||
}
|
||||
`;
|
||||
|
||||
const FRAG = `#version 300 es
|
||||
precision highp float;
|
||||
|
||||
uniform vec2 uCenter;
|
||||
uniform vec2 uHalfSize;
|
||||
uniform float uRadius;
|
||||
uniform float uAngle;
|
||||
uniform float uPx;
|
||||
uniform vec3 uLineColor;
|
||||
uniform vec3 uBaseColor;
|
||||
uniform float uIntensity;
|
||||
uniform float uShineSize;
|
||||
uniform float uShineFade;
|
||||
uniform float uThickness;
|
||||
uniform float uBaseWidth;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
float sdRoundedRect(vec2 p, vec2 b, float r) {
|
||||
vec2 q = abs(p) - b + r;
|
||||
return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - r;
|
||||
}
|
||||
|
||||
float shapeSDF(vec2 p) { return sdRoundedRect(p, uHalfSize, uRadius); }
|
||||
|
||||
float gaussianLine(float d, float sigma) {
|
||||
float x = d / (sigma + 1e-6);
|
||||
float k = mix(1.0, 1.6, smoothstep(0.0, 1.5, x));
|
||||
return exp(-k * x * x);
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 p = gl_FragCoord.xy - uCenter;
|
||||
float d = shapeSDF(p);
|
||||
vec2 L = vec2(cos(uAngle), sin(uAngle));
|
||||
|
||||
float base = (1.0 - smoothstep(0.0, uBaseWidth, abs(d))) * 0.45;
|
||||
|
||||
vec2 nEll = normalize(p / (uHalfSize * uHalfSize) + 1e-6);
|
||||
float phi = acos(clamp(abs(dot(nEll, L)), 0.0, 1.0));
|
||||
float rim = 1.0 - smoothstep(uShineSize - uShineFade, uShineSize + uShineFade + 1e-4, phi);
|
||||
float line = gaussianLine(d, uThickness);
|
||||
float edgeClamp = 1.0 - smoothstep(0.5 * uPx, 3.0 * uPx, abs(d));
|
||||
float hi = line * rim * edgeClamp * uIntensity;
|
||||
|
||||
vec3 col = uBaseColor * base + uLineColor * hi;
|
||||
float a = clamp(base + hi, 0.0, 1.0);
|
||||
fragColor = vec4(col, a);
|
||||
}
|
||||
`;
|
||||
|
||||
const SpecularButton = ({
|
||||
children = 'Get Started',
|
||||
size = 'md',
|
||||
radius = 8,
|
||||
tint = '#ffffff',
|
||||
tintOpacity = 0,
|
||||
blur = 0,
|
||||
textColor = '#f5f5f5',
|
||||
lineColor = '#ffffff',
|
||||
baseColor = '#1E3A5F', // nasz granat
|
||||
intensity = 0.8,
|
||||
shineSize = 10,
|
||||
shineFade = 40,
|
||||
thickness = 1,
|
||||
speed = 0.35,
|
||||
followMouse = true,
|
||||
proximity = 250,
|
||||
autoAnimate = false,
|
||||
disabled = false,
|
||||
onClick,
|
||||
href,
|
||||
className = '',
|
||||
type = 'button'
|
||||
}) => {
|
||||
const btnRef = useRef(null);
|
||||
const fxRef = useRef(null);
|
||||
const propsRef = useRef({});
|
||||
|
||||
propsRef.current = { radius, lineColor, baseColor, intensity, shineSize, shineFade, thickness, speed, followMouse, proximity, autoAnimate };
|
||||
|
||||
useEffect(() => {
|
||||
const btn = btnRef.current;
|
||||
const fx = fxRef.current;
|
||||
if (!btn || !fx) return;
|
||||
|
||||
const dpr = window.devicePixelRatio || 1;
|
||||
const renderer = new Renderer({ alpha: true, premultipliedAlpha: true, antialias: true, dpr });
|
||||
const gl = renderer.gl;
|
||||
gl.clearColor(0, 0, 0, 0);
|
||||
gl.enable(gl.BLEND);
|
||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
const geometry = new Triangle(gl);
|
||||
if (geometry.attributes.uv) delete geometry.attributes.uv;
|
||||
|
||||
const program = new Program(gl, {
|
||||
vertex: VERT,
|
||||
fragment: FRAG,
|
||||
uniforms: {
|
||||
uCenter: { value: [0, 0] },
|
||||
uHalfSize: { value: [1, 1] },
|
||||
uRadius: { value: 0 },
|
||||
uAngle: { value: 2.4 },
|
||||
uPx: { value: dpr },
|
||||
uLineColor: { value: [1, 1, 1] },
|
||||
uBaseColor: { value: [0.32, 0.32, 0.32] },
|
||||
uIntensity: { value: 1 },
|
||||
uShineSize: { value: 0.17 },
|
||||
uShineFade: { value: 0.7 },
|
||||
uThickness: { value: 1 },
|
||||
uBaseWidth: { value: dpr }
|
||||
}
|
||||
});
|
||||
|
||||
const mesh = new Mesh(gl, { geometry, program });
|
||||
fx.appendChild(gl.canvas);
|
||||
|
||||
const sizeRef = { w: 1, h: 1 };
|
||||
const resize = () => {
|
||||
const rect = btn.getBoundingClientRect();
|
||||
const w = rect.width;
|
||||
const h = rect.height;
|
||||
sizeRef.w = w;
|
||||
sizeRef.h = h;
|
||||
renderer.setSize(w + PAD * 2, h + PAD * 2);
|
||||
program.uniforms.uCenter.value = [(PAD + w / 2) * dpr, (PAD + h / 2) * dpr];
|
||||
program.uniforms.uHalfSize.value = [(w / 2) * dpr, (h / 2) * dpr];
|
||||
};
|
||||
const ro = new ResizeObserver(resize);
|
||||
ro.observe(btn);
|
||||
resize();
|
||||
|
||||
let pointerAngle = null;
|
||||
let proximityT = 0;
|
||||
const onPointerMove = e => {
|
||||
const rect = btn.getBoundingClientRect();
|
||||
const cx = rect.left + rect.width / 2;
|
||||
const cy = rect.top + rect.height / 2;
|
||||
const dx = Math.max(rect.left - e.clientX, 0, e.clientX - rect.right);
|
||||
const dy = Math.max(rect.top - e.clientY, 0, e.clientY - rect.bottom);
|
||||
const dist = Math.hypot(dx, dy);
|
||||
if (dist === 0) {
|
||||
const nx = (e.clientX - cx) / (rect.width / 2);
|
||||
const ny = (cy - e.clientY) / (rect.height / 2);
|
||||
pointerAngle = Math.atan2(2 / rect.height, -2 / rect.width) + nx * 0.3 + ny * 0.15;
|
||||
} else {
|
||||
pointerAngle = Math.atan2(cy - e.clientY, e.clientX - cx);
|
||||
}
|
||||
const t = Math.max(0, 1 - dist / Math.max(propsRef.current.proximity, 1));
|
||||
proximityT = t * t * (3 - 2 * t);
|
||||
};
|
||||
window.addEventListener('pointermove', onPointerMove);
|
||||
|
||||
let angle = 2.4;
|
||||
let idleAngle = 2.4;
|
||||
let bright = 0;
|
||||
let last = performance.now();
|
||||
let raf = 0;
|
||||
|
||||
const lineC = new Color();
|
||||
const baseC = new Color();
|
||||
|
||||
const update = now => {
|
||||
raf = requestAnimationFrame(update);
|
||||
const dt = Math.min((now - last) / 1000, 0.05);
|
||||
last = now;
|
||||
const p = propsRef.current;
|
||||
|
||||
idleAngle += p.speed * dt;
|
||||
const steer = p.followMouse && pointerAngle != null && (!p.autoAnimate || proximityT > 0);
|
||||
const target = steer ? pointerAngle : idleAngle;
|
||||
const diff = ((target - angle + Math.PI * 3) % (Math.PI * 2)) - Math.PI;
|
||||
angle += diff * (1 - Math.exp(-dt * 7));
|
||||
|
||||
const brightTarget = p.autoAnimate ? 1 : proximityT;
|
||||
bright += (brightTarget - bright) * (1 - Math.exp(-dt * 8));
|
||||
|
||||
lineC.set(p.lineColor);
|
||||
baseC.set(p.baseColor);
|
||||
program.uniforms.uAngle.value = angle;
|
||||
program.uniforms.uRadius.value = Math.min(p.radius, Math.min(sizeRef.w, sizeRef.h) / 2) * dpr;
|
||||
program.uniforms.uLineColor.value = [lineC.r, lineC.g, lineC.b];
|
||||
program.uniforms.uBaseColor.value = [baseC.r, baseC.g, baseC.b];
|
||||
program.uniforms.uIntensity.value = p.intensity * bright;
|
||||
program.uniforms.uShineSize.value = (p.shineSize * Math.PI) / 180;
|
||||
program.uniforms.uShineFade.value = (p.shineFade * Math.PI) / 180;
|
||||
program.uniforms.uThickness.value = p.thickness * dpr;
|
||||
renderer.render({ scene: mesh });
|
||||
};
|
||||
raf = requestAnimationFrame(update);
|
||||
|
||||
return () => {
|
||||
cancelAnimationFrame(raf);
|
||||
ro.disconnect();
|
||||
window.removeEventListener('pointermove', onPointerMove);
|
||||
if (gl.canvas.parentNode === fx) fx.removeChild(gl.canvas);
|
||||
gl.getExtension('WEBGL_lose_context')?.loseContext();
|
||||
};
|
||||
}, []);
|
||||
|
||||
const Component = href ? Link : 'button';
|
||||
const componentProps = href ? { href } : { type, disabled, onClick };
|
||||
|
||||
return (
|
||||
<Component
|
||||
ref={btnRef}
|
||||
{...componentProps}
|
||||
className={`specular-button specular-button--${size}${className ? ` ${className}` : ''}`}
|
||||
style={{
|
||||
'--sb-radius': `${radius}px`,
|
||||
'--sb-tint': tint,
|
||||
'--sb-tint-opacity': tintOpacity,
|
||||
'--sb-blur': `${blur}px`,
|
||||
'--sb-text-color': textColor,
|
||||
backgroundColor: baseColor
|
||||
}}
|
||||
>
|
||||
<span ref={fxRef} className="specular-button__fx" aria-hidden="true" />
|
||||
<span className="specular-button__label">{children}</span>
|
||||
</Component>
|
||||
);
|
||||
};
|
||||
|
||||
export default SpecularButton;
|
||||
@@ -0,0 +1,210 @@
|
||||
"use client";
|
||||
|
||||
import { useRef, useEffect } from 'react';
|
||||
import { Renderer, Program, Mesh, Triangle, Color } from 'ogl';
|
||||
|
||||
const PAD = 20;
|
||||
|
||||
const VERT = `#version 300 es
|
||||
in vec2 position;
|
||||
void main() {
|
||||
gl_Position = vec4(position, 0.0, 1.0);
|
||||
}
|
||||
`;
|
||||
|
||||
const FRAG = `#version 300 es
|
||||
precision highp float;
|
||||
|
||||
uniform vec2 uCenter;
|
||||
uniform vec2 uHalfSize;
|
||||
uniform float uRadius;
|
||||
uniform float uAngle;
|
||||
uniform float uPx;
|
||||
uniform vec3 uLineColor;
|
||||
uniform vec3 uBaseColor;
|
||||
uniform float uIntensity;
|
||||
uniform float uShineSize;
|
||||
uniform float uShineFade;
|
||||
uniform float uThickness;
|
||||
uniform float uBaseWidth;
|
||||
|
||||
out vec4 fragColor;
|
||||
|
||||
float sdRoundedRect(vec2 p, vec2 b, float r) {
|
||||
vec2 q = abs(p) - b + r;
|
||||
return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - r;
|
||||
}
|
||||
|
||||
float shapeSDF(vec2 p) { return sdRoundedRect(p, uHalfSize, uRadius); }
|
||||
|
||||
float gaussianLine(float d, float sigma) {
|
||||
float x = d / (sigma + 1e-6);
|
||||
float k = mix(1.0, 1.6, smoothstep(0.0, 1.5, x));
|
||||
return exp(-k * x * x);
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 p = gl_FragCoord.xy - uCenter;
|
||||
float d = shapeSDF(p);
|
||||
vec2 L = vec2(cos(uAngle), sin(uAngle));
|
||||
|
||||
float base = (1.0 - smoothstep(0.0, uBaseWidth, abs(d))) * 0.45;
|
||||
|
||||
vec2 nEll = normalize(p / (uHalfSize * uHalfSize) + 1e-6);
|
||||
float phi = acos(clamp(abs(dot(nEll, L)), 0.0, 1.0));
|
||||
float rim = 1.0 - smoothstep(uShineSize - uShineFade, uShineSize + uShineFade + 1e-4, phi);
|
||||
float line = gaussianLine(d, uThickness);
|
||||
float edgeClamp = 1.0 - smoothstep(0.5 * uPx, 3.0 * uPx, abs(d));
|
||||
float hi = line * rim * edgeClamp * uIntensity;
|
||||
|
||||
vec3 col = uBaseColor * base + uLineColor * hi;
|
||||
float a = clamp(base + hi, 0.0, 1.0);
|
||||
fragColor = vec4(col, a);
|
||||
}
|
||||
`;
|
||||
|
||||
export function useSpecularEffect({
|
||||
targetRef,
|
||||
radius = 8,
|
||||
lineColor = '#ffffff',
|
||||
baseColor = '#1E3A5F',
|
||||
intensity = 0.8,
|
||||
shineSize = 10,
|
||||
shineFade = 40,
|
||||
thickness = 2.6,
|
||||
speed = 0.35,
|
||||
followMouse = true,
|
||||
proximity = 250,
|
||||
autoAnimate = false,
|
||||
enabled = true
|
||||
}) {
|
||||
const fxRef = useRef(null);
|
||||
const propsRef = useRef({});
|
||||
propsRef.current = { radius, lineColor, baseColor, intensity, shineSize, shineFade, thickness, speed, followMouse, proximity, autoAnimate };
|
||||
|
||||
useEffect(() => {
|
||||
if (!enabled) return undefined;
|
||||
const btn = targetRef.current;
|
||||
const fx = fxRef.current;
|
||||
if (!btn || !fx) return undefined;
|
||||
|
||||
const dpr = window.devicePixelRatio || 1;
|
||||
const renderer = new Renderer({ alpha: true, premultipliedAlpha: true, antialias: true, dpr });
|
||||
const gl = renderer.gl;
|
||||
gl.clearColor(0, 0, 0, 0);
|
||||
gl.enable(gl.BLEND);
|
||||
gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
const geometry = new Triangle(gl);
|
||||
if (geometry.attributes.uv) delete geometry.attributes.uv;
|
||||
|
||||
const program = new Program(gl, {
|
||||
vertex: VERT,
|
||||
fragment: FRAG,
|
||||
uniforms: {
|
||||
uCenter: { value: [0, 0] },
|
||||
uHalfSize: { value: [1, 1] },
|
||||
uRadius: { value: 0 },
|
||||
uAngle: { value: 2.4 },
|
||||
uPx: { value: dpr },
|
||||
uLineColor: { value: [1, 1, 1] },
|
||||
uBaseColor: { value: [0.32, 0.32, 0.32] },
|
||||
uIntensity: { value: 1 },
|
||||
uShineSize: { value: 0.17 },
|
||||
uShineFade: { value: 0.7 },
|
||||
uThickness: { value: 1 },
|
||||
uBaseWidth: { value: dpr }
|
||||
}
|
||||
});
|
||||
|
||||
const mesh = new Mesh(gl, { geometry, program });
|
||||
gl.canvas.style.display = 'block';
|
||||
gl.canvas.style.width = '100%';
|
||||
gl.canvas.style.height = '100%';
|
||||
fx.appendChild(gl.canvas);
|
||||
|
||||
const sizeRef = { w: 1, h: 1 };
|
||||
const resize = () => {
|
||||
const rect = btn.getBoundingClientRect();
|
||||
const w = rect.width;
|
||||
const h = rect.height;
|
||||
sizeRef.w = w;
|
||||
sizeRef.h = h;
|
||||
renderer.setSize(w + PAD * 2, h + PAD * 2);
|
||||
program.uniforms.uCenter.value = [(PAD + w / 2) * dpr, (PAD + h / 2) * dpr];
|
||||
program.uniforms.uHalfSize.value = [(w / 2) * dpr, (h / 2) * dpr];
|
||||
};
|
||||
const ro = new ResizeObserver(resize);
|
||||
ro.observe(btn);
|
||||
resize();
|
||||
|
||||
let pointerAngle = null;
|
||||
let proximityT = 0;
|
||||
const onPointerMove = e => {
|
||||
const rect = btn.getBoundingClientRect();
|
||||
const cx = rect.left + rect.width / 2;
|
||||
const cy = rect.top + rect.height / 2;
|
||||
const dx = Math.max(rect.left - e.clientX, 0, e.clientX - rect.right);
|
||||
const dy = Math.max(rect.top - e.clientY, 0, e.clientY - rect.bottom);
|
||||
const dist = Math.hypot(dx, dy);
|
||||
if (dist === 0) {
|
||||
const nx = (e.clientX - cx) / (rect.width / 2);
|
||||
const ny = (cy - e.clientY) / (rect.height / 2);
|
||||
pointerAngle = Math.atan2(2 / rect.height, -2 / rect.width) + nx * 0.3 + ny * 0.15;
|
||||
} else {
|
||||
pointerAngle = Math.atan2(cy - e.clientY, e.clientX - cx);
|
||||
}
|
||||
const t = Math.max(0, 1 - dist / Math.max(propsRef.current.proximity, 1));
|
||||
proximityT = t * t * (3 - 2 * t);
|
||||
};
|
||||
window.addEventListener('pointermove', onPointerMove);
|
||||
|
||||
let angle = 2.4;
|
||||
let idleAngle = 2.4;
|
||||
let bright = 0;
|
||||
let last = performance.now();
|
||||
let raf = 0;
|
||||
|
||||
const lineC = new Color();
|
||||
const baseC = new Color();
|
||||
|
||||
const update = now => {
|
||||
raf = requestAnimationFrame(update);
|
||||
const dt = Math.min((now - last) / 1000, 0.05);
|
||||
last = now;
|
||||
const p = propsRef.current;
|
||||
|
||||
idleAngle += p.speed * dt;
|
||||
const steer = p.followMouse && pointerAngle != null && (!p.autoAnimate || proximityT > 0);
|
||||
const target = steer ? pointerAngle : idleAngle;
|
||||
const diff = ((target - angle + Math.PI * 3) % (Math.PI * 2)) - Math.PI;
|
||||
angle += diff * (1 - Math.exp(-dt * 7));
|
||||
|
||||
const brightTarget = p.autoAnimate ? 1 : proximityT;
|
||||
bright += (brightTarget - bright) * (1 - Math.exp(-dt * 8));
|
||||
|
||||
lineC.set(p.lineColor);
|
||||
baseC.set(p.baseColor);
|
||||
program.uniforms.uAngle.value = angle;
|
||||
program.uniforms.uRadius.value = Math.min(p.radius, Math.min(sizeRef.w, sizeRef.h) / 2) * dpr;
|
||||
program.uniforms.uLineColor.value = [lineC.r, lineC.g, lineC.b];
|
||||
program.uniforms.uBaseColor.value = [baseC.r, baseC.g, baseC.b];
|
||||
program.uniforms.uIntensity.value = p.intensity * bright;
|
||||
program.uniforms.uShineSize.value = (p.shineSize * Math.PI) / 180;
|
||||
program.uniforms.uShineFade.value = (p.shineFade * Math.PI) / 180;
|
||||
program.uniforms.uThickness.value = p.thickness * dpr;
|
||||
renderer.render({ scene: mesh });
|
||||
};
|
||||
raf = requestAnimationFrame(update);
|
||||
|
||||
return () => {
|
||||
cancelAnimationFrame(raf);
|
||||
ro.disconnect();
|
||||
window.removeEventListener('pointermove', onPointerMove);
|
||||
if (gl.canvas.parentNode === fx) fx.removeChild(gl.canvas);
|
||||
gl.getExtension('WEBGL_lose_context')?.loseContext();
|
||||
};
|
||||
}, [enabled, targetRef]);
|
||||
|
||||
return fxRef;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import React from "react";
|
||||
|
||||
export const TechCorners = () => (
|
||||
<>
|
||||
<div className="absolute -top-[1px] -left-[1px] w-4 h-4 border-t border-l border-transparent group-hover:border-brand-primary transition-colors duration-300 pointer-events-none z-10" />
|
||||
<div className="absolute -top-[1px] -right-[1px] w-4 h-4 border-t border-r border-transparent group-hover:border-brand-primary transition-colors duration-300 pointer-events-none z-10" />
|
||||
<div className="absolute -bottom-[1px] -left-[1px] w-4 h-4 border-b border-l border-transparent group-hover:border-brand-primary transition-colors duration-300 pointer-events-none z-10" />
|
||||
<div className="absolute -bottom-[1px] -right-[1px] w-4 h-4 border-b border-r border-transparent group-hover:border-brand-primary transition-colors duration-300 pointer-events-none z-10" />
|
||||
</>
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
import React from "react";
|
||||
|
||||
interface TechTagProps {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function TechTag({ children, className = "" }: TechTagProps) {
|
||||
return (
|
||||
<div className={`flex items-center text-zinc-600 font-mono text-[13px] leading-none uppercase tracking-widest border-l border-brand-border/40 pl-3 pr-3 first:border-l-0 first:pl-0 last:pr-0 ${className}`}>
|
||||
<span className="mt-[1px]">{children}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
(async () => {
|
||||
const browser = await puppeteer.launch();
|
||||
const page = await browser.newPage();
|
||||
await page.goto('http://localhost:3001');
|
||||
await page.waitForTimeout(3000);
|
||||
const headerHtml = await page.$eval('header', el => el.outerHTML);
|
||||
const fs = require('fs');
|
||||
fs.writeFileSync('C:/Users/micuk/bnt_budownictwo/header_dom.html', headerHtml);
|
||||
await browser.close();
|
||||
})();
|
||||
@@ -0,0 +1,58 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 375, height: 812, isMobile: true, hasTouch: true });
|
||||
|
||||
try {
|
||||
await page.goto('http://localhost:3001', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
|
||||
const elementsWithPipe = await page.evaluate(() => {
|
||||
const result = [];
|
||||
const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null, false);
|
||||
let node;
|
||||
while(node = walker.nextNode()) {
|
||||
if (node.nodeValue.includes('||')) {
|
||||
result.push({
|
||||
text: node.nodeValue.trim(),
|
||||
parentHTML: node.parentElement.outerHTML.substring(0, 200)
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
|
||||
console.log("TEXT NODES WITH ||:", elementsWithPipe);
|
||||
|
||||
// Let's also check for any absolute/fixed elements that might look like it
|
||||
const weirdElements = await page.evaluate(() => {
|
||||
const elements = document.querySelectorAll('*');
|
||||
const suspicious = [];
|
||||
elements.forEach(el => {
|
||||
const style = window.getComputedStyle(el);
|
||||
if (style.content && style.content.includes('||')) {
|
||||
suspicious.push({ tag: el.tagName, class: el.className, content: style.content });
|
||||
}
|
||||
});
|
||||
return suspicious;
|
||||
});
|
||||
console.log("CSS CONTENT WITH ||:", weirdElements);
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,140 @@
|
||||
export interface Realizacja {
|
||||
id: string;
|
||||
slug: string;
|
||||
title: string;
|
||||
type: string;
|
||||
year: number;
|
||||
location: string;
|
||||
shortDesc: string;
|
||||
fullDesc: string;
|
||||
stats: {
|
||||
label: string;
|
||||
value: number | string;
|
||||
isNumber: boolean;
|
||||
}[];
|
||||
features: string[];
|
||||
gallery: string[];
|
||||
mainImg: string;
|
||||
featured: boolean;
|
||||
}
|
||||
|
||||
export const realizacje: Realizacja[] = [
|
||||
{
|
||||
id: "brzozowe-zacisze-etap-1",
|
||||
slug: "brzozowe-zacisze-etap-1",
|
||||
title: "Brzozowe Zacisze — Etap I",
|
||||
type: "MIESZKANIOWE",
|
||||
year: 2013,
|
||||
location: "Wrocław, ul. Maślicka",
|
||||
shortDesc: "Pierwszy etap dużego, wieloletniego założenia osiedlowego na wrocławskich Maślicach.",
|
||||
fullDesc: "Pierwszy etap dużego, wieloletniego założenia osiedlowego na wrocławskich Maślicach. 76 mieszkań w układach 1-, 2- i 3-pokojowych, zaprojektowanych z myślą o komforcie mieszkańców. Bezpośrednie sąsiedztwo czterech kompleksów leśnych (Pilczycki, Osobowicki, Rędziński, Mokrzański) zapewnia dostęp do terenów rekreacyjnych — tras rowerowych i miejsc na rodzinne wypady na świeże powietrze. Projekt zrealizowany przy nadzorze inwestorskim naszego zespołu, co zagwarantowało terminowość i dbałość o detale wykonawcze.",
|
||||
stats: [
|
||||
{ label: "Mieszkań", value: 76, isNumber: true },
|
||||
{ label: "Rok ukończenia", value: 2013, isNumber: true },
|
||||
{ label: "Układ lokali", value: "1-3 pokoje", isNumber: false }
|
||||
],
|
||||
features: ["76 MIESZKAŃ", "BLISKOŚĆ TERENÓW ZIELONYCH", "TRASY ROWEROWE", "1-3 POKOJE"],
|
||||
gallery: [
|
||||
"https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1460317442991-0ec209397118?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1479839672679-a46483c0e7c8?auto=format&fit=crop&q=80&w=1200"
|
||||
],
|
||||
mainImg: "https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&q=80&w=1200",
|
||||
featured: true
|
||||
},
|
||||
{
|
||||
id: "brzozowe-zacisze-etap-2",
|
||||
slug: "brzozowe-zacisze-etap-2",
|
||||
title: "Brzozowe Zacisze — Etap II",
|
||||
type: "MIESZKANIOWE",
|
||||
year: 2015,
|
||||
location: "Wrocław, ul. Maślicka",
|
||||
shortDesc: "Kontynuacja osiedla z ok. 50 lokalami, wyróżniająca się starannie zaaranżowaną zielenią.",
|
||||
fullDesc: "Kontynuacja osiedla z ok. 50 lokalami, wyróżniająca się charakterystyczną stylistyką budynków i starannie zaaranżowaną zielenią wspólną. Mieszkania z ogrodami, tarasami, balkonami lub antresolami, w otoczeniu parkowo-leśnym sprzyjającym wypoczynkowi po pracy. Jako podmiot sprawujący nadzór inwestorski, dbaliśmy o zachowanie najwyższych standardów budowlanych na każdym etapie wznoszenia budynków.",
|
||||
stats: [
|
||||
{ label: "Lokali", value: 50, isNumber: true },
|
||||
{ label: "Rok ukończenia", value: 2015, isNumber: true },
|
||||
{ label: "Przestrzeń", value: "Ogrody i tarasy", isNumber: false }
|
||||
],
|
||||
features: ["OK. 50 LOKALI", "OGRODY I TARASY", "ANTRESOLE", "ZIELONA STREFA WSPÓLNA"],
|
||||
gallery: [
|
||||
"https://images.unsplash.com/photo-1460317442991-0ec209397118?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1479839672679-a46483c0e7c8?auto=format&fit=crop&q=80&w=1200"
|
||||
],
|
||||
mainImg: "https://images.unsplash.com/photo-1460317442991-0ec209397118?auto=format&fit=crop&q=80&w=1200",
|
||||
featured: false
|
||||
},
|
||||
{
|
||||
id: "brzozowe-zacisze-etap-3",
|
||||
slug: "brzozowe-zacisze-etap-3",
|
||||
title: "Brzozowe Zacisze — Etap III",
|
||||
type: "MIESZKANIOWE",
|
||||
year: 2017,
|
||||
location: "Wrocław, ul. Maślicka",
|
||||
shortDesc: "Trzeci etap obejmujący 113 mieszkań rodzinnych w układach jedno- i dwupoziomowych.",
|
||||
fullDesc: "Trzeci etap obejmujący 113 mieszkań rodzinnych w układach jedno- i dwupoziomowych. Elastyczny rozkład dopasowany zarówno do singli, młodych par, jak i większych rodzin. Na terenie osiedla bezpieczny plac zabaw dla dzieci i siłownia plenerowa. Projekt zrealizowany przy nadzorze inwestorskim naszego zespołu, co pozwoliło na płynną koordynację prac i terminowe przekazanie kluczy inwestorowi.",
|
||||
stats: [
|
||||
{ label: "Mieszkań", value: 113, isNumber: true },
|
||||
{ label: "Rok ukończenia", value: 2017, isNumber: true },
|
||||
{ label: "Typ kondygnacji", value: "1-2 poziomowe", isNumber: false }
|
||||
],
|
||||
features: ["113 MIESZKAŃ", "UKŁADY DWUPOZIOMOWE", "PLAC ZABAW", "SIŁOWNIA PLENEROWA"],
|
||||
gallery: [
|
||||
"https://images.unsplash.com/photo-1479839672679-a46483c0e7c8?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1460317442991-0ec209397118?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&q=80&w=1200"
|
||||
],
|
||||
mainImg: "https://images.unsplash.com/photo-1479839672679-a46483c0e7c8?auto=format&fit=crop&q=80&w=1200",
|
||||
featured: true
|
||||
},
|
||||
{
|
||||
id: "brzozowe-zacisze-etap-4",
|
||||
slug: "brzozowe-zacisze-etap-4",
|
||||
title: "Brzozowe Zacisze — Etap IV",
|
||||
type: "MIESZKANIOWE",
|
||||
year: 2019,
|
||||
location: "Wrocław, ul. Maślicka",
|
||||
shortDesc: "Finałowa odsłona osiedla, zamykająca projekt zainicjowany w 2013 roku.",
|
||||
fullDesc: "Finałowa odsłona osiedla, zamykająca projekt zainicjowany w 2013 roku. 124 mieszkania w zamkniętym, monitorowanym osiedlu z podziemnym garażem, placem zabaw, siłownią plenerową i zielonymi częściami wspólnymi. Mieszkania na parterze z prywatnymi ogródkami lub tarasami, na ostatniej kondygnacji — przestronne antresole. Zespół BNT Budownictwo miał zaszczyt pełnić nadzór inwestorski nad tym kluczowym zamykającym etapem, dbając o ostateczny szlif całego kompleksu mieszkaniowego.",
|
||||
stats: [
|
||||
{ label: "Mieszkań", value: 124, isNumber: true },
|
||||
{ label: "Rok ukończenia", value: 2019, isNumber: true },
|
||||
{ label: "Status osiedla", value: "Zamknięte", isNumber: false }
|
||||
],
|
||||
features: ["124 MIESZKANIA", "OSIEDLE ZAMKNIĘTE", "GARAŻ PODZIEMNY", "PRYWATNE OGRÓDKI", "MONITORING"],
|
||||
gallery: [
|
||||
"https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1460317442991-0ec209397118?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1479839672679-a46483c0e7c8?auto=format&fit=crop&q=80&w=1200"
|
||||
],
|
||||
mainImg: "https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=1200",
|
||||
featured: true
|
||||
},
|
||||
{
|
||||
id: "kepa-park",
|
||||
slug: "kepa-park",
|
||||
title: "Kępa Park",
|
||||
type: "MIESZKANIOWE",
|
||||
year: 2021,
|
||||
location: "Wrocław, Kępa Mieszczańska (ul. Dmowskiego)",
|
||||
shortDesc: "Kompleks mieszkalny w centrum Wrocławia przy Kępie Mieszczańskiej z lokalami inwestycyjnymi.",
|
||||
fullDesc: "Kompleks mieszkalny na Kępie Mieszczańskiej, w samym centrum Wrocławia, przy ulicy Dmowskiego — w bezpośrednim sąsiedztwie terenów zielonych i rzeki, ok. 15 minut spacerem od Rynku. Sześciokondygnacyjny budynek (część południowa obniżona do czterech kondygnacji) mieści 148 mieszkań w układach jedno-, dwu- i trzypokojowych, o metrażach od 28 do 77 m², w tym lokale inwestycyjne z osobnymi wejściami przeznaczone pod wynajem. Całość uzupełnia podziemny garaż wielostanowiskowy i winda z poziomu garażu. Nasz zespół sprawował profesjonalny nadzór inwestorski, kontrolując zarówno terminowość wykonania, jak i zachowanie wysokich standardów wymaganych przy inwestycjach o randze śródmiejskiej.",
|
||||
stats: [
|
||||
{ label: "Mieszkań", value: 148, isNumber: true },
|
||||
{ label: "Rok ukończenia", value: 2021, isNumber: true },
|
||||
{ label: "Układ lokali", value: "1-3 pokoje", isNumber: false }
|
||||
],
|
||||
features: ["GARAŻ PODZIEMNY", "LOKALIZACJA ŚRÓDMIEJSKA", "BLISKOŚĆ RZEKI", "LOKALE INWESTYCYJNE"],
|
||||
gallery: [
|
||||
"https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1460317442991-0ec209397118?auto=format&fit=crop&q=80&w=1200",
|
||||
"https://images.unsplash.com/photo-1479839672679-a46483c0e7c8?auto=format&fit=crop&q=80&w=1200"
|
||||
],
|
||||
mainImg: "https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&q=80&w=1200", // Różny obraz dla Kępy
|
||||
featured: true
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,187 @@
|
||||
export interface ServiceSection {
|
||||
title: string;
|
||||
items: string[];
|
||||
}
|
||||
|
||||
export interface ServiceData {
|
||||
id: string;
|
||||
slug: string;
|
||||
title: string;
|
||||
shortDesc: string;
|
||||
lead: string;
|
||||
|
||||
// Nowa struktura podstrony szczegółowej:
|
||||
introSection?: {
|
||||
heading: string;
|
||||
paragraphs: string[];
|
||||
imagePlaceholder?: string;
|
||||
};
|
||||
calloutSection?: {
|
||||
heading: string;
|
||||
content: string;
|
||||
tags: string[];
|
||||
};
|
||||
gridSection?: {
|
||||
heading: string;
|
||||
content: string;
|
||||
items: string[];
|
||||
};
|
||||
darkSection?: {
|
||||
heading: string;
|
||||
content: string;
|
||||
imagePlaceholder?: string;
|
||||
};
|
||||
|
||||
// Stare pola (zostawiamy dla kompatybilności wstecznej)
|
||||
sections?: {
|
||||
first: {
|
||||
title: string;
|
||||
items: string[];
|
||||
};
|
||||
second: {
|
||||
title: string;
|
||||
content: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export const services: ServiceData[] = [
|
||||
{
|
||||
id: "01",
|
||||
slug: "uslugi-inzynieryjne-budowlane",
|
||||
title: "Usługi Inżynieryjno-Budowlane",
|
||||
shortDesc: "Kompleksowe wsparcie inżynieryjne na każdym etapie inwestycji — od analizy dokumentacji po odbiór końcowy.",
|
||||
lead: "Kompleksowe wsparcie inżynieryjne w zakresie budownictwa drogowego, mostowego i konstrukcyjnego — od dokumentacji technicznej po nadzór nad realizacją, prowadzone przez zespół z pełnymi uprawnieniami budowlanymi.",
|
||||
introSection: {
|
||||
heading: "Pełne zaplecze inżynieryjne dla Twojej inwestycji",
|
||||
paragraphs: [
|
||||
"Nasz zespół dysponuje uprawnieniami budowlanymi w specjalnościach drogowej, mostowej oraz konstrukcyjno-budowlanej, co pozwala nam kompleksowo obsłużyć inwestycję od etapu koncepcji po oddanie obiektu do użytku. Zanim podejmiecie Państwo decyzję o powierzeniu nadzoru nad inwestycją, warto zweryfikować zakres posiadanych uprawnień — to one determinują, jakie prace dany specjalista może legalnie prowadzić.",
|
||||
"Usługi inżynieryjno-budowlane obejmują przygotowanie i weryfikację dokumentacji technicznej, wsparcie w uzyskaniu niezbędnych pozwoleń, koordynację prac na placu budowy oraz bieżący nadzór nad ich prawidłowym przebiegiem. Dzięki temu inwestycja realizowana jest zgodnie z harmonogramem, budżetem i najwyższymi standardami jakości — a inwestor zyskuje realną ochronę swoich interesów na każdym etapie."
|
||||
],
|
||||
imagePlaceholder: "placeholder_inżynier_z_planami"
|
||||
},
|
||||
calloutSection: {
|
||||
heading: "Dlaczego uprawnienia mają znaczenie",
|
||||
content: "Prac inżynieryjnych w branży drogowej i mostowej nie może prowadzić dowolna osoba — wymagane są udokumentowane kwalifikacje zawodowe: ukończone studia budowlane, odpowiednia praktyka zawodowa na budowie oraz zdany egzamin państwowy przed Polską Izbą Inżynierów Budownictwa. Przed powierzeniem nadzoru warto zweryfikować referencje i zakres posiadanych uprawnień potencjalnego partnera — to podstawowe zabezpieczenie interesów inwestora.",
|
||||
tags: ["UPRAWNIENIA PIIB", "PRAKTYKA ZAWODOWA", "WERYFIKOWALNE REFERENCJE"]
|
||||
},
|
||||
gridSection: {
|
||||
heading: "Nadzór nad obiektami inżynierskimi",
|
||||
content: "Posiadane uprawnienia mostowe obejmują kierowanie i nadzór inwestorski nad budową obiektów inżynierskich w pasie drogowym i kolejowym — od dużych konstrukcji po mniejsze elementy infrastruktury.",
|
||||
items: ["Mosty", "Wiadukty", "Przepusty", "Ściany oporowe", "Tunele liniowe", "Przejścia dla pieszych"]
|
||||
},
|
||||
darkSection: {
|
||||
heading: "Kompetencje konstrukcyjno-budowlane",
|
||||
content: "Posiadane uprawnienia konstrukcyjno-budowlane obejmują kierowanie wytwarzaniem elementów konstrukcyjnych, nadzór i kontrolę techniczną ich produkcji oraz nadzór inwestorski nad pracami konstrukcyjnymi. Dbamy o to, aby każdy etap — od produkcji elementów po ich montaż — przebiegał zgodnie z projektem, obowiązującymi normami i przepisami prawa budowlanego.",
|
||||
imagePlaceholder: "placeholder_konstrukcja_stalowa"
|
||||
},
|
||||
sections: {
|
||||
first: {
|
||||
title: "Zakres usług",
|
||||
items: [
|
||||
"Opracowywanie i weryfikacja dokumentacji technicznej oraz kosztorysów",
|
||||
"Doradztwo techniczne na etapie planowania inwestycji",
|
||||
"Ekspertyzy stanu technicznego obiektów i elementów konstrukcyjnych",
|
||||
"Wsparcie w doborze rozwiązań technologicznych i materiałowych",
|
||||
"Koordynacja między projektantem, wykonawcą a inwestorem"
|
||||
]
|
||||
},
|
||||
second: {
|
||||
title: "Dla kogo",
|
||||
content: "Usługa skierowana zarówno do inwestorów indywidualnych planujących budowę domu, jak i firm oraz instytucji realizujących inwestycje komercyjne, przemysłowe i infrastrukturalne na terenie Wrocławia i całego Dolnego Śląska."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "02",
|
||||
slug: "nadzor-inwestorski",
|
||||
title: "Nadzór Inwestorski",
|
||||
shortDesc: "Ochrona interesów inwestora, weryfikacja jakości, harmonogramów i zgodności robót z projektem.",
|
||||
lead: "Reprezentujemy interesy inwestora na każdym etapie budowy — kontrolujemy zgodność prac z dokumentacją, harmonogramem i budżetem, minimalizując ryzyko błędów i nieprawidłowości.",
|
||||
sections: {
|
||||
first: {
|
||||
title: "Obowiązki inspektora nadzoru",
|
||||
items: [
|
||||
"Kontrola jakości i zgodności wykonywanych robót z projektem",
|
||||
"Weryfikacja harmonogramu i rozliczeń finansowych budowy",
|
||||
"Udział w naradach technicznych, odbiorach częściowych i końcowych",
|
||||
"Sprawdzanie kosztorysów wykonawczych i ofertowych",
|
||||
"Prowadzenie korespondencji i koordynacja z wykonawcami"
|
||||
]
|
||||
},
|
||||
second: {
|
||||
title: "Dlaczego warto",
|
||||
content: "Nadzór inwestorski to formalne zabezpieczenie interesów inwestora zgodnie z Prawem budowlanym (art. 25-26 ustawy z 7 lipca 1994 r.) — niezależna kontrola procesu budowy zmniejsza ryzyko opóźnień, przekroczenia budżetu i wad wykonawczych, szczególnie przy większych lub wieloetapowych inwestycjach."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "03",
|
||||
slug: "kierowanie-nadzorowanie-budowy",
|
||||
title: "Kierowanie i Nadzorowanie Budowy",
|
||||
shortDesc: "Kierownictwo nad robótami, koordynacja podwykonawców, BHP i pełna odpowiedzialność prawna.",
|
||||
lead: "Bezpośrednie kierownictwo nad przebiegiem robót budowlanych — koordynacja podwykonawców, kontrola bezpieczeństwa i odpowiedzialność za zgodność realizacji z projektem i przepisami prawa budowlanego.",
|
||||
sections: {
|
||||
first: {
|
||||
title: "Zakres odpowiedzialności",
|
||||
items: [
|
||||
"Organizacja i koordynacja pracy na placu budowy",
|
||||
"Nadzór nad przestrzeganiem przepisów BHP",
|
||||
"Prowadzenie dziennika budowy i dokumentacji wykonawczej",
|
||||
"Odbiory robót zanikających i ulegających zakryciu",
|
||||
"Bieżąca komunikacja z inwestorem o postępach i ewentualnych odstępstwach"
|
||||
]
|
||||
},
|
||||
second: {
|
||||
title: "Dla jakich inwestycji",
|
||||
content: "Usługa obejmuje zarówno budowy jednorodzinne, jak i większe realizacje komercyjne oraz przemysłowe, gdzie wymagana jest stała obecność i odpowiedzialność kierownika budowy z odpowiednimi uprawnieniami."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "04",
|
||||
slug: "inwestor-zastepczy",
|
||||
title: "Inwestor Zastępczy",
|
||||
shortDesc: "Pełne zarządzanie inwestycją, organizacja przetargów i budżetu w imieniu inwestora.",
|
||||
lead: "Pełne zastępstwo inwestycyjne — przejmujemy organizacyjną i formalną odpowiedzialność za przebieg inwestycji, żeby inwestor mógł skupić się na swojej działalności, mając pewność profesjonalnego prowadzenia projektu.",
|
||||
sections: {
|
||||
first: {
|
||||
title: "Co obejmuje zastępstwo inwestycyjne",
|
||||
items: [
|
||||
"Reprezentowanie inwestora przed urzędami i organami administracji budowlanej",
|
||||
"Organizacja przetargów i wybór wykonawców",
|
||||
"Zarządzanie budżetem i harmonogramem całej inwestycji",
|
||||
"Koordynacja wszystkich uczestników procesu budowlanego (projektant, wykonawca, dostawcy)",
|
||||
"Nadzór nad odbiorem końcowym i przekazaniem obiektu do użytkowania"
|
||||
]
|
||||
},
|
||||
second: {
|
||||
title: "Kiedy warto skorzystać",
|
||||
content: "Rozwiązanie szczególnie przydatne dla inwestorów bez własnego zaplecza technicznego lub czasu na bieżące zarządzanie budową — pełne przejęcie odpowiedzialności organizacyjnej pozwala ograniczyć ryzyko i zaoszczędzić czas."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "05",
|
||||
slug: "nadzory-budowlane",
|
||||
title: "Nadzory Budowlane",
|
||||
shortDesc: "Niezależna kontrola techniczna i ekspertyzy zgodności robót z projektem i przepisami.",
|
||||
lead: "Niezależna kontrola techniczna realizowanych inwestycji — sprawdzamy zgodność wykonania z projektem, obowiązującymi normami i przepisami prawa budowlanego, na każdym etapie prac.",
|
||||
sections: {
|
||||
first: {
|
||||
title: "Zakres nadzoru",
|
||||
items: [
|
||||
"Kontrola zgodności realizacji z projektem budowlanym i pozwoleniem na budowę",
|
||||
"Weryfikacja jakości materiałów i wykonywanych robót",
|
||||
"Nadzór nad dużymi, wieloetapowymi oraz publicznymi inwestycjami",
|
||||
"Identyfikacja i eliminacja zagrożeń na placu budowy",
|
||||
"Sporządzanie ekspertyz i opinii technicznych w razie wątpliwości"
|
||||
]
|
||||
},
|
||||
second: {
|
||||
title: "Obszar działania",
|
||||
content: "Świadczymy usługi nadzoru budowlanego na terenie Wrocławia oraz całego województwa dolnośląskiego, obejmując zarówno inwestycje prywatne, jak i publiczne wymagające szczególnych standardów kontroli."
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,19 @@
|
||||
export function fixOrphans(text: string): string {
|
||||
if (!text) return text;
|
||||
|
||||
// Wyrażenie regularne wyszukujące krótkie polskie spójniki i przyimki
|
||||
// (zarówno małe, jak i wielkie litery) znajdujące się po spacji (lub na początku)
|
||||
// i zastępujące spację PO nich na twardą spację (\u00A0).
|
||||
const orphansRegex = /(^|\s)(i|a|o|u|w|z|do|na|po|że|się|ze|we|od|ku)\s+/gi;
|
||||
|
||||
// Przetwarzamy dopóki są jakieś dopasowania (czasem spójniki występują po sobie, np. "a w ")
|
||||
let previousText = '';
|
||||
let fixedText = text;
|
||||
|
||||
while (previousText !== fixedText) {
|
||||
previousText = fixedText;
|
||||
fixedText = fixedText.replace(orphansRegex, '$1$2\u00A0');
|
||||
}
|
||||
|
||||
return fixedText;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {};
|
||||
|
||||
export default nextConfig;
|
||||
Generated
+6566
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "temp_app",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"framer-motion": "^13.0.0",
|
||||
"gsap": "^3.15.0",
|
||||
"lucide-react": "^1.30.0",
|
||||
"next": "14.2.35",
|
||||
"ogl": "^1.0.11",
|
||||
"puppeteer-core": "^25.5.0",
|
||||
"react": "^18",
|
||||
"react-dom": "^18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.2.35",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/** @type {import('postcss-load-config').Config} */
|
||||
const config = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,35 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 900 });
|
||||
await page.goto('http://localhost:3001', { waitUntil: 'networkidle0' });
|
||||
|
||||
// Wait for specular effect canvas to mount and stabilize
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
|
||||
const screenshotPath = "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\header_fix.png";
|
||||
|
||||
// Take screenshot of header element
|
||||
const header = await page.$('header > div');
|
||||
if (header) {
|
||||
await header.screenshot({ path: screenshotPath });
|
||||
} else {
|
||||
await page.screenshot({ path: screenshotPath });
|
||||
}
|
||||
|
||||
await browser.close();
|
||||
console.log("Screenshot taken at: " + screenshotPath);
|
||||
})();
|
||||
@@ -0,0 +1,95 @@
|
||||
import type { Config } from "tailwindcss";
|
||||
|
||||
const config: Config = {
|
||||
content: [
|
||||
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
],
|
||||
theme: {
|
||||
// Rygorystyczny system odstępów (nadpisuje domyślny)
|
||||
spacing: {
|
||||
0: "0",
|
||||
px: "1px",
|
||||
1: "0.25rem", // 4px
|
||||
2: "0.5rem", // 8px
|
||||
3: "0.75rem", // 12px
|
||||
4: "1rem", // 16px
|
||||
6: "1.5rem", // 24px
|
||||
8: "2rem", // 32px
|
||||
12: "3rem", // 48px
|
||||
16: "4rem", // 64px
|
||||
24: "6rem", // 96px
|
||||
32: "8rem", // 128px
|
||||
// Zmienne sekcji
|
||||
"section-mobile": "3rem", // 48px
|
||||
"section-tablet": "4rem", // 64px
|
||||
"section-desktop": "6rem", // 96px (lub 8rem / 128px)
|
||||
},
|
||||
extend: {
|
||||
colors: {
|
||||
brand: {
|
||||
primary: "#1E3A5F", // Zgaszony, korporacyjny stalowy granat
|
||||
primaryHover: "#0F2942", // Głębszy odcień na hover
|
||||
text: "#18181B",
|
||||
muted: "#52525B",
|
||||
bg: "#FFFFFF",
|
||||
surface: "#F4F4F5",
|
||||
dark: "#18181B",
|
||||
deepDark: "#0A0E14", // Asymetryczne czarne/techniczne tło
|
||||
border: "#E4E4E7",
|
||||
},
|
||||
},
|
||||
fontFamily: {
|
||||
heading: ["var(--font-heading)", "sans-serif"],
|
||||
body: ["var(--font-inter)", "sans-serif"],
|
||||
mono: ["var(--font-mono)", "monospace"],
|
||||
},
|
||||
fontSize: {
|
||||
// H1
|
||||
"h1-mobile": ["2rem", { lineHeight: "1.1", fontWeight: "700" }], // 32px
|
||||
"h1-tablet": ["2.5rem", { lineHeight: "1.1", fontWeight: "700" }], // 40px
|
||||
"h1-desktop": ["3.5rem", { lineHeight: "1.1", fontWeight: "700" }], // 56px
|
||||
// H2
|
||||
"h2-mobile": ["1.625rem", { lineHeight: "1.15", fontWeight: "600" }], // 26px
|
||||
"h2-tablet": ["2rem", { lineHeight: "1.15", fontWeight: "600" }], // 32px
|
||||
"h2-desktop": ["2.5rem", { lineHeight: "1.15", fontWeight: "600" }], // 40px
|
||||
// H3
|
||||
"h3-mobile": ["1.25rem", { lineHeight: "1.2", fontWeight: "600" }], // 20px
|
||||
"h3-tablet": ["1.5rem", { lineHeight: "1.2", fontWeight: "600" }], // 24px
|
||||
"h3-desktop": ["1.75rem", { lineHeight: "1.2", fontWeight: "600" }], // 28px
|
||||
// H4
|
||||
"h4-mobile": ["1.125rem", { lineHeight: "1.3", fontWeight: "600" }], // 18px
|
||||
"h4-tablet": ["1.125rem", { lineHeight: "1.3", fontWeight: "600" }], // 18px
|
||||
"h4-desktop": ["1.25rem", { lineHeight: "1.3", fontWeight: "600" }], // 20px
|
||||
// Body
|
||||
"body-mobile": ["0.9375rem", { lineHeight: "1.6", fontWeight: "400" }], // 15px
|
||||
"body-desktop": ["1rem", { lineHeight: "1.6", fontWeight: "400" }], // 16px
|
||||
"body-medium": ["1rem", { lineHeight: "1.6", fontWeight: "500" }], // 16px medium
|
||||
// Small
|
||||
"small-mobile": ["0.8125rem", { lineHeight: "1.4", fontWeight: "400" }], // 13px
|
||||
"small-desktop": ["0.875rem", { lineHeight: "1.4", fontWeight: "400" }], // 14px
|
||||
},
|
||||
keyframes: {
|
||||
marqueeLeft: {
|
||||
'0%': { transform: 'translateX(0%)' },
|
||||
'100%': { transform: 'translateX(-50%)' },
|
||||
},
|
||||
slowPulse: {
|
||||
'0%, 100%': { opacity: '1' },
|
||||
'50%': { opacity: '0.4' },
|
||||
},
|
||||
shimmer: {
|
||||
'100%': { transform: 'translateX(100%)' },
|
||||
}
|
||||
},
|
||||
animation: {
|
||||
'marquee-left': 'marqueeLeft 40s linear infinite',
|
||||
slowPulse: 'slowPulse 3s ease-in-out infinite',
|
||||
shimmer: 'shimmer 1.5s infinite',
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
export default config;
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 900 });
|
||||
|
||||
await page.goto('http://localhost:3001/uslugi/uslugi-inzynieryjne-budowlane', { waitUntil: 'networkidle0' });
|
||||
|
||||
// Sreenshot Section 3 (Callout)
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Dlaczego uprawnienia'));
|
||||
if(h) h.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\usluga_sekcja3.png" });
|
||||
|
||||
// Sreenshot Section 4 (Grid)
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Nadzór nad obiektami'));
|
||||
if(h) h.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\usluga_sekcja4.png" });
|
||||
|
||||
await browser.close();
|
||||
})();
|
||||
@@ -0,0 +1,32 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 900 });
|
||||
|
||||
try {
|
||||
await page.goto('http://localhost:3001/uslugi/uslugi-inzynieryjne-budowlane', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Porozmawiajmy'));
|
||||
if(h) h.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\cta_button_fixed.png" });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,36 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 1080 });
|
||||
|
||||
try {
|
||||
await page.goto('http://localhost:3001', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Najczęściej'));
|
||||
if(h) h.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
});
|
||||
|
||||
await new Promise(r => setTimeout(r, 1500)); // wait for animation
|
||||
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\faq_fixed.png" });
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,50 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 900 });
|
||||
|
||||
try {
|
||||
// 1. TechTag w uslugi-inzynieryjne-budowlane
|
||||
await page.goto('http://localhost:3001/uslugi/uslugi-inzynieryjne-budowlane', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Dlaczego uprawnienia') || h.textContent.includes('Szczegóły'));
|
||||
if(h) h.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\techtag_final.png" });
|
||||
|
||||
// 2. SectionHeader w nadzor-inwestorski
|
||||
await page.goto('http://localhost:3001/uslugi/nadzor-inwestorski', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Nadzór nad obiektami') || h.textContent.includes('Gotowy na'));
|
||||
if(h) {
|
||||
h.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
} else {
|
||||
// scroll to any h2 to capture SectionHeader
|
||||
const anyH = document.querySelector('h2');
|
||||
if (anyH) anyH.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
}
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\sectionheader_final.png" });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,53 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 1080 });
|
||||
|
||||
try {
|
||||
// 1. Strona główna - sekcja realizacje
|
||||
await page.goto('http://localhost:3001', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Dowody'));
|
||||
if(h) h.scrollIntoView({ behavior: 'auto', block: 'start' });
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\realizacje_home_kepa.png" });
|
||||
|
||||
// 2. Strona listy /realizacje
|
||||
await page.goto('http://localhost:3001/realizacje', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\realizacje_list_full.png" });
|
||||
|
||||
// 3. Podstrona kepa-park
|
||||
await page.goto('http://localhost:3001/realizacje/kepa-park', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
|
||||
// Hero i statystyki
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\kepa_park_hero.png" });
|
||||
|
||||
// Zjedź do sekcji Cechy / Galeria
|
||||
await page.evaluate(() => {
|
||||
window.scrollBy(0, 1500);
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\kepa_park_mid.png" });
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,49 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 375, height: 812, isMobile: true, hasTouch: true });
|
||||
|
||||
try {
|
||||
await page.goto('http://localhost:3001', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
|
||||
// Screenshot of fixed header
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\header_mobile.png" });
|
||||
|
||||
// Open menu
|
||||
await page.evaluate(() => {
|
||||
const btn = document.querySelector('button[aria-label="Toggle menu"]');
|
||||
if (btn) btn.click();
|
||||
});
|
||||
|
||||
await new Promise(r => setTimeout(r, 1000));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\menu_opened.png" });
|
||||
|
||||
// Tap first link
|
||||
await page.evaluate(() => {
|
||||
const link = document.querySelector('.menu__item-link');
|
||||
if (link) link.click();
|
||||
});
|
||||
|
||||
await new Promise(r => setTimeout(r, 1000));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\menu_tapped.png" });
|
||||
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,38 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 375, height: 812, isMobile: true, hasTouch: true });
|
||||
|
||||
try {
|
||||
// Strona główna - Hero
|
||||
await page.goto('http://localhost:3001', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
|
||||
// Zrzut ekranu od razu na Hero, żeby złapać nagłówek i Header
|
||||
await new Promise(r => setTimeout(r, 2500)); // wait for animations
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\mobile_hero.png" });
|
||||
|
||||
// Scroll w dół żeby pokazać że animacje działają
|
||||
await page.evaluate(() => {
|
||||
window.scrollBy(0, 800);
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\mobile_scroll.png" });
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,53 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 1080 });
|
||||
|
||||
try {
|
||||
// 1. Strona główna - sekcja realizacje
|
||||
await page.goto('http://localhost:3001', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Dowody'));
|
||||
if(h) h.scrollIntoView({ behavior: 'auto', block: 'start' });
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\realizacje_home.png" });
|
||||
|
||||
// 2. Strona listy /realizacje
|
||||
await page.goto('http://localhost:3001/realizacje', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\realizacje_list.png" });
|
||||
|
||||
// 3. Podstrona etapu IV
|
||||
await page.goto('http://localhost:3001/realizacje/brzozowe-zacisze-etap-4', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
|
||||
// Hero i statystyki
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\etap4_hero.png" });
|
||||
|
||||
// Zjedź do sekcji Cechy / Galeria
|
||||
await page.evaluate(() => {
|
||||
window.scrollBy(0, 1500);
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\etap4_mid.png" });
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,33 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 1440, height: 900 });
|
||||
|
||||
try {
|
||||
await page.goto('http://localhost:3001/uslugi/uslugi-inzynieryjne-budowlane', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
await page.evaluate(() => {
|
||||
const h = Array.from(document.querySelectorAll('h2')).find(h => h.textContent.includes('Dlaczego uprawnienia') || h.textContent.includes('Szczegóły'));
|
||||
if(h) h.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 1500));
|
||||
await page.screenshot({ path: "C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\techtag_inline.png" });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,36 @@
|
||||
const puppeteer = require('puppeteer-core');
|
||||
const fs = require('fs');
|
||||
|
||||
(async () => {
|
||||
let executablePath = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
if (!fs.existsSync(executablePath)) {
|
||||
executablePath = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
}
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
executablePath,
|
||||
headless: "new"
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ width: 375, height: 812, isMobile: true, hasTouch: true });
|
||||
|
||||
try {
|
||||
await page.goto('http://localhost:3001', { waitUntil: 'domcontentloaded', timeout: 30000 });
|
||||
|
||||
// Scroll to trust bar
|
||||
await page.evaluate(() => {
|
||||
const trustBar = document.querySelector('section.bg-brand-surface.overflow-hidden');
|
||||
if(trustBar) trustBar.scrollIntoView({ behavior: 'auto', block: 'center' });
|
||||
});
|
||||
|
||||
await new Promise(r => setTimeout(r, 2000));
|
||||
const arg = process.argv[2] || 'after';
|
||||
await page.screenshot({ path: `C:\\Users\\micuk\\.gemini\\antigravity-ide\\brain\\9e52e20f-afe5-47c9-8610-e3da65efa1e9\\trustbar_${arg}.png` });
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user