diff --git a/public/assets/internet/internet-old.webp b/public/assets/internet/internet-old.webp deleted file mode 100644 index 124da92..0000000 Binary files a/public/assets/internet/internet-old.webp and /dev/null differ diff --git a/public/assets/telefon/przeniesienie.webp b/public/assets/telefon/przeniesienie.webp deleted file mode 100644 index 6fe91e0..0000000 Binary files a/public/assets/telefon/przeniesienie.webp and /dev/null differ diff --git a/public/images/fiber2.webp b/src/assets/hero/fiber2.webp similarity index 100% rename from public/images/fiber2.webp rename to src/assets/hero/fiber2.webp diff --git a/public/images/section-fiber.webp b/src/assets/hero/section-fiber.webp similarity index 100% rename from public/images/section-fiber.webp rename to src/assets/hero/section-fiber.webp diff --git a/public/images/section-radiowy.webp b/src/assets/hero/section-radiowy.webp similarity index 100% rename from public/images/section-radiowy.webp rename to src/assets/hero/section-radiowy.webp diff --git a/public/images/section-telefon.webp b/src/assets/hero/section-telefon.webp similarity index 100% rename from public/images/section-telefon.webp rename to src/assets/hero/section-telefon.webp diff --git a/public/images/section-tv.webp b/src/assets/hero/section-tv.webp similarity index 100% rename from public/images/section-tv.webp rename to src/assets/hero/section-tv.webp diff --git a/public/assets/internet/E5400.webp b/src/assets/sections/E5400.webp similarity index 100% rename from public/assets/internet/E5400.webp rename to src/assets/sections/E5400.webp diff --git a/public/assets/tv/VIP4302.png b/src/assets/sections/VIP4302.png similarity index 100% rename from public/assets/tv/VIP4302.png rename to src/assets/sections/VIP4302.png diff --git a/src/assets/sections/ekosystem-kyanit.webp b/src/assets/sections/ekosystem-kyanit.webp new file mode 100644 index 0000000..d1306da Binary files /dev/null and b/src/assets/sections/ekosystem-kyanit.webp differ diff --git a/src/assets/sections/fiber2.webp b/src/assets/sections/fiber2.webp new file mode 100644 index 0000000..96f4ed6 Binary files /dev/null and b/src/assets/sections/fiber2.webp differ diff --git a/public/assets/internet/internet.webp b/src/assets/sections/internet.webp similarity index 100% rename from public/assets/internet/internet.webp rename to src/assets/sections/internet.webp diff --git a/src/assets/sections/jambox-kyanit-catchup1.webp b/src/assets/sections/jambox-kyanit-catchup1.webp new file mode 100644 index 0000000..481b894 Binary files /dev/null and b/src/assets/sections/jambox-kyanit-catchup1.webp differ diff --git a/src/assets/sections/jambox-kyanit-jpvr.webp b/src/assets/sections/jambox-kyanit-jpvr.webp new file mode 100644 index 0000000..83aeb2d Binary files /dev/null and b/src/assets/sections/jambox-kyanit-jpvr.webp differ diff --git a/src/assets/sections/jambox-kyanit-record-time.webp b/src/assets/sections/jambox-kyanit-record-time.webp new file mode 100644 index 0000000..94a0255 Binary files /dev/null and b/src/assets/sections/jambox-kyanit-record-time.webp differ diff --git a/src/assets/sections/jambox-kyanit-startover.webp b/src/assets/sections/jambox-kyanit-startover.webp new file mode 100644 index 0000000..fd96ff0 Binary files /dev/null and b/src/assets/sections/jambox-kyanit-startover.webp differ diff --git a/src/assets/sections/jambox-kyanit-startover1.webp b/src/assets/sections/jambox-kyanit-startover1.webp new file mode 100644 index 0000000..ed8f448 Binary files /dev/null and b/src/assets/sections/jambox-kyanit-startover1.webp differ diff --git a/src/assets/sections/przeniesienie.png b/src/assets/sections/przeniesienie.png new file mode 100644 index 0000000..6e05ec2 Binary files /dev/null and b/src/assets/sections/przeniesienie.png differ diff --git a/src/assets/sections/section-fiber.webp b/src/assets/sections/section-fiber.webp new file mode 100644 index 0000000..51dfe90 Binary files /dev/null and b/src/assets/sections/section-fiber.webp differ diff --git a/src/assets/sections/section-radiowy.webp b/src/assets/sections/section-radiowy.webp new file mode 100644 index 0000000..caacb0f Binary files /dev/null and b/src/assets/sections/section-radiowy.webp differ diff --git a/src/assets/sections/section-telefon.webp b/src/assets/sections/section-telefon.webp new file mode 100644 index 0000000..fa813b3 Binary files /dev/null and b/src/assets/sections/section-telefon.webp differ diff --git a/src/assets/sections/section-tv.webp b/src/assets/sections/section-tv.webp new file mode 100644 index 0000000..b72f791 Binary files /dev/null and b/src/assets/sections/section-tv.webp differ diff --git a/src/assets/sections/tv/VIP4302.png b/src/assets/sections/tv/VIP4302.png new file mode 100644 index 0000000..f387ca7 Binary files /dev/null and b/src/assets/sections/tv/VIP4302.png differ diff --git a/public/assets/tv/ekosystem-kyanit.png b/src/assets/sections/tv/ekosystem-kyanit.png similarity index 100% rename from public/assets/tv/ekosystem-kyanit.png rename to src/assets/sections/tv/ekosystem-kyanit.png diff --git a/public/assets/tv/jambox-kyanit-catchup1.png b/src/assets/sections/tv/jambox-kyanit-catchup1.png similarity index 100% rename from public/assets/tv/jambox-kyanit-catchup1.png rename to src/assets/sections/tv/jambox-kyanit-catchup1.png diff --git a/public/assets/tv/jambox-kyanit-jpvr.png b/src/assets/sections/tv/jambox-kyanit-jpvr.png similarity index 100% rename from public/assets/tv/jambox-kyanit-jpvr.png rename to src/assets/sections/tv/jambox-kyanit-jpvr.png diff --git a/public/assets/tv/jambox-kyanit-record-time.jpg b/src/assets/sections/tv/jambox-kyanit-record-time.jpg similarity index 100% rename from public/assets/tv/jambox-kyanit-record-time.jpg rename to src/assets/sections/tv/jambox-kyanit-record-time.jpg diff --git a/public/assets/tv/jambox-kyanit-startover.png b/src/assets/sections/tv/jambox-kyanit-startover.png similarity index 100% rename from public/assets/tv/jambox-kyanit-startover.png rename to src/assets/sections/tv/jambox-kyanit-startover.png diff --git a/public/assets/tv/jambox-kyanit-startover1.png b/src/assets/sections/tv/jambox-kyanit-startover1.png similarity index 100% rename from public/assets/tv/jambox-kyanit-startover1.png rename to src/assets/sections/tv/jambox-kyanit-startover1.png diff --git a/src/components/hero/Hero.astro b/src/components/hero/Hero.astro index bc44671..2b93130 100644 --- a/src/components/hero/Hero.astro +++ b/src/components/hero/Hero.astro @@ -1,4 +1,6 @@ --- +import { Image } from "astro:assets"; + const { title = [], subtitle = [], @@ -6,21 +8,46 @@ const { imageUrl, 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 +}); + +// Przygotowanie zmiennej ImageMetadata | null +let imageAsset: ImageMetadata | null = null; + +if (imageUrl) { + const path = `/src/assets/hero/${imageUrl}`; + const mod = images[path]; + + if (mod) { + imageAsset = mod.default; + } +} + +// Obraz HERO jest LCP +const isLCP = true; --- +
- {imageUrl && ( - Światłowód FUZ – szybki internet w Wyszkowie )}
- {Array.isArray(title) ? title.map(line => (

{line}

@@ -28,37 +55,30 @@ const { :

{title}

} - {subtitle && Array.isArray(subtitle) && (
- -

{subtitle[0]}

- {subtitle.slice(1).map((line, i) => (

{line}

))} -
)} - {description && (

{description}

)} - {ctas.length > 0 && (
{ctas.map((cta: { primary: any; href: string | URL | null | undefined; label: unknown; title: string }) => { const cls = cta.primary ? "btn btn-primary" : "btn btn-outline"; return ( - + {cta.label} ); @@ -66,4 +86,5 @@ const {
)}
+
diff --git a/src/components/layout/Footer.astro b/src/components/layout/Footer.astro index e273e26..0d2b540 100644 --- a/src/components/layout/Footer.astro +++ b/src/components/layout/Footer.astro @@ -9,7 +9,7 @@ const footer = yaml.load( ---