Skip to content

Commit

Permalink
refactor: add dictionary article
Browse files Browse the repository at this point in the history
  • Loading branch information
altrusl committed May 27, 2024
1 parent 5e263e0 commit 1265df3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/LemmaDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function playAudio() {
margin: 5px 0;
color: var(--vwa-c-text-3);
transition: all 0.3s ease;
&.pr {
&.pron {
cursor: pointer;
&:hover {
color: var(--vwa-c-brand-2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ watch(() => props.dict, async () => {
</script>

<template>
<div>
<article>
<h2>{{ title }}</h2>
<article v-if="props.sn" class="dict" v-html="data" />
</div>
<div v-if="props.sn" class="dict" v-html="data" />
</article>
</template>

<style scoped>
article {
color: var(--vwa-c-text-2);
}
</style>
10 changes: 5 additions & 5 deletions src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import LemmaView from "@/views/LemmaView.vue";
// import LemmaDescription from "@/components/LemmaDescription.vue";
import AboutView from "@/views/AboutView.vue";
import LemmaOccurrences from "@/components/LemmaOccurrences.vue";
import DictionaryArticle from "@/components/DictionaryArticle.vue";
import LemmaDictionaryArticle from "@/components/LemmaDictionaryArticle.vue";
// import ContactsView from "@/views/ContactsView.vue";

const routes: RouteRecordRaw[] = [
Expand Down Expand Up @@ -36,15 +36,15 @@ const routes: RouteRecordRaw[] = [
{
name: "lemma-bdb-dict",
path: "bdb",
props: route => ({ sn: route.params.sn, dict: "bdb" }),
component: DictionaryArticle,
props: (route) => ({ sn: route.params.sn, dict: "bdb" }),
component: LemmaDictionaryArticle,
},
{
name: "lemma-gesenius-dict",
path: "gesenius",
// props: true,
props: route => ({ sn: route.params.sn, dict: "gesenius" }),
component: DictionaryArticle,
props: (route) => ({ sn: route.params.sn, dict: "gesenius" }),
component: LemmaDictionaryArticle,
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion src/services/api/bible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bible = {
`http://192.168.1.101/api/verse/?
bookId=${bookId}&chapterId=${chapterId}&verseId=${verseId}`,
);
console.debug("loaded verse:", data);
// console.debug("loaded verse:", data);

// const data = await response.text();
return data;
Expand Down

0 comments on commit 1265df3

Please sign in to comment.