embed player scaffold

This commit is contained in:
2026-01-17 01:32:31 +02:00
parent bf85894093
commit 7855100fdd
2 changed files with 19 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
declare module 'canvas-confetti';
+18
View File
@@ -0,0 +1,18 @@
import { createRoot } from 'react-dom/client'
import './index.css'
import EmbedPlayer from './components/EmbedPlayer'
const root = document.getElementById('root')
if (root) {
const puzzleId = root.dataset.puzzleId || ''
const theme = root.dataset.theme || ''
const showTimer = root.dataset.timer !== 'false'
const showHints = root.dataset.hints !== 'false'
if (theme === 'dark') document.documentElement.setAttribute('data-theme', 'dark')
else if (theme === 'light') document.documentElement.setAttribute('data-theme', 'light')
createRoot(root).render(
<EmbedPlayer puzzleId={puzzleId} showTimer={showTimer} showHints={showHints} />
)
}