fix: widget embed — full-width support + one-liner script tags via hosted loader
- Standalone page: ?width=full removes max-w-lg container constraint - iframeSnippet: passes &width=full to URL when 100% width selected - public/widget-loader.js: hosted script, reads data-* attrs, no inline code needed - data-mode="floating" → styled FAB button bottom-right - data-mode="trigger" → listens for .hotelsync-book class clicks - Proper modal with close button and backdrop click - Code tab snippets for floating/trigger are now single <script src> lines Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -74,9 +74,11 @@ export function BookingWidgetStandalonePage() {
|
||||
.catch(() => {})
|
||||
}, [slug])
|
||||
|
||||
const isFullWidth = searchParams.get('width') === 'full'
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-slate-50 flex items-start justify-center py-6 px-3">
|
||||
<div className="w-full max-w-lg">
|
||||
<div className={isFullWidth ? 'min-h-screen bg-slate-50' : 'min-h-screen bg-slate-50 flex items-start justify-center py-6 px-3'}>
|
||||
<div className={isFullWidth ? 'w-full' : 'w-full max-w-lg'}>
|
||||
<WidgetPreview
|
||||
settings={settings}
|
||||
slug={slug}
|
||||
|
||||
Reference in New Issue
Block a user