diff --git a/web/modules/custom/riverside_pt/css/calendar.css b/web/modules/custom/riverside_pt/css/calendar.css index 78e44de..e99d516 100644 --- a/web/modules/custom/riverside_pt/css/calendar.css +++ b/web/modules/custom/riverside_pt/css/calendar.css @@ -13,7 +13,8 @@ } #riverside-calendar { - max-width: 480px; + --cal-row-h: 3.75rem; + max-width: 340px; font-size: 0.9rem; flex-shrink: 0; } @@ -67,7 +68,7 @@ #riverside-calendar .fc-toolbar-title { font-family: Georgia, 'Times New Roman', serif; - font-size: 1.35rem; + font-size: 1.5rem; font-weight: normal; color: #111; } @@ -115,13 +116,19 @@ /* ── Day cells ── */ #riverside-calendar .fc-daygrid-day-frame { - min-height: 3rem !important; + min-height: calc(var(--cal-row-h) - 0.5rem) !important; display: flex; + flex-direction: row; align-items: center; justify-content: center; padding: 0; } +#riverside-calendar .fc-daygrid-day-events, +#riverside-calendar .fc-daygrid-day-bg { + display: none !important; +} + #riverside-calendar .fc-daygrid-day-top { flex-direction: row; justify-content: center; @@ -145,7 +152,7 @@ /* Days with available slots — teal outline circle */ #riverside-calendar .fc-daygrid-day.has-availability .fc-daygrid-day-number { - border: 2px solid #306f8e; + border: 1px solid #306f8e; color: #111; cursor: pointer; } @@ -157,7 +164,7 @@ /* Selected day — filled teal circle */ #riverside-calendar .fc-daygrid-day.is-selected .fc-daygrid-day-number { background: #306f8e; - border: 2px solid #306f8e; + border: 1px solid #306f8e; color: #fff !important; } @@ -172,6 +179,17 @@ background: none !important; } +/* Weekends — same appearance as any other non-available day */ +#riverside-calendar .fc-day-sat, +#riverside-calendar .fc-day-sun { + background: none !important; +} + +#riverside-calendar .fc-col-header-cell.fc-day-sat .fc-col-header-cell-cushion, +#riverside-calendar .fc-col-header-cell.fc-day-sun .fc-col-header-cell-cushion { + color: #9ca3af; +} + /* ── Hide all event bars, harnesses, and more-links ── */ #riverside-calendar .fc-event, #riverside-calendar .fc-daygrid-event-harness, @@ -183,6 +201,6 @@ /* ── Daygrid body rows — give them breathing room ── */ #riverside-calendar .fc-daygrid-body tr { - height: 3.5rem; + height: var(--cal-row-h); } diff --git a/web/modules/custom/riverside_pt/js/components/rpt-appt-type.js b/web/modules/custom/riverside_pt/js/components/rpt-appt-type.js new file mode 100644 index 0000000..a89f532 --- /dev/null +++ b/web/modules/custom/riverside_pt/js/components/rpt-appt-type.js @@ -0,0 +1,66 @@ +import { h, render } from "https://esm.sh/preact@10"; +import { useState } from "https://esm.sh/preact@10/hooks"; +import { html } from "https://esm.sh/htm@3/preact"; + +const TYPES = [ + { id: "diagnostic", label: "Diagnostic Assessment", duration: "60 MINS" }, + { id: "sports", label: "Sports Rehabilitation", duration: "60 MINS" }, + { id: "surgical", label: "Surgery Rehabilitation", duration: "60 MINS" }, + { id: "neuro", label: "Neurological Therapy", duration: "60 MINS" }, +]; + +const CHECK = html` + +`; + +function ApptType() { + const [selected, setSelected] = useState("diagnostic"); + + return html` +
+

Select Appointment Type

+
+ ${TYPES.map(function (t) { + var active = selected === t.id; + return html` + + `; + })} +
+
+ `; +} + +class RptApptType extends HTMLElement { + connectedCallback() { + render(html`<${ApptType} />`, this); + } + disconnectedCallback() { + render(null, this); + } +} + +customElements.define("rpt-appt-type", RptApptType); diff --git a/web/modules/custom/riverside_pt/riverside_pt.libraries.yml b/web/modules/custom/riverside_pt/riverside_pt.libraries.yml index 225c8c1..775f746 100644 --- a/web/modules/custom/riverside_pt/riverside_pt.libraries.yml +++ b/web/modules/custom/riverside_pt/riverside_pt.libraries.yml @@ -8,6 +8,7 @@ app: js/components/rpt-carousel.js: { attributes: { type: module } } js/components/rpt-testimonials.js: { attributes: { type: module } } js/components/rpt-faq.js: { attributes: { type: module } } + js/components/rpt-appt-type.js: { attributes: { type: module } } schedule: css: theme: diff --git a/web/modules/custom/riverside_pt/templates/riverside-pt-home.html.twig b/web/modules/custom/riverside_pt/templates/riverside-pt-home.html.twig index f0708e5..c2738a5 100644 --- a/web/modules/custom/riverside_pt/templates/riverside-pt-home.html.twig +++ b/web/modules/custom/riverside_pt/templates/riverside-pt-home.html.twig @@ -118,6 +118,7 @@

Book An Appointment

+