From a0f4e8fbabc6ba186f7bbacc1a6940123aae307a Mon Sep 17 00:00:00 2001 From: dm Date: Wed, 26 Nov 2025 14:37:07 +0100 Subject: [PATCH] =?UTF-8?q?Stylizacja,=20zmiana=20mapy=20zasi=C4=99gu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/hero/Hero.astro | 2 - src/components/layout/Header.astro | 2 +- src/components/maps/CitiesList.astro | 5 +- src/components/maps/MapGoogle.astro | 10 +- src/components/maps/MapSwitch.astro | 15 -- src/components/sections/SectionContact.astro | 247 +++++++------------ src/content/mapa-zasiegu/page.yaml | 12 - src/content/seo/home.yaml | 2 +- src/islands/MapRangeSwitch.jsx | 33 --- src/islands/RangeForm.jsx | 32 +-- src/pages/api/contact.ts | 8 +- src/pages/index.astro | 2 +- src/pages/kontakt/index.astro | 10 +- src/pages/mapa-zasiegu/index.astro | 187 +++++--------- src/styles/base.css | 5 - src/styles/buttons.css | 48 +--- src/styles/contact.css | 26 +- src/styles/cookie.css | 14 +- src/styles/footer.css | 12 +- src/styles/hero.css | 19 +- src/styles/map-google.css | 94 ++++++- src/styles/markdown.css | 9 +- src/styles/modal.css | 18 +- src/styles/navbar.css | 11 +- src/styles/offers/offers-extra.css | 4 +- src/styles/offers/offers-switches.css | 4 +- src/styles/offers/offers-table.css | 11 +- src/styles/sections.css | 32 +-- src/styles/theme.css | 22 +- 29 files changed, 339 insertions(+), 557 deletions(-) delete mode 100644 src/components/maps/MapSwitch.astro delete mode 100644 src/islands/MapRangeSwitch.jsx diff --git a/src/components/hero/Hero.astro b/src/components/hero/Hero.astro index 1525706..82caf02 100644 --- a/src/components/hero/Hero.astro +++ b/src/components/hero/Hero.astro @@ -9,7 +9,6 @@ const { ctas = [] } = Astro.props; -// Automatyczne wczytanie wszystkich obrazów hero const images = import.meta.glob<{ default: ImageMetadata }>('/src/assets/hero/*.{png,jpg,jpeg,webp,avif}', { eager: true }); @@ -44,7 +43,6 @@ const isLCP = true; )}
- {Array.isArray(title) ? title.map(line => (

{line}

diff --git a/src/components/layout/Header.astro b/src/components/layout/Header.astro index f6001c5..d531b2a 100644 --- a/src/components/layout/Header.astro +++ b/src/components/layout/Header.astro @@ -7,7 +7,7 @@ const links = [ { name: "INTERNET I TELEWIZJA", href: "/internet-telewizja" }, { name: "TELEFON", href: "/telefon" }, { name: "ZASIĘG SIECI", href: "/mapa-zasiegu" }, - { name: "KONTAKT", href: "/#contact" }, + { name: "KONTAKT", href: "/kontakt" }, { name: "BOK", href: "https://panel.fuz.pl/userpanel/auth", diff --git a/src/components/maps/CitiesList.astro b/src/components/maps/CitiesList.astro index 5002f2a..1a6f24a 100644 --- a/src/components/maps/CitiesList.astro +++ b/src/components/maps/CitiesList.astro @@ -1,12 +1,10 @@ --- const { cities = [] } = Astro.props; - -// sortujemy alfabetycznie const sorted = cities.sort((a: string, b: any) => a.localeCompare(b, "pl")); ---
-

Miejscowości w zasięgu sieci światłowodowej i radiowej

+

Miejscowości w zasięgu sieci światłowodowej

{sorted.map((city: unknown) => ( @@ -20,7 +18,6 @@ const sorted = cities.sort((a: string, b: any) => a.localeCompare(b, "pl")); background: var(--f-background); color: var(--f-text); - padding: 16px; } diff --git a/src/components/maps/MapGoogle.astro b/src/components/maps/MapGoogle.astro index 9cf5f89..3cd6e46 100644 --- a/src/components/maps/MapGoogle.astro +++ b/src/components/maps/MapGoogle.astro @@ -13,7 +13,7 @@ const { description = "", showMarker = false, mode = "full", - mapStyleId = "8e0a97af9476f2d3" // Google DEMO mapId (legalne, bez warningów) + mapStyleId = "8e0a97af9476f2d3" } = Astro.props; /** ID kontenera w DOM */ @@ -119,9 +119,11 @@ const domId = `fuz-map-${Math.random().toString(36).slice(2)}`; if (title || desc) { const info = new InfoWindow({ content: ` -
- ${title}
- ${desc} +
+
+
${title}
+
${desc}
+
` }); diff --git a/src/components/maps/MapSwitch.astro b/src/components/maps/MapSwitch.astro deleted file mode 100644 index 91634bd..0000000 --- a/src/components/maps/MapSwitch.astro +++ /dev/null @@ -1,15 +0,0 @@ ---- -const { id, label } = Astro.props; ---- - - diff --git a/src/components/sections/SectionContact.astro b/src/components/sections/SectionContact.astro index 4dbbfb7..61e11bb 100644 --- a/src/components/sections/SectionContact.astro +++ b/src/components/sections/SectionContact.astro @@ -1,184 +1,125 @@ --- import yaml from "js-yaml"; import fs from "fs"; -import MapGoogle from "../maps/MapGoogle.astro"; -// import "../../styles/contact.css"; +import MapGoogle from "../../components/maps/MapGoogle.astro"; const data = yaml.load( - fs.readFileSync("./src/content/contact/contact.yaml", "utf8"), + fs.readFileSync("./src/content/contact/contact.yaml", "utf8") ); + const apiKey = import.meta.env.PUBLIC_GOOGLE_MAPS_KEY; const form = data.form; --- -
-
- -
-

{data.title}

-
-
- - -
-

{data.contactFormTitle}

-
-
- - -
- -
- - -
- - - - - - - - -
-
+
+
+ +
+

{data.title}

+
-
- +
+

{data.contactFormTitle}

+
+
+ + +
+ +
+ + +
+ + + + + + + + +
- -
+
+ +
+ +
+ +
- - diff --git a/src/content/mapa-zasiegu/page.yaml b/src/content/mapa-zasiegu/page.yaml index 16bdcae..e69de29 100644 --- a/src/content/mapa-zasiegu/page.yaml +++ b/src/content/mapa-zasiegu/page.yaml @@ -1,12 +0,0 @@ -przelaczniki: - - id: "zasieg" - etykieta: "Rodzaj zasiegu" - domyslny: "none" - title: "Zmień rodzaj" - opcje: - - id: "swiatlowodowy" - nazwa: "Światłowodowy" - - id: "radiowy" - nazwa: "Radiowy" - - id: "none" - nazwa: "Ukryj zasięgi" diff --git a/src/content/seo/home.yaml b/src/content/seo/home.yaml index 1ec4261..35b7caa 100644 --- a/src/content/seo/home.yaml +++ b/src/content/seo/home.yaml @@ -1,5 +1,5 @@ site: - name: "FUZ – Internet światłowodowy i radiowy w Wyszkowie" + name: "FUZ – Internet światłowodowy w Wyszkowie" description: "Stabilny i szybki internet" url: "https://www.fuz.pl" lang: "pl" diff --git a/src/islands/MapRangeSwitch.jsx b/src/islands/MapRangeSwitch.jsx deleted file mode 100644 index 59058f5..0000000 --- a/src/islands/MapRangeSwitch.jsx +++ /dev/null @@ -1,33 +0,0 @@ -import { useState } from "preact/hooks"; -import "../styles/offers/offers-switches.css"; - -export default function MapRangeSwitch() { - const [selected, setSelected] = useState("none"); - - const options = [ - { id: "swiatlowodowy", nazwa: "Światłowodowy" }, - { id: "radiowy", nazwa: "Radiowy" }, - { id: "none", nazwa: "Ukryj" } - ]; - - const update = (id) => { - setSelected(id); - window?.handleMapSwitch?.(id); - }; - - return ( -
-
- {options.map((op) => ( - - ))} -
-
- ); -} diff --git a/src/islands/RangeForm.jsx b/src/islands/RangeForm.jsx index e82a0e9..cb68118 100644 --- a/src/islands/RangeForm.jsx +++ b/src/islands/RangeForm.jsx @@ -22,9 +22,6 @@ export default function RangeForm() { let timeoutCity = null; let timeoutStreet = null; - // ===================================================== - // AUTOCOMPLETE MIASTO - // ===================================================== async function fetchCitySuggestions(q) { const res = await fetch(`/api/cities-autocomplete?q=${encodeURIComponent(q)}`); setCitySuggest(await res.json()); @@ -80,9 +77,6 @@ export default function RangeForm() { cityListRef.current.children[highlightIndex]?.scrollIntoView({ block: "nearest" }); }, [highlightIndex]); - // ===================================================== - // AUTO-MATCH MIASTO — NOWE! - // ===================================================== useEffect(() => { if (!citySuggest.length) return; @@ -98,9 +92,6 @@ export default function RangeForm() { } }, [city, citySuggest]); - // ===================================================== - // DOSTĘPNOŚĆ ULIC - // ===================================================== async function updateStreetAvailability(currentCity) { if (!currentCity) { setStreetDisabled(true); @@ -133,9 +124,6 @@ export default function RangeForm() { updateStreetAvailability(city); }, [city]); - // ===================================================== - // AUTOCOMPLETE ULICA - // ===================================================== async function fetchStreetSuggestions(q, c) { const res = await fetch( `/api/streets-autocomplete?city=${encodeURIComponent(c)}&q=${encodeURIComponent(q)}` @@ -194,9 +182,6 @@ export default function RangeForm() { streetListRef.current.children[streetHighlightIndex]?.scrollIntoView({ block: "nearest" }); }, [streetHighlightIndex]); - // ===================================================== - // AUTO-MATCH ULICA — NOWE! - // ===================================================== useEffect(() => { if (!streetSuggest.length) return; @@ -211,9 +196,6 @@ export default function RangeForm() { } }, [street, streetSuggest]); - // ===================================================== - // SUBMIT - // ===================================================== async function onSubmit(e) { e.preventDefault(); setError(""); @@ -248,17 +230,13 @@ export default function RangeForm() { setLoading(false); } - // ===================================================== - // RENDER - // ===================================================== return (
- - {/* CITY */}
setNumber(e.target.value)} required /> - {/* ERROR */} {error && ( -

{error}

+

{error}

)} - {/* BUTTON */}