- sync changes to test webhook
This commit is contained in:
parent
af6715b6dd
commit
364b7abe01
17135
.webstudio/data.json
17135
.webstudio/data.json
File diff suppressed because it is too large
Load Diff
3
app/__generated__/$.tsx
generated
3
app/__generated__/$.tsx
generated
@ -10,7 +10,7 @@ import { HtmlEmbed as HtmlEmbed, Fragment as Fragment_1, Image as Image, Slot as
|
||||
|
||||
export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0";
|
||||
|
||||
export const lastPublished = "2025-11-20T00:09:55.498Z";
|
||||
export const lastPublished = "2025-11-23T06:42:16.542Z";
|
||||
|
||||
export const siteName = "Inasa Healthcare";
|
||||
|
||||
@ -34,6 +34,7 @@ className={`w-element w-element-1`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
id={""}
|
||||
className={`w-element w-element-7`}>
|
||||
<Link
|
||||
href={"/"}
|
||||
|
||||
2
app/__generated__/$resources.sitemap.xml.ts
generated
2
app/__generated__/$resources.sitemap.xml.ts
generated
@ -2,7 +2,7 @@
|
||||
export const sitemap = [
|
||||
{
|
||||
"path": "/",
|
||||
"lastModified": "2025-11-20"
|
||||
"lastModified": "2025-11-23"
|
||||
}
|
||||
];
|
||||
|
||||
57
app/__generated__/[contact]._index.server.tsx
generated
Normal file
57
app/__generated__/[contact]._index.server.tsx
generated
Normal file
@ -0,0 +1,57 @@
|
||||
/* eslint-disable */
|
||||
/* This is a auto generated file for building the project */
|
||||
|
||||
|
||||
import type { PageMeta } from "@webstudio-is/sdk";
|
||||
import type { System, ResourceRequest } from "@webstudio-is/sdk";
|
||||
export const getResources = (_props: { system: System }) => {
|
||||
const action: ResourceRequest = {
|
||||
name: "action",
|
||||
url: "https://n8n-ai.bsidesolutions.net/webhook/9974ca96-98ba-4e56-bb48-debfdad8cf59",
|
||||
searchParams: [
|
||||
],
|
||||
method: "post",
|
||||
headers: [
|
||||
{ name: "Content-Type", value: "application/json" },
|
||||
{ name: "Authentication", value: "testing" },
|
||||
],
|
||||
}
|
||||
const _data = new Map<string, ResourceRequest>([
|
||||
])
|
||||
const _action = new Map<string, ResourceRequest>([
|
||||
["action", action],
|
||||
])
|
||||
return { data: _data, action: _action }
|
||||
}
|
||||
|
||||
|
||||
export const getPageMeta = ({
|
||||
system,
|
||||
resources,
|
||||
}: {
|
||||
system: System;
|
||||
resources: Record<string, any>;
|
||||
}): PageMeta => {
|
||||
return {
|
||||
title: "Inasa Healthcare | Contact",
|
||||
description: "",
|
||||
excludePageFromSearch: true,
|
||||
language: "",
|
||||
socialImageAssetName: undefined,
|
||||
socialImageUrl: "",
|
||||
status: undefined,
|
||||
redirect: "",
|
||||
custom: [
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
type Params = Record<string, string | undefined>;
|
||||
export const getRemixParams = ({ ...params }: Params): Params => {
|
||||
return params
|
||||
}
|
||||
|
||||
|
||||
export const contactEmail = "inasahealthcare@gmail.com";
|
||||
|
||||
338
app/__generated__/[contact]._index.tsx
generated
Normal file
338
app/__generated__/[contact]._index.tsx
generated
Normal file
@ -0,0 +1,338 @@
|
||||
/* eslint-disable */
|
||||
/* This is a auto generated file for building the project */
|
||||
|
||||
|
||||
import { Fragment, useState } from "react";
|
||||
import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime";
|
||||
import { Fragment as Fragment_1, Image as Image, HtmlEmbed as HtmlEmbed, Slot as Slot, Input as Input, Textarea as Textarea } from "@webstudio-is/sdk-components-react";
|
||||
import { Link as Link, Body as Body, Form as Form } from "@webstudio-is/sdk-components-react-router";
|
||||
|
||||
|
||||
export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0";
|
||||
|
||||
export const lastPublished = "2025-11-23T06:42:16.542Z";
|
||||
|
||||
export const siteName = "Inasa Healthcare";
|
||||
|
||||
export const breakpoints = [{"id":"5zaWVFAeAfWgFjJNQ0GET"},{"id":"qOHlWr9cjM-6l364uX_FK","maxWidth":991},{"id":"8_hh5VMsAyWW46cnpT5HQ","maxWidth":767},{"id":"swNXPQRoKH4ij-T-zGDE7","maxWidth":479}];
|
||||
|
||||
export const favIconAsset: string | undefined =
|
||||
"file_000000003adc722fbb2d4c57f70e11d2_FsnGqm4TIkHGomknin2UT.png";
|
||||
|
||||
// Font assets on current page (can be preloaded)
|
||||
export const pageFontAssets: string[] =
|
||||
[]
|
||||
|
||||
export const pageBackgroundImageAssets: string[] =
|
||||
[]
|
||||
|
||||
|
||||
|
||||
const Page = (_props: { system: any; }) => {
|
||||
let [formState, set$formState] = useVariableState<any>("initial")
|
||||
return <Body
|
||||
className={`w-element`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
id={""}
|
||||
className={`w-element w-element-7`}>
|
||||
<Link
|
||||
href={"/"}
|
||||
className={`w-element w-element-8`}>
|
||||
<Image
|
||||
src={"/assets/file_000000003adc722fbb2d4c57f70e11d2_FsnGqm4TIkHGomknin2UT.png"}
|
||||
width={1024}
|
||||
height={1024}
|
||||
loading={"lazy"}
|
||||
alt={"logo"}
|
||||
className={`w-image w-image-1`} />
|
||||
</Link>
|
||||
<div
|
||||
className={`w-element w-element-9`}>
|
||||
<div
|
||||
className={`w-element w-element-10`}>
|
||||
<Link
|
||||
href={"/about"}
|
||||
className={`w-element w-element-11`}>
|
||||
<b
|
||||
className={`w-element w-element-25`}>
|
||||
{"About"}
|
||||
</b>
|
||||
</Link>
|
||||
<Link
|
||||
href={"/insurance"}
|
||||
className={`w-element w-element-12`}>
|
||||
<b
|
||||
className={`w-element`}>
|
||||
{"Insurance"}
|
||||
</b>
|
||||
</Link>
|
||||
<Link
|
||||
href={"/services"}
|
||||
className={`w-element w-element-13`}>
|
||||
<b
|
||||
className={`w-element`}>
|
||||
{"Services"}
|
||||
</b>
|
||||
</Link>
|
||||
<Link
|
||||
href={"/contact"}
|
||||
className={`w-element w-element-14`}>
|
||||
<b
|
||||
className={`w-element`}>
|
||||
{"Contact"}
|
||||
</b>
|
||||
</Link>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-15`}>
|
||||
<Link
|
||||
href={"https://portal.kareo.com/app/new/login"}
|
||||
className={`w-element w-element-16`}>
|
||||
{"Patient Portal"}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
<div
|
||||
id={"top"}
|
||||
className={`w-element w-content-1`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
className={`w-element w-element-70`}>
|
||||
<Link
|
||||
href={"https://d2oe0ra32qx05a.cloudfront.net/?practiceKey=k_1_112536"}
|
||||
className={`w-element w-book-appointment-btn`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
className={`w-element w-element-68`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" viewBox=\"0 0 20 20\">\n <path fill=\"currentColor\" d=\"M1 4c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V4zm2 2v12h14V6H3zm2-6h2v2H5V0zm8 0h2v2h-2V0zM5 9h2v2H5V9zm0 4h2v2H5v-2zm4-4h2v2H9V9zm0 4h2v2H9v-2zm4-4h2v2h-2V9zm0 4h2v2h-2v-2z\"/>\n</svg>"}
|
||||
className={`w-html-embed w-html-embed-1`} />
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</Link>
|
||||
<Link
|
||||
type={"button"}
|
||||
href={"/#top"}
|
||||
className={`w-element w-back-up-btn`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
className={`w-element w-element-69`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" viewBox=\"0 0 400 448\">\n <path fill=\"currentColor\" d=\"m44 273l156-139l156 137q4 4 15 4q10 0 17-6q13-15-2-30L200 79L14 241q-14 16-2 30q14 13 32 2z\"/>\n</svg>"}
|
||||
className={`w-html-embed w-html-embed-2`} />
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</Link>
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
<div
|
||||
className={`w-element w-page-content-2`}>
|
||||
<div
|
||||
className={`w-element w-wrapper-2`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<section
|
||||
className={`w-element w-element-71`}>
|
||||
<div
|
||||
className={`w-element`}>
|
||||
<h1
|
||||
className={`w-element`}>
|
||||
{"Contact Us"}
|
||||
</h1>
|
||||
<Form
|
||||
state={formState}
|
||||
onStateChange={(state: any) => {
|
||||
formState = state
|
||||
set$formState(formState)
|
||||
}}
|
||||
action={"action"}
|
||||
encType={"application/x-www-form-urlencoded"}
|
||||
className={`w-webhook-form`}>
|
||||
{(formState === 'initial' || formState === 'error') &&
|
||||
<div
|
||||
className={`w-element`}>
|
||||
<label
|
||||
className={`w-element w-element-72`}>
|
||||
{"Name"}
|
||||
</label>
|
||||
<Input
|
||||
name={"name"}
|
||||
className={`w-element w-element-73`} />
|
||||
<label
|
||||
className={`w-element w-element-74`}>
|
||||
{"Email"}
|
||||
</label>
|
||||
<Input
|
||||
name={"email"}
|
||||
className={`w-element w-element-75`} />
|
||||
<label
|
||||
className={`w-element w-element-76`}>
|
||||
{"Message"}
|
||||
</label>
|
||||
<Textarea
|
||||
name={"message"}
|
||||
className={`w-element w-element-77`} />
|
||||
<button
|
||||
className={`w-element`}>
|
||||
{"Submit"}
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
{(formState === 'success') &&
|
||||
<div
|
||||
className={`w-element`}>
|
||||
{"Thank you for getting in touch!"}
|
||||
</div>
|
||||
}
|
||||
{(formState === 'error') &&
|
||||
<div
|
||||
className={`w-element`}>
|
||||
{"Sorry, something went wrong."}
|
||||
</div>
|
||||
}
|
||||
</Form>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element`} />
|
||||
</section>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</div>
|
||||
</div>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
className={`w-element w-element-17`}>
|
||||
<div
|
||||
href={"/"}
|
||||
className={`w-element w-element-22`}>
|
||||
<div
|
||||
className={`w-element w-element-33`}>
|
||||
<Link
|
||||
href={"/"}
|
||||
className={`w-element w-element-31`}>
|
||||
<div
|
||||
className={`w-element w-element-32`}>
|
||||
<Image
|
||||
src={"/assets/file_000000003adc722fbb2d4c57f70e11d2_FsnGqm4TIkHGomknin2UT.png"}
|
||||
width={1024}
|
||||
height={1024}
|
||||
loading={"lazy"}
|
||||
alt={"logo"}
|
||||
className={`w-image w-image-2`} />
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-26`}>
|
||||
<h3
|
||||
className={`w-element w-element-27`}>
|
||||
<span
|
||||
className={`w-element`}>
|
||||
{"Quick Links"}
|
||||
</span>
|
||||
</h3>
|
||||
<ul
|
||||
className={`w-element w-element-28`}>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Home"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"About"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Insurance"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Services"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Contact"}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-18`}>
|
||||
<h3
|
||||
className={`w-element w-element-23`}>
|
||||
<span
|
||||
className={`w-element`}>
|
||||
{"Our Services"}
|
||||
</span>
|
||||
</h3>
|
||||
<ul
|
||||
className={`w-element w-element-19`}>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"View All Services"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
<Link
|
||||
href={"https://d2oe0ra32qx05a.cloudfront.net/?practiceKey=k_1_112536"}
|
||||
className={`w-element w-element-29`}>
|
||||
{"Book Appointment"}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-20`}>
|
||||
<h3
|
||||
className={`w-element w-element-24`}>
|
||||
<span
|
||||
className={`w-element`}>
|
||||
{"Contact Info"}
|
||||
</span>
|
||||
</h3>
|
||||
<ul
|
||||
className={`w-element w-element-21`}>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Home"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"About"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Insurance"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Services"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Contact"}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</div>
|
||||
</Body>
|
||||
}
|
||||
|
||||
|
||||
export { Page }
|
||||
|
||||
45
app/__generated__/[services]._index.server.tsx
generated
Normal file
45
app/__generated__/[services]._index.server.tsx
generated
Normal file
@ -0,0 +1,45 @@
|
||||
/* eslint-disable */
|
||||
/* This is a auto generated file for building the project */
|
||||
|
||||
|
||||
import type { PageMeta } from "@webstudio-is/sdk";
|
||||
import type { System, ResourceRequest } from "@webstudio-is/sdk";
|
||||
export const getResources = (_props: { system: System }) => {
|
||||
const _data = new Map<string, ResourceRequest>([
|
||||
])
|
||||
const _action = new Map<string, ResourceRequest>([
|
||||
])
|
||||
return { data: _data, action: _action }
|
||||
}
|
||||
|
||||
|
||||
export const getPageMeta = ({
|
||||
system,
|
||||
resources,
|
||||
}: {
|
||||
system: System;
|
||||
resources: Record<string, any>;
|
||||
}): PageMeta => {
|
||||
return {
|
||||
title: "Inasa Healthcare | Services",
|
||||
description: "",
|
||||
excludePageFromSearch: true,
|
||||
language: "",
|
||||
socialImageAssetName: undefined,
|
||||
socialImageUrl: "",
|
||||
status: undefined,
|
||||
redirect: "",
|
||||
custom: [
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
type Params = Record<string, string | undefined>;
|
||||
export const getRemixParams = ({ ...params }: Params): Params => {
|
||||
return params
|
||||
}
|
||||
|
||||
|
||||
export const contactEmail = "inasahealthcare@gmail.com";
|
||||
|
||||
481
app/__generated__/[services]._index.tsx
generated
Normal file
481
app/__generated__/[services]._index.tsx
generated
Normal file
@ -0,0 +1,481 @@
|
||||
/* eslint-disable */
|
||||
/* This is a auto generated file for building the project */
|
||||
|
||||
|
||||
import { Fragment, useState } from "react";
|
||||
import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime";
|
||||
import { Fragment as Fragment_1, Image as Image, Box as Box, Text as Text, HtmlEmbed as HtmlEmbed, Slot as Slot } from "@webstudio-is/sdk-components-react";
|
||||
import { Link as Link, Body as Body } from "@webstudio-is/sdk-components-react-router";
|
||||
import { Dialog as Dialog, DialogTrigger as DialogTrigger, DialogOverlay as DialogOverlay, DialogContent as DialogContent, DialogTitle as DialogTitle, DialogDescription as DialogDescription, DialogClose as DialogClose } from "@webstudio-is/sdk-components-react-radix";
|
||||
|
||||
|
||||
export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0";
|
||||
|
||||
export const lastPublished = "2025-11-23T06:42:16.542Z";
|
||||
|
||||
export const siteName = "Inasa Healthcare";
|
||||
|
||||
export const breakpoints = [{"id":"5zaWVFAeAfWgFjJNQ0GET"},{"id":"qOHlWr9cjM-6l364uX_FK","maxWidth":991},{"id":"8_hh5VMsAyWW46cnpT5HQ","maxWidth":767},{"id":"swNXPQRoKH4ij-T-zGDE7","maxWidth":479}];
|
||||
|
||||
export const favIconAsset: string | undefined =
|
||||
"file_000000003adc722fbb2d4c57f70e11d2_FsnGqm4TIkHGomknin2UT.png";
|
||||
|
||||
// Font assets on current page (can be preloaded)
|
||||
export const pageFontAssets: string[] =
|
||||
[]
|
||||
|
||||
export const pageBackgroundImageAssets: string[] =
|
||||
[]
|
||||
|
||||
|
||||
|
||||
const Page = (_props: { system: any; }) => {
|
||||
return <Body
|
||||
className={`w-element`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
id={""}
|
||||
className={`w-element w-element-7`}>
|
||||
<Link
|
||||
href={"/"}
|
||||
className={`w-element w-element-8`}>
|
||||
<Image
|
||||
src={"/assets/file_000000003adc722fbb2d4c57f70e11d2_FsnGqm4TIkHGomknin2UT.png"}
|
||||
width={1024}
|
||||
height={1024}
|
||||
loading={"lazy"}
|
||||
alt={"logo"}
|
||||
className={`w-image w-image-1`} />
|
||||
</Link>
|
||||
<div
|
||||
className={`w-element w-element-9`}>
|
||||
<div
|
||||
className={`w-element w-element-10`}>
|
||||
<Link
|
||||
href={"/about"}
|
||||
className={`w-element w-element-11`}>
|
||||
<b
|
||||
className={`w-element w-element-25`}>
|
||||
{"About"}
|
||||
</b>
|
||||
</Link>
|
||||
<Link
|
||||
href={"/insurance"}
|
||||
className={`w-element w-element-12`}>
|
||||
<b
|
||||
className={`w-element`}>
|
||||
{"Insurance"}
|
||||
</b>
|
||||
</Link>
|
||||
<Link
|
||||
href={"/services"}
|
||||
className={`w-element w-element-13`}>
|
||||
<b
|
||||
className={`w-element`}>
|
||||
{"Services"}
|
||||
</b>
|
||||
</Link>
|
||||
<Link
|
||||
href={"/contact"}
|
||||
className={`w-element w-element-14`}>
|
||||
<b
|
||||
className={`w-element`}>
|
||||
{"Contact"}
|
||||
</b>
|
||||
</Link>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-15`}>
|
||||
<Link
|
||||
href={"https://portal.kareo.com/app/new/login"}
|
||||
className={`w-element w-element-16`}>
|
||||
{"Patient Portal"}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
<div
|
||||
className={`w-element w-page-content`}>
|
||||
<div
|
||||
className={`w-element w-wrapper`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<section
|
||||
id={"services"}
|
||||
className={`w-element ${"services"}`}>
|
||||
<div
|
||||
className={`w-element ${"container"}`}>
|
||||
<div
|
||||
className={`w-element w-element-34 ${"section-header"}`}>
|
||||
<h1
|
||||
className={`w-element w-element-45`}>
|
||||
{"Our Services"}
|
||||
</h1>
|
||||
<p
|
||||
className={`w-element w-element-46`}>
|
||||
{"Comprehensive healthcare services tailored to your needs"}
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-35 ${"services-grid"}`}>
|
||||
<div
|
||||
className={`w-element w-element-36 ${"service-card"}`}>
|
||||
<div
|
||||
className={`w-element w-element-37 ${"service-icon"}`}>
|
||||
<Image
|
||||
alt={"Mental Health Services"}
|
||||
src={"/services/primarycare.svg"}
|
||||
className={`w-image w-image-3 ${"w-10 h-10"}`} />
|
||||
</div>
|
||||
<h3
|
||||
className={`w-element w-element-47`}>
|
||||
{"Mental Health Services"}
|
||||
</h3>
|
||||
<p
|
||||
className={`w-element w-element-48`}>
|
||||
{"Mental Health Screening, Evaluation and Treatment for: depression, anxiety, bipolar disorder, other psychiatric conditions"}
|
||||
</p>
|
||||
<Dialog>
|
||||
<DialogTrigger>
|
||||
<button
|
||||
className={`w-element w-element-57 ${"service-button"}`}>
|
||||
{"Learn More"}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogOverlay
|
||||
className={`w-dialog-overlay w-dialog-overlay-1`}>
|
||||
<DialogContent
|
||||
className={`w-dialog-content w-dialog-content-1`}>
|
||||
<Box
|
||||
className={`w-box w-dialog-header`}>
|
||||
<DialogTitle
|
||||
className={`w-dialog-title w-dialog-title-1`}>
|
||||
{"Dialog Title you can edit"}
|
||||
</DialogTitle>
|
||||
<DialogDescription
|
||||
className={`w-dialog-description w-dialog-description-1`}>
|
||||
{"Dialog description text you can edit"}
|
||||
</DialogDescription>
|
||||
</Box>
|
||||
<Text
|
||||
className={`w-text`}>
|
||||
{"The text you can edit"}
|
||||
</Text>
|
||||
<DialogClose
|
||||
className={`w-close-button w-close-button-1`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" width=\"100%\" height=\"100%\" style=\"display: block;\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12.5 3 3 12.5M3 3l9.5 9.5\"/></svg>"}
|
||||
className={`w-html-embed`} />
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogOverlay>
|
||||
</Dialog>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-38 ${"service-card"}`}>
|
||||
<div
|
||||
className={`w-element w-element-39 ${"service-icon"}`}>
|
||||
<Image
|
||||
alt={"Chronic Illness"}
|
||||
src={"/services/urgentcare.svg"}
|
||||
className={`w-image ${"w-10 h-10"}`} />
|
||||
</div>
|
||||
<h3
|
||||
className={`w-element w-element-49`}>
|
||||
{"Chronic Illness Management"}
|
||||
</h3>
|
||||
<p
|
||||
className={`w-element w-element-50`}>
|
||||
{"Diabetes and Hypertension management, Cholesterol screening and management, Weight loss management and support, Women and Men's health, Nicotine dependency treatment"}
|
||||
</p>
|
||||
<Dialog>
|
||||
<DialogTrigger>
|
||||
<button
|
||||
className={`w-element w-element-58 ${"service-button"}`}>
|
||||
{"Learn More"}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogOverlay
|
||||
className={`w-dialog-overlay w-dialog-overlay-2`}>
|
||||
<DialogContent
|
||||
className={`w-dialog-content w-dialog-content-2`}>
|
||||
<Box
|
||||
className={`w-box w-dialog-header-1`}>
|
||||
<DialogTitle
|
||||
className={`w-dialog-title w-dialog-title-2`}>
|
||||
{"Dialog Title you can edit"}
|
||||
</DialogTitle>
|
||||
<DialogDescription
|
||||
className={`w-dialog-description w-dialog-description-2`}>
|
||||
{"Dialog description text you can edit"}
|
||||
</DialogDescription>
|
||||
</Box>
|
||||
<Text
|
||||
className={`w-text`}>
|
||||
{"The text you can edit"}
|
||||
</Text>
|
||||
<DialogClose
|
||||
className={`w-close-button w-close-button-2`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" width=\"100%\" height=\"100%\" style=\"display: block;\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12.5 3 3 12.5M3 3l9.5 9.5\"/></svg>"}
|
||||
className={`w-html-embed`} />
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogOverlay>
|
||||
</Dialog>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-40 ${"service-card"}`}>
|
||||
<div
|
||||
className={`w-element w-element-41 ${"service-icon"}`}>
|
||||
<Image
|
||||
alt={"Physicals & Screenings"}
|
||||
src={"/services/physical.svg"}
|
||||
className={`w-image ${"w-10 h-10"}`} />
|
||||
</div>
|
||||
<h3
|
||||
className={`w-element w-element-51`}>
|
||||
{"Primary & Preventive Care"}
|
||||
</h3>
|
||||
<p
|
||||
className={`w-element w-element-52`}>
|
||||
{"Pre-employment, DOT, sports, camp physicals, tuberculin tests, and titers."}
|
||||
</p>
|
||||
<Dialog>
|
||||
<DialogTrigger>
|
||||
<button
|
||||
className={`w-element w-element-59 ${"service-button"}`}>
|
||||
{"Learn More"}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogOverlay
|
||||
className={`w-dialog-overlay w-dialog-overlay-3`}>
|
||||
<DialogContent
|
||||
className={`w-dialog-content w-dialog-content-3`}>
|
||||
<Box
|
||||
className={`w-box w-dialog-header-2`}>
|
||||
<DialogTitle
|
||||
className={`w-dialog-title w-dialog-title-3`}>
|
||||
{"Dialog Title you can edit"}
|
||||
</DialogTitle>
|
||||
<DialogDescription
|
||||
className={`w-dialog-description w-dialog-description-3`}>
|
||||
{"Dialog description text you can edit"}
|
||||
</DialogDescription>
|
||||
</Box>
|
||||
<Text
|
||||
className={`w-text`}>
|
||||
{"The text you can edit"}
|
||||
</Text>
|
||||
<DialogClose
|
||||
className={`w-close-button w-close-button-3`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" width=\"100%\" height=\"100%\" style=\"display: block;\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12.5 3 3 12.5M3 3l9.5 9.5\"/></svg>"}
|
||||
className={`w-html-embed`} />
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogOverlay>
|
||||
</Dialog>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-53 ${"service-card"}`}>
|
||||
<div
|
||||
className={`w-element w-element-54 ${"service-icon"}`}>
|
||||
<Image
|
||||
alt={"Physicals & Screenings"}
|
||||
src={"/services/physical.svg"}
|
||||
className={`w-image w-image-4 ${"w-10 h-10"}`} />
|
||||
</div>
|
||||
<h3
|
||||
className={`w-element w-element-55`}>
|
||||
{"Urgent Care & Walk-in Services"}
|
||||
</h3>
|
||||
<p
|
||||
className={`w-element w-element-56`}>
|
||||
{"Pre-employment, DOT, sports, camp physicals, tuberculin tests, and titers."}
|
||||
</p>
|
||||
<Dialog>
|
||||
<DialogTrigger>
|
||||
<button
|
||||
className={`w-element w-element-60 ${"service-button"}`}>
|
||||
{"Learn More"}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogOverlay
|
||||
className={`w-dialog-overlay w-dialog-overlay-4`}>
|
||||
<DialogContent
|
||||
className={`w-dialog-content w-dialog-content-4`}>
|
||||
<Box
|
||||
className={`w-box w-dialog-header-3`}>
|
||||
<DialogTitle
|
||||
className={`w-dialog-title w-dialog-title-4`}>
|
||||
{"Dialog Title you can edit"}
|
||||
</DialogTitle>
|
||||
<DialogDescription
|
||||
className={`w-dialog-description w-dialog-description-4`}>
|
||||
{"Dialog description text you can edit"}
|
||||
</DialogDescription>
|
||||
</Box>
|
||||
<Text
|
||||
className={`w-text`}>
|
||||
{"The text you can edit"}
|
||||
</Text>
|
||||
<DialogClose
|
||||
className={`w-close-button w-close-button-4`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" width=\"100%\" height=\"100%\" style=\"display: block;\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12.5 3 3 12.5M3 3l9.5 9.5\"/></svg>"}
|
||||
className={`w-html-embed`} />
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogOverlay>
|
||||
</Dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-42`}>
|
||||
<p
|
||||
className={`w-element w-element-43`}>
|
||||
{"Looking for immediate care in Nottingham, MD? "}
|
||||
<Link
|
||||
href={"/nottingham-md-clinic"}
|
||||
data-discover={"true"}
|
||||
className={`w-element w-element-44`}>
|
||||
{"Visit our Nottingham clinic page"}
|
||||
</Link>
|
||||
{" for same-day appointments, walk-in services, and comprehensive care at 4416 Fitch Ave."}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</div>
|
||||
</div>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
className={`w-element w-element-17`}>
|
||||
<div
|
||||
href={"/"}
|
||||
className={`w-element w-element-22`}>
|
||||
<div
|
||||
className={`w-element w-element-33`}>
|
||||
<Link
|
||||
href={"/"}
|
||||
className={`w-element w-element-31`}>
|
||||
<div
|
||||
className={`w-element w-element-32`}>
|
||||
<Image
|
||||
src={"/assets/file_000000003adc722fbb2d4c57f70e11d2_FsnGqm4TIkHGomknin2UT.png"}
|
||||
width={1024}
|
||||
height={1024}
|
||||
loading={"lazy"}
|
||||
alt={"logo"}
|
||||
className={`w-image w-image-2`} />
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-26`}>
|
||||
<h3
|
||||
className={`w-element w-element-27`}>
|
||||
<span
|
||||
className={`w-element`}>
|
||||
{"Quick Links"}
|
||||
</span>
|
||||
</h3>
|
||||
<ul
|
||||
className={`w-element w-element-28`}>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Home"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"About"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Insurance"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Services"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Contact"}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-18`}>
|
||||
<h3
|
||||
className={`w-element w-element-23`}>
|
||||
<span
|
||||
className={`w-element`}>
|
||||
{"Our Services"}
|
||||
</span>
|
||||
</h3>
|
||||
<ul
|
||||
className={`w-element w-element-19`}>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"View All Services"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
<Link
|
||||
href={"https://d2oe0ra32qx05a.cloudfront.net/?practiceKey=k_1_112536"}
|
||||
className={`w-element w-element-29`}>
|
||||
{"Book Appointment"}
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-20`}>
|
||||
<h3
|
||||
className={`w-element w-element-24`}>
|
||||
<span
|
||||
className={`w-element`}>
|
||||
{"Contact Info"}
|
||||
</span>
|
||||
</h3>
|
||||
<ul
|
||||
className={`w-element w-element-21`}>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Home"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"About"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Insurance"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Services"}
|
||||
</li>
|
||||
<li
|
||||
className={`w-element`}>
|
||||
{"Contact"}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</Body>
|
||||
}
|
||||
|
||||
|
||||
export { Page }
|
||||
|
||||
242
app/__generated__/_index.tsx
generated
242
app/__generated__/_index.tsx
generated
@ -5,12 +5,13 @@
|
||||
import { Fragment, useState } from "react";
|
||||
import { useResource, useVariableState } from "@webstudio-is/react-sdk/runtime";
|
||||
import { Body as Body, Link as Link } from "@webstudio-is/sdk-components-react-router";
|
||||
import { Fragment as Fragment_1, Image as Image, Slot as Slot } from "@webstudio-is/sdk-components-react";
|
||||
import { Fragment as Fragment_1, Image as Image, Slot as Slot, Box as Box, Text as Text, HtmlEmbed as HtmlEmbed } from "@webstudio-is/sdk-components-react";
|
||||
import { Dialog as Dialog, DialogTrigger as DialogTrigger, DialogOverlay as DialogOverlay, DialogContent as DialogContent, DialogTitle as DialogTitle, DialogDescription as DialogDescription, DialogClose as DialogClose } from "@webstudio-is/sdk-components-react-radix";
|
||||
|
||||
|
||||
export const projectId = "363652e3-9846-4534-acdf-9b2b3c66eec0";
|
||||
|
||||
export const lastPublished = "2025-11-20T00:09:55.498Z";
|
||||
export const lastPublished = "2025-11-23T06:42:16.542Z";
|
||||
|
||||
export const siteName = "Inasa Healthcare";
|
||||
|
||||
@ -36,10 +37,11 @@ import { Fragment as Fragment_1, Image as Image, Slot as Slot } from "@webstudio
|
||||
|
||||
const Page = (_props: { system: any; }) => {
|
||||
return <Body
|
||||
className={`w-element`}>
|
||||
className={`w-element w-element-61`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
id={""}
|
||||
className={`w-element w-element-7`}>
|
||||
<Link
|
||||
href={"/"}
|
||||
@ -102,30 +104,69 @@ className={`w-element w-element-16`}>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
<div
|
||||
className={`w-element w-page-content`}>
|
||||
id={"top"}
|
||||
className={`w-element w-content`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
className={`w-element w-element-70`}>
|
||||
<Link
|
||||
href={"https://d2oe0ra32qx05a.cloudfront.net/?practiceKey=k_1_112536"}
|
||||
className={`w-element w-book-appointment-btn`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
className={`w-element w-element-68`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" viewBox=\"0 0 20 20\">\n <path fill=\"currentColor\" d=\"M1 4c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V4zm2 2v12h14V6H3zm2-6h2v2H5V0zm8 0h2v2h-2V0zM5 9h2v2H5V9zm0 4h2v2H5v-2zm4-4h2v2H9V9zm0 4h2v2H9v-2zm4-4h2v2h-2V9zm0 4h2v2h-2v-2z\"/>\n</svg>"}
|
||||
className={`w-html-embed w-html-embed-1`} />
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</Link>
|
||||
<Link
|
||||
type={"button"}
|
||||
href={"/#top"}
|
||||
className={`w-element w-back-up-btn`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<div
|
||||
className={`w-element w-element-69`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"30\" height=\"30\" viewBox=\"0 0 400 448\">\n <path fill=\"currentColor\" d=\"m44 273l156-139l156 137q4 4 15 4q10 0 17-6q13-15-2-30L200 79L14 241q-14 16-2 30q14 13 32 2z\"/>\n</svg>"}
|
||||
className={`w-html-embed w-html-embed-2`} />
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</Link>
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
<div
|
||||
className={`w-element w-page-content-1`}>
|
||||
<div
|
||||
className={`w-element w-hero-section`}>
|
||||
<div
|
||||
className={`w-element w-hero-overlay`}>
|
||||
<div
|
||||
className={`w-element w-element-34`}>
|
||||
className={`w-element w-element-62`}>
|
||||
<h1
|
||||
className={`w-element w-element-35`}>
|
||||
className={`w-element w-element-63`}>
|
||||
<b
|
||||
className={`w-element w-element-36`}>
|
||||
className={`w-element w-element-64`}>
|
||||
{"Welcome to Inasa Healthcare"}
|
||||
</b>
|
||||
</h1>
|
||||
<div
|
||||
className={`w-element w-element-37 ${"hero-cta-buttons"}`}>
|
||||
className={`w-element w-element-65 ${"hero-cta-buttons"}`}>
|
||||
<Link
|
||||
href={"https://d2oe0ra32qx05a.cloudfront.net/?practiceKey=k_1_112536"}
|
||||
className={`w-element w-element-38 ${"cta-button secondary"}`}>
|
||||
className={`w-element w-element-66 ${"cta-button secondary"}`}>
|
||||
{"Book An Appointment"}
|
||||
</Link>
|
||||
<Link
|
||||
href={"tel:4436313354"}
|
||||
className={`w-element w-element-39 ${"cta-button secondary"}`}>
|
||||
className={`w-element w-element-67 ${"cta-button secondary"}`}>
|
||||
{"Call Us At 443-631-3321"}
|
||||
</Link>
|
||||
</div>
|
||||
@ -135,7 +176,7 @@ className={`w-element w-element-39 ${"cta-button secondary"}`}>
|
||||
className={`w-element w-hero`} />
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-wrapper`}>
|
||||
className={`w-element w-wrapper-1`}>
|
||||
<Slot>
|
||||
<Fragment_1>
|
||||
<section
|
||||
@ -144,116 +185,240 @@ className={`w-element ${"services"}`}>
|
||||
<div
|
||||
className={`w-element ${"container"}`}>
|
||||
<div
|
||||
className={`w-element w-element-40 ${"section-header"}`}>
|
||||
className={`w-element w-element-34 ${"section-header"}`}>
|
||||
<h1
|
||||
className={`w-element w-element-54`}>
|
||||
className={`w-element w-element-45`}>
|
||||
{"Our Services"}
|
||||
</h1>
|
||||
<p
|
||||
className={`w-element w-element-55`}>
|
||||
className={`w-element w-element-46`}>
|
||||
{"Comprehensive healthcare services tailored to your needs"}
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-41 ${"services-grid"}`}>
|
||||
className={`w-element w-element-35 ${"services-grid"}`}>
|
||||
<div
|
||||
className={`w-element w-element-42 ${"service-card"}`}>
|
||||
className={`w-element w-element-36 ${"service-card"}`}>
|
||||
<div
|
||||
className={`w-element w-element-43 ${"service-icon"}`}>
|
||||
className={`w-element w-element-37 ${"service-icon"}`}>
|
||||
<Image
|
||||
alt={"Mental Health Services"}
|
||||
src={"/services/primarycare.svg"}
|
||||
className={`w-image w-image-3 ${"w-10 h-10"}`} />
|
||||
</div>
|
||||
<h3
|
||||
className={`w-element w-element-56`}>
|
||||
className={`w-element w-element-47`}>
|
||||
{"Mental Health Services"}
|
||||
</h3>
|
||||
<p
|
||||
className={`w-element w-element-57`}>
|
||||
className={`w-element w-element-48`}>
|
||||
{"Mental Health Screening, Evaluation and Treatment for: depression, anxiety, bipolar disorder, other psychiatric conditions"}
|
||||
</p>
|
||||
<Dialog>
|
||||
<DialogTrigger>
|
||||
<button
|
||||
className={`w-element w-element-44 ${"service-button"}`}>
|
||||
className={`w-element w-element-57 ${"service-button"}`}>
|
||||
{"Learn More"}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogOverlay
|
||||
className={`w-dialog-overlay w-dialog-overlay-1`}>
|
||||
<DialogContent
|
||||
className={`w-dialog-content w-dialog-content-1`}>
|
||||
<Box
|
||||
className={`w-box w-dialog-header`}>
|
||||
<DialogTitle
|
||||
className={`w-dialog-title w-dialog-title-1`}>
|
||||
{"Dialog Title you can edit"}
|
||||
</DialogTitle>
|
||||
<DialogDescription
|
||||
className={`w-dialog-description w-dialog-description-1`}>
|
||||
{"Dialog description text you can edit"}
|
||||
</DialogDescription>
|
||||
</Box>
|
||||
<Text
|
||||
className={`w-text`}>
|
||||
{"The text you can edit"}
|
||||
</Text>
|
||||
<DialogClose
|
||||
className={`w-close-button w-close-button-1`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" width=\"100%\" height=\"100%\" style=\"display: block;\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12.5 3 3 12.5M3 3l9.5 9.5\"/></svg>"}
|
||||
className={`w-html-embed`} />
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogOverlay>
|
||||
</Dialog>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-45 ${"service-card"}`}>
|
||||
className={`w-element w-element-38 ${"service-card"}`}>
|
||||
<div
|
||||
className={`w-element w-element-46 ${"service-icon"}`}>
|
||||
className={`w-element w-element-39 ${"service-icon"}`}>
|
||||
<Image
|
||||
alt={"Chronic Illness"}
|
||||
src={"/services/urgentcare.svg"}
|
||||
className={`w-image ${"w-10 h-10"}`} />
|
||||
</div>
|
||||
<h3
|
||||
className={`w-element w-element-58`}>
|
||||
className={`w-element w-element-49`}>
|
||||
{"Chronic Illness Management"}
|
||||
</h3>
|
||||
<p
|
||||
className={`w-element w-element-59`}>
|
||||
className={`w-element w-element-50`}>
|
||||
{"Diabetes and Hypertension management, Cholesterol screening and management, Weight loss management and support, Women and Men's health, Nicotine dependency treatment"}
|
||||
</p>
|
||||
<Dialog>
|
||||
<DialogTrigger>
|
||||
<button
|
||||
className={`w-element w-element-47 ${"service-button"}`}>
|
||||
className={`w-element w-element-58 ${"service-button"}`}>
|
||||
{"Learn More"}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogOverlay
|
||||
className={`w-dialog-overlay w-dialog-overlay-2`}>
|
||||
<DialogContent
|
||||
className={`w-dialog-content w-dialog-content-2`}>
|
||||
<Box
|
||||
className={`w-box w-dialog-header-1`}>
|
||||
<DialogTitle
|
||||
className={`w-dialog-title w-dialog-title-2`}>
|
||||
{"Dialog Title you can edit"}
|
||||
</DialogTitle>
|
||||
<DialogDescription
|
||||
className={`w-dialog-description w-dialog-description-2`}>
|
||||
{"Dialog description text you can edit"}
|
||||
</DialogDescription>
|
||||
</Box>
|
||||
<Text
|
||||
className={`w-text`}>
|
||||
{"The text you can edit"}
|
||||
</Text>
|
||||
<DialogClose
|
||||
className={`w-close-button w-close-button-2`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" width=\"100%\" height=\"100%\" style=\"display: block;\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12.5 3 3 12.5M3 3l9.5 9.5\"/></svg>"}
|
||||
className={`w-html-embed`} />
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogOverlay>
|
||||
</Dialog>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-48 ${"service-card"}`}>
|
||||
className={`w-element w-element-40 ${"service-card"}`}>
|
||||
<div
|
||||
className={`w-element w-element-49 ${"service-icon"}`}>
|
||||
className={`w-element w-element-41 ${"service-icon"}`}>
|
||||
<Image
|
||||
alt={"Physicals & Screenings"}
|
||||
src={"/services/physical.svg"}
|
||||
className={`w-image ${"w-10 h-10"}`} />
|
||||
</div>
|
||||
<h3
|
||||
className={`w-element w-element-60`}>
|
||||
className={`w-element w-element-51`}>
|
||||
{"Primary & Preventive Care"}
|
||||
</h3>
|
||||
<p
|
||||
className={`w-element w-element-61`}>
|
||||
className={`w-element w-element-52`}>
|
||||
{"Pre-employment, DOT, sports, camp physicals, tuberculin tests, and titers."}
|
||||
</p>
|
||||
<Dialog>
|
||||
<DialogTrigger>
|
||||
<button
|
||||
className={`w-element w-element-50 ${"service-button"}`}>
|
||||
className={`w-element w-element-59 ${"service-button"}`}>
|
||||
{"Learn More"}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogOverlay
|
||||
className={`w-dialog-overlay w-dialog-overlay-3`}>
|
||||
<DialogContent
|
||||
className={`w-dialog-content w-dialog-content-3`}>
|
||||
<Box
|
||||
className={`w-box w-dialog-header-2`}>
|
||||
<DialogTitle
|
||||
className={`w-dialog-title w-dialog-title-3`}>
|
||||
{"Dialog Title you can edit"}
|
||||
</DialogTitle>
|
||||
<DialogDescription
|
||||
className={`w-dialog-description w-dialog-description-3`}>
|
||||
{"Dialog description text you can edit"}
|
||||
</DialogDescription>
|
||||
</Box>
|
||||
<Text
|
||||
className={`w-text`}>
|
||||
{"The text you can edit"}
|
||||
</Text>
|
||||
<DialogClose
|
||||
className={`w-close-button w-close-button-3`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" width=\"100%\" height=\"100%\" style=\"display: block;\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12.5 3 3 12.5M3 3l9.5 9.5\"/></svg>"}
|
||||
className={`w-html-embed`} />
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogOverlay>
|
||||
</Dialog>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-62 ${"service-card"}`}>
|
||||
className={`w-element w-element-53 ${"service-card"}`}>
|
||||
<div
|
||||
className={`w-element w-element-63 ${"service-icon"}`}>
|
||||
className={`w-element w-element-54 ${"service-icon"}`}>
|
||||
<Image
|
||||
alt={"Physicals & Screenings"}
|
||||
src={"/services/physical.svg"}
|
||||
className={`w-image w-image-4 ${"w-10 h-10"}`} />
|
||||
</div>
|
||||
<h3
|
||||
className={`w-element w-element-64`}>
|
||||
className={`w-element w-element-55`}>
|
||||
{"Urgent Care & Walk-in Services"}
|
||||
</h3>
|
||||
<p
|
||||
className={`w-element w-element-65`}>
|
||||
className={`w-element w-element-56`}>
|
||||
{"Pre-employment, DOT, sports, camp physicals, tuberculin tests, and titers."}
|
||||
</p>
|
||||
<Dialog>
|
||||
<DialogTrigger>
|
||||
<button
|
||||
className={`w-element w-element-66 ${"service-button"}`}>
|
||||
className={`w-element w-element-60 ${"service-button"}`}>
|
||||
{"Learn More"}
|
||||
</button>
|
||||
</DialogTrigger>
|
||||
<DialogOverlay
|
||||
className={`w-dialog-overlay w-dialog-overlay-4`}>
|
||||
<DialogContent
|
||||
className={`w-dialog-content w-dialog-content-4`}>
|
||||
<Box
|
||||
className={`w-box w-dialog-header-3`}>
|
||||
<DialogTitle
|
||||
className={`w-dialog-title w-dialog-title-4`}>
|
||||
{"Dialog Title you can edit"}
|
||||
</DialogTitle>
|
||||
<DialogDescription
|
||||
className={`w-dialog-description w-dialog-description-4`}>
|
||||
{"Dialog description text you can edit"}
|
||||
</DialogDescription>
|
||||
</Box>
|
||||
<Text
|
||||
className={`w-text`}>
|
||||
{"The text you can edit"}
|
||||
</Text>
|
||||
<DialogClose
|
||||
className={`w-close-button w-close-button-4`}>
|
||||
<HtmlEmbed
|
||||
code={"<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 16 16\" width=\"100%\" height=\"100%\" style=\"display: block;\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12.5 3 3 12.5M3 3l9.5 9.5\"/></svg>"}
|
||||
className={`w-html-embed`} />
|
||||
</DialogClose>
|
||||
</DialogContent>
|
||||
</DialogOverlay>
|
||||
</Dialog>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`w-element w-element-51`}>
|
||||
className={`w-element w-element-42`}>
|
||||
<p
|
||||
className={`w-element w-element-52`}>
|
||||
className={`w-element w-element-43`}>
|
||||
{"Looking for immediate care in Nottingham, MD? "}
|
||||
<Link
|
||||
href={"/nottingham-md-clinic"}
|
||||
data-discover={"true"}
|
||||
className={`w-element w-element-53`}>
|
||||
className={`w-element w-element-44`}>
|
||||
{"Visit our Nottingham clinic page"}
|
||||
</Link>
|
||||
{" for same-day appointments, walk-in services, and comprehensive care at 4416 Fitch Ave."}
|
||||
@ -384,6 +549,7 @@ className={`w-element`}>
|
||||
</div>
|
||||
</Fragment_1>
|
||||
</Slot>
|
||||
</div>
|
||||
</Body>
|
||||
}
|
||||
|
||||
|
||||
1146
app/__generated__/index.css
generated
1146
app/__generated__/index.css
generated
File diff suppressed because it is too large
Load Diff
315
app/routes/[contact]._index.tsx
Normal file
315
app/routes/[contact]._index.tsx
Normal file
@ -0,0 +1,315 @@
|
||||
import {
|
||||
type MetaFunction,
|
||||
type LinksFunction,
|
||||
type LinkDescriptor,
|
||||
type ActionFunctionArgs,
|
||||
type LoaderFunctionArgs,
|
||||
type HeadersFunction,
|
||||
data,
|
||||
redirect,
|
||||
useLoaderData,
|
||||
} from "react-router";
|
||||
import {
|
||||
isLocalResource,
|
||||
loadResource,
|
||||
loadResources,
|
||||
formIdFieldName,
|
||||
formBotFieldName,
|
||||
cachedFetch,
|
||||
} from "@webstudio-is/sdk/runtime";
|
||||
import {
|
||||
ReactSdkContext,
|
||||
PageSettingsMeta,
|
||||
PageSettingsTitle,
|
||||
} from "@webstudio-is/react-sdk/runtime";
|
||||
import {
|
||||
projectId,
|
||||
Page,
|
||||
siteName,
|
||||
favIconAsset,
|
||||
pageFontAssets,
|
||||
pageBackgroundImageAssets,
|
||||
breakpoints,
|
||||
} from "../__generated__/[contact]._index";
|
||||
import {
|
||||
getResources,
|
||||
getPageMeta,
|
||||
getRemixParams,
|
||||
contactEmail,
|
||||
} from "../__generated__/[contact]._index.server";
|
||||
import * as constants from "../constants.mjs";
|
||||
import css from "../__generated__/index.css?url";
|
||||
import { sitemap } from "../__generated__/$resources.sitemap.xml";
|
||||
|
||||
const customFetch: typeof fetch = (input, init) => {
|
||||
if (typeof input !== "string") {
|
||||
return cachedFetch(projectId, input, init);
|
||||
}
|
||||
|
||||
if (isLocalResource(input, "sitemap.xml")) {
|
||||
// @todo: dynamic import sitemap ???
|
||||
const response = new Response(JSON.stringify(sitemap));
|
||||
response.headers.set("content-type", "application/json; charset=utf-8");
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
|
||||
if (isLocalResource(input, "current-date")) {
|
||||
const now = new Date();
|
||||
// Normalize to midnight UTC to prevent hydration mismatches
|
||||
const startOfDay = new Date(
|
||||
Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate())
|
||||
);
|
||||
const data = {
|
||||
iso: startOfDay.toISOString(),
|
||||
year: startOfDay.getUTCFullYear(),
|
||||
month: startOfDay.getUTCMonth() + 1, // 1-12 instead of 0-11
|
||||
day: startOfDay.getUTCDate(),
|
||||
timestamp: startOfDay.getTime(),
|
||||
};
|
||||
const response = new Response(JSON.stringify(data));
|
||||
response.headers.set("content-type", "application/json; charset=utf-8");
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
|
||||
return cachedFetch(projectId, input, init);
|
||||
};
|
||||
|
||||
export const loader = async (arg: LoaderFunctionArgs) => {
|
||||
const url = new URL(arg.request.url);
|
||||
const host =
|
||||
arg.request.headers.get("x-forwarded-host") ||
|
||||
arg.request.headers.get("host") ||
|
||||
"";
|
||||
url.host = host;
|
||||
url.protocol = "https";
|
||||
|
||||
const params = getRemixParams(arg.params);
|
||||
const system = {
|
||||
params,
|
||||
search: Object.fromEntries(url.searchParams),
|
||||
origin: url.origin,
|
||||
pathname: url.pathname,
|
||||
};
|
||||
|
||||
const resources = await loadResources(
|
||||
customFetch,
|
||||
getResources({ system }).data
|
||||
);
|
||||
const pageMeta = getPageMeta({ system, resources });
|
||||
|
||||
if (pageMeta.redirect) {
|
||||
const status =
|
||||
pageMeta.status === 301 || pageMeta.status === 302
|
||||
? pageMeta.status
|
||||
: 302;
|
||||
throw redirect(pageMeta.redirect, status);
|
||||
}
|
||||
|
||||
// typecheck
|
||||
arg.context.EXCLUDE_FROM_SEARCH satisfies boolean;
|
||||
|
||||
if (arg.context.EXCLUDE_FROM_SEARCH) {
|
||||
pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;
|
||||
}
|
||||
|
||||
return data(
|
||||
{
|
||||
host,
|
||||
url: url.href,
|
||||
system,
|
||||
resources,
|
||||
pageMeta,
|
||||
},
|
||||
// No way for current information to change, so add cache for 10 minutes
|
||||
// In case of CRM Data, this should be set to 0
|
||||
{
|
||||
status: pageMeta.status,
|
||||
headers: {
|
||||
"Cache-Control": "public, max-age=600",
|
||||
},
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export const headers: HeadersFunction = () => {
|
||||
return {
|
||||
"Cache-Control": "public, max-age=0, must-revalidate",
|
||||
};
|
||||
};
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => {
|
||||
const metas: ReturnType<MetaFunction> = [];
|
||||
if (data === undefined) {
|
||||
return metas;
|
||||
}
|
||||
|
||||
const origin = `https://${data.host}`;
|
||||
|
||||
if (siteName) {
|
||||
metas.push({
|
||||
"script:ld+json": {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
name: siteName,
|
||||
url: origin,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return metas;
|
||||
};
|
||||
|
||||
export const links: LinksFunction = () => {
|
||||
const result: LinkDescriptor[] = [];
|
||||
|
||||
result.push({
|
||||
rel: "stylesheet",
|
||||
href: css,
|
||||
});
|
||||
|
||||
if (favIconAsset) {
|
||||
result.push({
|
||||
rel: "icon",
|
||||
href: constants.imageLoader({
|
||||
src: `${constants.assetBaseUrl}${favIconAsset}`,
|
||||
// width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search
|
||||
width: 144,
|
||||
height: 144,
|
||||
fit: "pad",
|
||||
quality: 100,
|
||||
format: "auto",
|
||||
}),
|
||||
type: undefined,
|
||||
});
|
||||
}
|
||||
|
||||
for (const asset of pageFontAssets) {
|
||||
result.push({
|
||||
rel: "preload",
|
||||
href: `${constants.assetBaseUrl}${asset}`,
|
||||
as: "font",
|
||||
crossOrigin: "anonymous",
|
||||
});
|
||||
}
|
||||
|
||||
for (const backgroundImageAsset of pageBackgroundImageAssets) {
|
||||
result.push({
|
||||
rel: "preload",
|
||||
href: `${constants.assetBaseUrl}${backgroundImageAsset}`,
|
||||
as: "image",
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
const getRequestHost = (request: Request): string =>
|
||||
request.headers.get("x-forwarded-host") || request.headers.get("host") || "";
|
||||
|
||||
export const action = async ({
|
||||
request,
|
||||
context,
|
||||
}: ActionFunctionArgs): Promise<
|
||||
{ success: true } | { success: false; errors: string[] }
|
||||
> => {
|
||||
try {
|
||||
const url = new URL(request.url);
|
||||
url.host = getRequestHost(request);
|
||||
|
||||
const formData = await request.formData();
|
||||
|
||||
const system = {
|
||||
params: {},
|
||||
search: {},
|
||||
origin: url.origin,
|
||||
pathname: url.pathname,
|
||||
};
|
||||
|
||||
const resourceName = formData.get(formIdFieldName);
|
||||
let resource =
|
||||
typeof resourceName === "string"
|
||||
? getResources({ system }).action.get(resourceName)
|
||||
: undefined;
|
||||
|
||||
const formBotValue = formData.get(formBotFieldName);
|
||||
|
||||
if (formBotValue == null || typeof formBotValue !== "string") {
|
||||
throw new Error("Form bot field not found");
|
||||
}
|
||||
|
||||
const submitTime = parseInt(formBotValue, 16);
|
||||
// Assumes that the difference between the server time and the form submission time,
|
||||
// including any client-server time drift, is within a 5-minute range.
|
||||
// Note: submitTime might be NaN because formBotValue can be any string used for logging purposes.
|
||||
// Example: `formBotValue: jsdom`, or `formBotValue: headless-env`
|
||||
if (
|
||||
Number.isNaN(submitTime) ||
|
||||
Math.abs(Date.now() - submitTime) > 1000 * 60 * 5
|
||||
) {
|
||||
throw new Error(`Form bot value invalid ${formBotValue}`);
|
||||
}
|
||||
|
||||
formData.delete(formIdFieldName);
|
||||
formData.delete(formBotFieldName);
|
||||
|
||||
if (resource) {
|
||||
resource.body = Object.fromEntries(formData);
|
||||
} else {
|
||||
if (contactEmail === undefined) {
|
||||
throw new Error("Contact email not found");
|
||||
}
|
||||
|
||||
resource = context.getDefaultActionResource?.({
|
||||
url,
|
||||
projectId,
|
||||
contactEmail,
|
||||
formData,
|
||||
});
|
||||
}
|
||||
|
||||
if (resource === undefined) {
|
||||
throw Error("Resource not found");
|
||||
}
|
||||
const { ok, statusText } = await loadResource(fetch, resource);
|
||||
if (ok) {
|
||||
return { success: true };
|
||||
}
|
||||
return { success: false, errors: [statusText] };
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
errors: [error instanceof Error ? error.message : "Unknown error"],
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
const Outlet = () => {
|
||||
const { system, resources, url, pageMeta, host } =
|
||||
useLoaderData<typeof loader>();
|
||||
return (
|
||||
<ReactSdkContext.Provider
|
||||
value={{
|
||||
...constants,
|
||||
resources,
|
||||
breakpoints,
|
||||
onError: console.error,
|
||||
}}
|
||||
>
|
||||
{/* Use the URL as the key to force scripts in HTML Embed to reload on dynamic pages */}
|
||||
<Page key={url} system={system} />
|
||||
<PageSettingsMeta
|
||||
url={url}
|
||||
pageMeta={pageMeta}
|
||||
host={host}
|
||||
siteName={siteName}
|
||||
imageLoader={constants.imageLoader}
|
||||
assetBaseUrl={constants.assetBaseUrl}
|
||||
/>
|
||||
<PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>
|
||||
</ReactSdkContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export default Outlet;
|
||||
315
app/routes/[services]._index.tsx
Normal file
315
app/routes/[services]._index.tsx
Normal file
@ -0,0 +1,315 @@
|
||||
import {
|
||||
type MetaFunction,
|
||||
type LinksFunction,
|
||||
type LinkDescriptor,
|
||||
type ActionFunctionArgs,
|
||||
type LoaderFunctionArgs,
|
||||
type HeadersFunction,
|
||||
data,
|
||||
redirect,
|
||||
useLoaderData,
|
||||
} from "react-router";
|
||||
import {
|
||||
isLocalResource,
|
||||
loadResource,
|
||||
loadResources,
|
||||
formIdFieldName,
|
||||
formBotFieldName,
|
||||
cachedFetch,
|
||||
} from "@webstudio-is/sdk/runtime";
|
||||
import {
|
||||
ReactSdkContext,
|
||||
PageSettingsMeta,
|
||||
PageSettingsTitle,
|
||||
} from "@webstudio-is/react-sdk/runtime";
|
||||
import {
|
||||
projectId,
|
||||
Page,
|
||||
siteName,
|
||||
favIconAsset,
|
||||
pageFontAssets,
|
||||
pageBackgroundImageAssets,
|
||||
breakpoints,
|
||||
} from "../__generated__/[services]._index";
|
||||
import {
|
||||
getResources,
|
||||
getPageMeta,
|
||||
getRemixParams,
|
||||
contactEmail,
|
||||
} from "../__generated__/[services]._index.server";
|
||||
import * as constants from "../constants.mjs";
|
||||
import css from "../__generated__/index.css?url";
|
||||
import { sitemap } from "../__generated__/$resources.sitemap.xml";
|
||||
|
||||
const customFetch: typeof fetch = (input, init) => {
|
||||
if (typeof input !== "string") {
|
||||
return cachedFetch(projectId, input, init);
|
||||
}
|
||||
|
||||
if (isLocalResource(input, "sitemap.xml")) {
|
||||
// @todo: dynamic import sitemap ???
|
||||
const response = new Response(JSON.stringify(sitemap));
|
||||
response.headers.set("content-type", "application/json; charset=utf-8");
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
|
||||
if (isLocalResource(input, "current-date")) {
|
||||
const now = new Date();
|
||||
// Normalize to midnight UTC to prevent hydration mismatches
|
||||
const startOfDay = new Date(
|
||||
Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate())
|
||||
);
|
||||
const data = {
|
||||
iso: startOfDay.toISOString(),
|
||||
year: startOfDay.getUTCFullYear(),
|
||||
month: startOfDay.getUTCMonth() + 1, // 1-12 instead of 0-11
|
||||
day: startOfDay.getUTCDate(),
|
||||
timestamp: startOfDay.getTime(),
|
||||
};
|
||||
const response = new Response(JSON.stringify(data));
|
||||
response.headers.set("content-type", "application/json; charset=utf-8");
|
||||
return Promise.resolve(response);
|
||||
}
|
||||
|
||||
return cachedFetch(projectId, input, init);
|
||||
};
|
||||
|
||||
export const loader = async (arg: LoaderFunctionArgs) => {
|
||||
const url = new URL(arg.request.url);
|
||||
const host =
|
||||
arg.request.headers.get("x-forwarded-host") ||
|
||||
arg.request.headers.get("host") ||
|
||||
"";
|
||||
url.host = host;
|
||||
url.protocol = "https";
|
||||
|
||||
const params = getRemixParams(arg.params);
|
||||
const system = {
|
||||
params,
|
||||
search: Object.fromEntries(url.searchParams),
|
||||
origin: url.origin,
|
||||
pathname: url.pathname,
|
||||
};
|
||||
|
||||
const resources = await loadResources(
|
||||
customFetch,
|
||||
getResources({ system }).data
|
||||
);
|
||||
const pageMeta = getPageMeta({ system, resources });
|
||||
|
||||
if (pageMeta.redirect) {
|
||||
const status =
|
||||
pageMeta.status === 301 || pageMeta.status === 302
|
||||
? pageMeta.status
|
||||
: 302;
|
||||
throw redirect(pageMeta.redirect, status);
|
||||
}
|
||||
|
||||
// typecheck
|
||||
arg.context.EXCLUDE_FROM_SEARCH satisfies boolean;
|
||||
|
||||
if (arg.context.EXCLUDE_FROM_SEARCH) {
|
||||
pageMeta.excludePageFromSearch = arg.context.EXCLUDE_FROM_SEARCH;
|
||||
}
|
||||
|
||||
return data(
|
||||
{
|
||||
host,
|
||||
url: url.href,
|
||||
system,
|
||||
resources,
|
||||
pageMeta,
|
||||
},
|
||||
// No way for current information to change, so add cache for 10 minutes
|
||||
// In case of CRM Data, this should be set to 0
|
||||
{
|
||||
status: pageMeta.status,
|
||||
headers: {
|
||||
"Cache-Control": "public, max-age=600",
|
||||
},
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export const headers: HeadersFunction = () => {
|
||||
return {
|
||||
"Cache-Control": "public, max-age=0, must-revalidate",
|
||||
};
|
||||
};
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => {
|
||||
const metas: ReturnType<MetaFunction> = [];
|
||||
if (data === undefined) {
|
||||
return metas;
|
||||
}
|
||||
|
||||
const origin = `https://${data.host}`;
|
||||
|
||||
if (siteName) {
|
||||
metas.push({
|
||||
"script:ld+json": {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
name: siteName,
|
||||
url: origin,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return metas;
|
||||
};
|
||||
|
||||
export const links: LinksFunction = () => {
|
||||
const result: LinkDescriptor[] = [];
|
||||
|
||||
result.push({
|
||||
rel: "stylesheet",
|
||||
href: css,
|
||||
});
|
||||
|
||||
if (favIconAsset) {
|
||||
result.push({
|
||||
rel: "icon",
|
||||
href: constants.imageLoader({
|
||||
src: `${constants.assetBaseUrl}${favIconAsset}`,
|
||||
// width,height must be multiple of 48 https://developers.google.com/search/docs/appearance/favicon-in-search
|
||||
width: 144,
|
||||
height: 144,
|
||||
fit: "pad",
|
||||
quality: 100,
|
||||
format: "auto",
|
||||
}),
|
||||
type: undefined,
|
||||
});
|
||||
}
|
||||
|
||||
for (const asset of pageFontAssets) {
|
||||
result.push({
|
||||
rel: "preload",
|
||||
href: `${constants.assetBaseUrl}${asset}`,
|
||||
as: "font",
|
||||
crossOrigin: "anonymous",
|
||||
});
|
||||
}
|
||||
|
||||
for (const backgroundImageAsset of pageBackgroundImageAssets) {
|
||||
result.push({
|
||||
rel: "preload",
|
||||
href: `${constants.assetBaseUrl}${backgroundImageAsset}`,
|
||||
as: "image",
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
const getRequestHost = (request: Request): string =>
|
||||
request.headers.get("x-forwarded-host") || request.headers.get("host") || "";
|
||||
|
||||
export const action = async ({
|
||||
request,
|
||||
context,
|
||||
}: ActionFunctionArgs): Promise<
|
||||
{ success: true } | { success: false; errors: string[] }
|
||||
> => {
|
||||
try {
|
||||
const url = new URL(request.url);
|
||||
url.host = getRequestHost(request);
|
||||
|
||||
const formData = await request.formData();
|
||||
|
||||
const system = {
|
||||
params: {},
|
||||
search: {},
|
||||
origin: url.origin,
|
||||
pathname: url.pathname,
|
||||
};
|
||||
|
||||
const resourceName = formData.get(formIdFieldName);
|
||||
let resource =
|
||||
typeof resourceName === "string"
|
||||
? getResources({ system }).action.get(resourceName)
|
||||
: undefined;
|
||||
|
||||
const formBotValue = formData.get(formBotFieldName);
|
||||
|
||||
if (formBotValue == null || typeof formBotValue !== "string") {
|
||||
throw new Error("Form bot field not found");
|
||||
}
|
||||
|
||||
const submitTime = parseInt(formBotValue, 16);
|
||||
// Assumes that the difference between the server time and the form submission time,
|
||||
// including any client-server time drift, is within a 5-minute range.
|
||||
// Note: submitTime might be NaN because formBotValue can be any string used for logging purposes.
|
||||
// Example: `formBotValue: jsdom`, or `formBotValue: headless-env`
|
||||
if (
|
||||
Number.isNaN(submitTime) ||
|
||||
Math.abs(Date.now() - submitTime) > 1000 * 60 * 5
|
||||
) {
|
||||
throw new Error(`Form bot value invalid ${formBotValue}`);
|
||||
}
|
||||
|
||||
formData.delete(formIdFieldName);
|
||||
formData.delete(formBotFieldName);
|
||||
|
||||
if (resource) {
|
||||
resource.body = Object.fromEntries(formData);
|
||||
} else {
|
||||
if (contactEmail === undefined) {
|
||||
throw new Error("Contact email not found");
|
||||
}
|
||||
|
||||
resource = context.getDefaultActionResource?.({
|
||||
url,
|
||||
projectId,
|
||||
contactEmail,
|
||||
formData,
|
||||
});
|
||||
}
|
||||
|
||||
if (resource === undefined) {
|
||||
throw Error("Resource not found");
|
||||
}
|
||||
const { ok, statusText } = await loadResource(fetch, resource);
|
||||
if (ok) {
|
||||
return { success: true };
|
||||
}
|
||||
return { success: false, errors: [statusText] };
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
errors: [error instanceof Error ? error.message : "Unknown error"],
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
const Outlet = () => {
|
||||
const { system, resources, url, pageMeta, host } =
|
||||
useLoaderData<typeof loader>();
|
||||
return (
|
||||
<ReactSdkContext.Provider
|
||||
value={{
|
||||
...constants,
|
||||
resources,
|
||||
breakpoints,
|
||||
onError: console.error,
|
||||
}}
|
||||
>
|
||||
{/* Use the URL as the key to force scripts in HTML Embed to reload on dynamic pages */}
|
||||
<Page key={url} system={system} />
|
||||
<PageSettingsMeta
|
||||
url={url}
|
||||
pageMeta={pageMeta}
|
||||
host={host}
|
||||
siteName={siteName}
|
||||
imageLoader={constants.imageLoader}
|
||||
assetBaseUrl={constants.assetBaseUrl}
|
||||
/>
|
||||
<PageSettingsTitle>{pageMeta.title}</PageSettingsTitle>
|
||||
</ReactSdkContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export default Outlet;
|
||||
Loading…
x
Reference in New Issue
Block a user