fix: "card" class included bottombar

This commit is contained in:
Luc Mcgrady 2025-09-03 23:38:28 +01:00
parent 45793b3b64
commit 2e0a75ed83
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 6 additions and 4 deletions

View file

@ -2,9 +2,10 @@
import type { Writable } from "svelte/store";
export let html: Writable<string>
export let cardClass: Writable<string>
</script>
<div id="qa" class="card">
<div id="qa" class={$cardClass}>
{@html $html}
</div>

View file

@ -3,15 +3,16 @@ import { preloadAnswerImages } from "../../reviewer/images"
export function setupReviewer() {
const html = writable("")
const cardClass = writable("")
function showQuestion(q, a, bodyclass) {
function showQuestion(q, a, cc) {
html.set(q)
document.body.className = bodyclass
cardClass.set(cc)
preloadAnswerImages(a)
}
globalThis._showAnswer = html.set
globalThis._showQuestion = showQuestion
return {html}
return {html, cardClass}
}