diff --git a/src/pages/sms-onboarding.astro b/src/pages/sms-onboarding.astro index 1c7bed9..318df32 100644 --- a/src/pages/sms-onboarding.astro +++ b/src/pages/sms-onboarding.astro @@ -5,18 +5,18 @@ import { loadSiteData } from '../lib/site-data.ts'; const { siteContext } = loadSiteData(); // In a real implementation, this would connect to an API endpoint -// that stores the phone number and sends a confirmation SMS +// that stores the owner's phone number and sends a confirmation SMS --- - + {siteContext.businessName} - Stay Connected + Owner Portal
-

Get Website Updates by Text

+

Update Your Website by Text

- Sign up to receive text message notifications whenever we update our website - with new events, menu items, or announcements. + Send a text message to edit your website — no login, no dashboard, just natural language. + Change headlines, update hours, add events, swap photos, and more.

@@ -24,10 +24,13 @@ const { siteContext } = loadSiteData();
-

Sign Up for Text Notifications

-
+

Enable Text-to-Edit

+

+ Enter the phone number you want to use to manage {siteContext.businessName}. +

+
- + - We'll send a confirmation text to verify your number. + We'll send a confirmation text to verify this number.
@@ -54,25 +57,24 @@ const { siteContext } = loadSiteData(); - I consent to receive text messages from {siteContext.businessName} - about website updates, events, and announcements. - Message frequency varies. Message and data rates may apply. - Reply STOP to opt out at any time. + I am the owner or authorized manager of {siteContext.businessName} + and I consent to receive text messages that allow me to edit this website. + Message and data rates may apply.
- +
@@ -80,64 +82,77 @@ const { siteContext } = loadSiteData();
-

What You'll Receive

+

What You Can Do

+
+ ✏️ +

Edit Content

+

"Change the headline to Summer Sale" or "Update our hours to 8am–6pm"

+
📅 -

New Events

-

Be the first to know about upcoming community events, tastings, and workshops.

+

Add Events

+

"Add a workshop on May 15 at 2pm" or "Cancel the April webinar"

- -

Menu Updates

-

Get notified when we add new seasonal drinks or specialty items to the menu.

+ 🖼️ +

Swap Photos

+

Text a photo to replace the hero image or add it to the gallery.

- 🏷️ -

Special Offers

-

Receive exclusive promotions and limited-time offers for subscribers.

-
-
- 🔔 -

Website Changes

-

Stay informed when we update our hours, location details, or services.

+ 🎨 +

Update Style

+

"Change our primary color to teal" or "Make the font bigger"

+
+
+

How It Works

+
    +
  1. Text your edit. Send a natural language message describing what you want changed.
  2. +
  3. Review the proposal. You'll get a text back showing exactly what will change.
  4. +
  5. Reply YES. The edit is applied to your site instantly — no deploy needed.
  6. +
+

+ Every edit is validated, backed up, and reversible. Your site stays safe even if you mistype. +

+
+
+

Common Questions

- How often will I receive messages? + Who can edit the website?

- Message frequency varies based on website updates and events — typically 2-4 messages per month. - We respect your time and only send messages that matter. + Only the phone number you register here can send edit commands. + You can update or transfer ownership at any time from the visual editor.

Is there a cost?

- Message and data rates may apply depending on your wireless carrier plan. - Standard text messaging rates from your provider will apply. + Standard text messaging rates from your wireless carrier apply. + There is no additional charge from {siteContext.businessName} for using text-to-edit.

- How do I stop receiving messages? + How do I stop using text-to-edit?

- Reply STOP to any message at any time to opt out. - You'll receive a confirmation, and no further messages will be sent. - Reply START to resubscribe. + Reply STOP to any message to pause edits. + Reply START to resume. + You can also disable text-to-edit entirely from the editor.

- Is my phone number shared? + What if I make a mistake?

- No. Your phone number is used solely by {siteContext.businessName} for the purposes - you consented to. We do not sell or share your information with third parties. - See our Privacy Policy for full details. + Every change is backed up automatically. Reply UNDO to revert the last edit, + or visit the visual editor to review and restore any previous version.

@@ -186,9 +201,16 @@ const { siteContext } = loadSiteData(); font-family: var(--font-display); font-size: 1.3rem; color: var(--color-primary-dark); - margin-bottom: 1.25rem; + margin-bottom: 0.5rem; text-align: center; } + .form-subtitle { + text-align: center; + font-size: 0.9rem; + color: var(--color-text-muted); + margin-bottom: 1.5rem; + line-height: 1.5; + } .form-group { margin-bottom: 1.25rem; @@ -329,6 +351,41 @@ const { siteContext } = loadSiteData(); line-height: 1.5; } + .how-it-works { + padding: 3rem 1.5rem; + border-top: 1px solid var(--color-border); + } + .how-it-works h2 { + font-family: var(--font-display); + font-size: 1.6rem; + color: var(--color-primary-dark); + text-align: center; + margin-bottom: 2rem; + } + .steps-list { + max-width: 560px; + margin: 0 auto 1.5rem; + padding-left: 1.25rem; + display: flex; + flex-direction: column; + gap: 1rem; + } + .steps-list li { + font-size: 0.95rem; + color: var(--color-text); + line-height: 1.6; + } + .steps-list li strong { + color: var(--color-primary-dark); + } + .steps-note { + text-align: center; + font-size: 0.85rem; + color: var(--color-text-muted); + max-width: 480px; + margin: 0 auto; + } + .faq-section { padding: 3rem 1.5rem; } @@ -397,7 +454,7 @@ const { siteContext } = loadSiteData(); const formData = new FormData(form); try { - const response = await fetch('/api/sms/subscribe', { + const response = await fetch('/api/sms/register-owner', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ @@ -411,7 +468,7 @@ const { siteContext } = loadSiteData(); form.style.display = 'none'; successMsg.style.display = 'block'; } else { - throw new Error('Subscription failed'); + throw new Error('Registration failed'); } } catch { errorMsg.style.display = 'block';