Lovable Prompter — Local Service Landing Page
2) Content Sections
- Hero: H1 with [PRIMARY_KEYWORD], subhead with value prop, hero image (local scene), primary [CTA] + click-to-call on mobile.
- Services: 3–5 benefit bullets with icons.
- About Us: 2–3 sentences highlighting local expertise and trust.
- Testimonials: 2–3 quotes + star rating markup.
- Contact: form (name, email, phone, message) + phone link + service area map.
3) Technical & Performance
- Mobile-first CSS; optimize images (WebP), descriptive alt text including [LOCATION].
- Lazy-load media; target good Core Web Vitals (LCP < 2.5s).
- Semantic HTML; anchor-based nav for quick jumps.
4) Accessibility
- WCAG AA contrast; ARIA labels for forms and buttons.
## Source Content (optional)
### FAQs
${faqs.length ? faqs.map(s=>'- '+s).join('\\n') : '- (add 2–5 common buyer questions)'}
### Testimonials
${quotes.length ? quotes.map(s=>'- '+s).join('\\n') : '- “Great local service!” — Happy Customer'}
## Constraints
- <= 800 words main copy; web-safe fonts; consistent brand colors.
- Prefer locally relevant visuals over generic stock.
## Output
Produce a complete landing page: semantic HTML + scoped CSS + minimal JS (if needed).
Ensure all copy includes [PRIMARY_KEYWORD] early, and LSI terms naturally.
## Metadata to include
-
: ${primaryKeyword ? primaryKeyword + ' | ' : ''}${v.bizName || 'Your Brand'}
- : ${primaryKeyword ? 'Get fast, reliable ' + (v.service||'service') + ' in ' + (v.location||'your area') + '. ' : ''}Call ${v.phone || 'us today'} for ${v.cta || 'a free estimate'}.
## Notes
${v.notes || '(add any special requirements, integrations, or brand rules)'}
`;
output.value = prompt;
}
// VALIDATION
function validate(){
status('');
const svc = fields.service.value.trim();
const loc = fields.location.value.trim();
let ok = true, msgs = [];
if(!svc){ ok = false; msgs.push('Service is required.'); fields.service.focus(); }
if(!loc){ ok = false; msgs.push('Location is required.'); if(svc) fields.location.focus(); }
const phone = fields.phone.value.trim();
if (phone && !/^[+()0-9.\\-\\s]{7,}$/.test(phone)) { ok = false; msgs.push('Phone format looks invalid.'); }
if(ok) status('Looks good ✔', 'ok'); else status(msgs.join(' '), 'err');
return ok;
}
// Buttons
$('#togglePreview').addEventListener('click', () => {
previewCard.classList.toggle('show');
$('#togglePreview').textContent = previewCard.classList.contains('show') ? 'Hide Prompt' : 'Show Prompt';
if (previewCard.classList.contains('show')) buildPrompt();
});
$('#copyBtn').addEventListener('click', async () => {
buildPrompt();
try { await navigator.clipboard.writeText(output.value); status('Copied to clipboard', 'ok'); }
catch { status('Copy failed — use Download or select all + copy', 'warn'); }
});
$('#downloadBtn').addEventListener('click', () => {
buildPrompt();
const blob = new Blob([output.value], {type:'text/plain;charset=utf-8'});
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url; a.download = 'local-service-landing-prompt.txt';
document.body.appendChild(a); a.click(); a.remove();
URL.revokeObjectURL(url);
status('Downloaded .txt', 'ok');
});
$('#validateBtn').addEventListener('click', (e) => {
e.preventDefault();
buildPrompt();
validate();
});
$('#resetForm').addEventListener('click', () => {
form.reset();
buildPrompt();
status('Form reset', 'warn');
});
$('#loadExample').addEventListener('click', () => {
fields.service.value = 'HVAC Repair';
fields.location.value = 'Phoenix, AZ';
fields.primaryKeyword.value = 'HVAC Repair in Phoenix';
fields.brandTone.value = 'Friendly and professional';
fields.cta.value = 'Call Now for a Free Estimate';
fields.lsi.value = 'emergency repair, AC tune-up, furnace replacement, same-day service, maintenance plans';
fields.bizName.value = 'Desert Breeze HVAC';
fields.phone.value = '(602) 555-0130';
fields.address.value = '123 W Monroe St, Phoenix, AZ 85003';
fields.hours.value = 'Mon–Sat 7am–7pm';
fields.faqs.value = 'Q: Do you offer emergency service?\nA: Yes, 24/7 within city limits.\nQ: Do you service both AC and heating?\nA: We repair and install all major brands.';
fields.testimonials.value = '“Fast, honest, and affordable.” — Maria G.\n“Restored our AC in under an hour.” — Devon L.';
fields.notes.value = 'Use warm, neighborly language; emphasize same-day repairs; avoid technical jargon.';
buildPrompt();
status('Example loaded', 'ok');
});
// Live updates
Object.values(fields).forEach(el => el.addEventListener('input', buildPrompt));
// Initial render (preview hidden by default)
buildPrompt();