diff --git a/docs/.vitepress/theme/components/AudioButton.vue b/docs/.vitepress/theme/components/AudioButton.vue
index 4cf926b..d2bf37a 100644
--- a/docs/.vitepress/theme/components/AudioButton.vue
+++ b/docs/.vitepress/theme/components/AudioButton.vue
@@ -7,6 +7,7 @@
diff --git a/docs/.vitepress/theme/components/TTS.vue b/docs/.vitepress/theme/components/TTS.vue
index 84f43d2..f6dba37 100644
--- a/docs/.vitepress/theme/components/TTS.vue
+++ b/docs/.vitepress/theme/components/TTS.vue
@@ -30,6 +30,10 @@ async function playAudio() {
const voices = await getVoices(lang);
if (!voices.length) return;
+ document.querySelectorAll("audio").forEach((el) => {
+ el.pause();
+ });
+
const v = voices[Math.floor(Math.random() * voices.length)];
console.log(JSON.stringify(v));
await speak({
diff --git a/docs/.vitepress/theme/components/VocabQuiz.vue b/docs/.vitepress/theme/components/VocabQuiz.vue
index 6209152..269675b 100644
--- a/docs/.vitepress/theme/components/VocabQuiz.vue
+++ b/docs/.vitepress/theme/components/VocabQuiz.vue
@@ -25,7 +25,7 @@
{{ v.en }}
-
+
{{ example.ko }}
@@ -69,6 +69,7 @@ const vList = ref([]);
const vIndex = ref(0);
const vSentAutoplayAudio = ref(true);
+const sentenceDetails = useTemplateRef("sdetails");
const stts = useTemplateRef>("stts");
const v = computed(() => vList.value[vIndex.value]);
@@ -99,6 +100,12 @@ vChosenCats.value = [...vCats.value];
makeVList();
function makeVList() {
+ nextTick(() => {
+ if (sentenceDetails.value) {
+ sentenceDetails.value.open = false;
+ }
+ });
+
vList.value = Object.entries(vocabulary)
.filter(([k]) => vChosenCats.value.includes(k))
.flatMap(([, v]) => v);
@@ -113,6 +120,12 @@ function makeVList() {
}
function mark(isRight: boolean) {
+ nextTick(() => {
+ if (sentenceDetails.value) {
+ sentenceDetails.value.open = false;
+ }
+ });
+
if (isRight) {
vList.value = [...vList.value.filter((_, i) => i !== vIndex.value)];
if (vList.value.length === 0) {