resolved how to run scripts in articles, added devbreak broadcasts

This commit is contained in:
2023-02-18 21:24:43 +01:00
parent 3640a5f13a
commit 1ffefddd60
10 changed files with 122 additions and 5 deletions

View File

@ -0,0 +1,11 @@
declare global {
interface Window {
onMountScripts?: Array<() => void>
}
}
export function runOnMountScripts() {
window.onMountScripts?.forEach((fn) => {
fn()
})
}

View File

@ -19,3 +19,9 @@ globalStyle(`${contentClass} img:only-child`, {
display: 'block',
margin: '0 auto',
})
globalStyle(`${contentClass} .video-embed`, {
margin: '0 auto',
maxWidth: vars.width.image,
aspectRatio: vars.aspectRatio.monitor,
})