diff --git a/.deco/blocks/pages-Nossas%2520Lojas-998808.json b/.deco/blocks/pages-Nossas%2520Lojas-998808.json new file mode 100644 index 0000000..bf24dbd --- /dev/null +++ b/.deco/blocks/pages-Nossas%2520Lojas-998808.json @@ -0,0 +1,45 @@ +{ + "name": "Nossas Lojas", + "path": "/nossas-lojas", + "sections": [ + { + "__resolveType": "website/sections/Rendering/Lazy.tsx", + "section": { + "__resolveType": "Header" + } + }, + { + "__resolveType": "site/sections/BreadcrumbInstitucional/Breadcrumb.tsx", + "root": "HOME", + "path": "Ajuda", + "showText": false, + "route": "Nossas Lojas" + }, + { + "__resolveType": "site/sections/NossasLojas/NossasLojas.tsx", + "title": "Encontre uma loja perto de você!", + "paragraph": "
Em cada loja você vai encontrar detalhes do Mundo Mágico da Alphabeto em cada cantinho. Tudo preparado com muito carinho para receber você e a criançada com muita alegria no nosso universo alegre e colorido. Ah, sempre tem um balão divertido pra criançada começar a brincadeira.
", + "items": [ + { + "paragraph": "Em cada loja você vai encontrar detalhes do Mundo Mágico da Alphabeto em cada cantinho. Tudo preparado com muito carinho para receber você e a criançada com muita alegria no nosso universo alegre e colorido. Ah, sempre tem um balão divertido pra criançada começar a brincadeira.
", + "title": "Encontre uma loja perto de você!" + } + ], + "apiKey": { + "__resolveType": "website/loaders/secret.ts", + "encrypted": "0bb9088851f809ab67eb0416474dd8ecac774558aa52006e414eb59cd74ae01cf0e04c3341174e6964b0a5bb06d97cd1", + "name": "GOOGLE_MAPS_API_KEY" + } + }, + { + "__resolveType": "website/sections/Rendering/Lazy.tsx", + "section": { + "__resolveType": "Footer" + } + } + ], + "seo": { + "__resolveType": "website/sections/Seo/SeoV2.tsx" + }, + "__resolveType": "website/pages/Page.tsx" +} \ No newline at end of file diff --git a/components/ui/Icon.tsx b/components/ui/Icon.tsx index 138a37e..09a5771 100644 --- a/components/ui/Icon.tsx +++ b/components/ui/Icon.tsx @@ -25,8 +25,10 @@ export type AvailableIcons = | "trash" | "location_pin" | "close-search" + | "logo_store" | "plus" | "minus" + | "whatsappIcon" | "home-breadcrumb" | "cat_sort_orders:desc" | "cat_sort_price:asc" diff --git a/fresh.gen.ts b/fresh.gen.ts index 557ae49..278ba62 100644 --- a/fresh.gen.ts +++ b/fresh.gen.ts @@ -3,12 +3,14 @@ // This file is automatically updated during development when running `dev.ts`. import * as $_app from "./routes/_app.tsx"; +import * as $Map from "./islands/Map.tsx"; import * as $MenuInstitutionalMobile from "./islands/MenuInstitutionalMobile.tsx"; import * as $MinicartFooter from "./islands/MinicartFooter.tsx"; import * as $MultiRangeSlider from "./islands/MultiRangeSlider.tsx"; import * as $Notify from "./islands/Notify.tsx"; import * as $ScrollButton from "./islands/ScrollButton.tsx"; import * as $ShowPriceItem from "./islands/ShowPriceItem.tsx"; +import * as $formsNossasLojas from "./islands/formsNossasLojas.tsx"; import type { Manifest } from "$fresh/server.ts"; const manifest = { @@ -16,12 +18,14 @@ const manifest = { "./routes/_app.tsx": $_app, }, islands: { + "./islands/Map.tsx": $Map, "./islands/MenuInstitutionalMobile.tsx": $MenuInstitutionalMobile, "./islands/MinicartFooter.tsx": $MinicartFooter, "./islands/MultiRangeSlider.tsx": $MultiRangeSlider, "./islands/Notify.tsx": $Notify, "./islands/ScrollButton.tsx": $ScrollButton, "./islands/ShowPriceItem.tsx": $ShowPriceItem, + "./islands/formsNossasLojas.tsx": $formsNossasLojas, }, baseUrl: import.meta.url, } satisfies Manifest; diff --git a/islands/Map.tsx b/islands/Map.tsx new file mode 100644 index 0000000..0fbeae6 --- /dev/null +++ b/islands/Map.tsx @@ -0,0 +1,92 @@ +// deno-lint-ignore-file +import { effect, signal, useSignal } from "@preact/signals"; +import { useEffect } from "preact/compat"; + +import { Loader } from "https://esm.sh/@googlemaps/js-api-loader@1.16.6"; + +interface Props { + apiKey: string, + stores: StoreInfo[]; +} + +interface StoreInfo { + address: { + location: { + latitude: number; + longitude: number; + }; + }; +} + +interface Zoom { + lat: number, + lng: number, + zoom: number +} + +export const zoom = signal+ Busque por cidade, CEP, endereço ou loja: +
+ ++ {store.name} +
+{store.address.state}
++ {store.address.street}, {store.address.number} -{" "} + {store.address.neighborhood} +
+CEP: {store.address.postalCode}
++ {store.whatsapp} +
+ ++ Horários de funcionamento: +
++ {days[hour.dayOfWeek]}: + `{hour.openingTime.slice(0, 5)}h às {hour.closingTime.slice(0, 5)}h` +
+ ))} +