embed player scaffold
This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
declare module 'canvas-confetti';
|
||||||
@@ -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} />
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user