Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AuthorBot Widget</title> | |
| <style> | |
| body { | |
| margin: 0; min-height: 100vh; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; | |
| background: linear-gradient(135deg, #0d0f1a, #13161f); color: #94a3b8; | |
| display: flex; align-items: center; justify-content: center; padding: 24px; | |
| } | |
| .card { max-width: 520px; text-align: center; } | |
| h1 { color: #e2e8f0; margin-bottom: 8px; } | |
| p { line-height: 1.6; } | |
| .warn { color: #fcd34d; margin-top: 16px; font-size: 14px; } | |
| code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="card"> | |
| <h1>AuthorBot Widget</h1> | |
| <p>Chat bubble is in the bottom-right corner. Use <code>?token=YOUR_TOKEN</code> in the URL if needed.</p> | |
| <p id="warn" class="warn" style="display:none">Missing token — add <code>?token=...</code> to the URL.</p> | |
| </div> | |
| <script> | |
| const params = new URLSearchParams(window.location.search); | |
| const token = params.get('token') || ''; | |
| if (!token) document.getElementById('warn').style.display = 'block'; | |
| window.AuthorBotConfig = { | |
| token: token, | |
| slug: params.get('slug') || '', | |
| theme: params.get('theme') || 'midnight', | |
| position: params.get('position') || 'bottom-right', | |
| autoOpenDelay: Number(params.get('autoOpen') || 1), | |
| apiBase: window.location.origin + '/api', | |
| }; | |
| </script> | |
| <script src="/static/widget.js" defer></script> | |
| </body> | |
| </html> | |