astro - uspojnienie stron, seo unifikacja, favicon

This commit is contained in:
dm
2025-12-21 09:50:58 +01:00
parent de4639d2c7
commit 664acbf86b
47 changed files with 811 additions and 605 deletions

View File

@@ -2,13 +2,14 @@
import DefaultLayout from "../../layouts/DefaultLayout.astro";
import MapGoogle from "../../components/maps/MapGoogle.astro";
import RangeForm from "../../islands/RangeForm.jsx";
import { loadYaml, safeArray } from "../../lib/astro-helpers";
import "../../styles/map-google.css";
const apiKey = import.meta.env.PUBLIC_GOOGLE_MAPS_KEY;
const lat = 52.597388;
const lon = 21.456797;
const mapStyleId = "8e0a97af9476f2d3";
const seo = loadYaml("./src/content/mapa-zasiegu/seo.yaml");
---
<script>
@@ -20,9 +21,8 @@ const mapStyleId = "8e0a97af9476f2d3";
}
</script>
<DefaultLayout title="FUZ Mapa zasięgu sieci światłowodowej">
<DefaultLayout seo={seo}>
<section class="flex flex-col md:flex-row h-full min-h-[80vh]">
<!-- PANEL LEWY -->
<aside
class="w-full md:w-[340px] bg-[var(--f-background)] text-[var(--f-text)]
pt-6 px-6 flex flex-col gap-6 overflow-y-auto z-40"
@@ -36,7 +36,6 @@ const mapStyleId = "8e0a97af9476f2d3";
<RangeForm client:load />
</aside>
<!-- MAPA -->
<div class="flex-1 relative min-h-[50vh] md:min-h-0">
<MapGoogle
apiKey={apiKey}
@@ -73,7 +72,6 @@ const mapStyleId = "8e0a97af9476f2d3";
fiberLayer.setMap(map);
}
// Czekamy aż mapa się załaduje
const int = setInterval(() => {
const map = window.getActiveMap();
if (map && window.google?.maps) {
@@ -88,7 +86,6 @@ const mapStyleId = "8e0a97af9476f2d3";
const map = window.getActiveMap();
if (!map) return;
// Czekamy aż API będzie gotowe
if (!window.google?.maps?.importLibrary) {
await new Promise((resolve) => {
const int = setInterval(() => {
@@ -140,7 +137,6 @@ const mapStyleId = "8e0a97af9476f2d3";
window._activeMarker = marker;
// InfoWindow
const html = `
<div class="f-info-window">
<div class="f-info-header">
@@ -167,4 +163,4 @@ const mapStyleId = "8e0a97af9476f2d3";
info.open({ map, anchor: marker });
};
</script>
</DefaultLayout>
</DefaultLayout>