Skip to content

Commit

Permalink
change seperator
Browse files Browse the repository at this point in the history
  • Loading branch information
peace2074 committed Jan 22, 2025
1 parent c7a3f49 commit 4838596
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 32 deletions.
4 changes: 4 additions & 0 deletions app/assets/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ body {

.ltr {
direction: ltr !important;
}

.h-50 {
height: 3rem;
}
27 changes: 27 additions & 0 deletions app/components/Fahras.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<script lang="ts" setup>
import { useRouter, useNuxtApp } from "nuxt/app"
import { ref } from "vue"
type ONET = {
Index: number | string,
Name: string,
Location: string,
TotalVerses: number,
Verses: string[],
}
const nuxtApp = useNuxtApp()
const Quran: ONET[] = nuxtApp.payload.data['B6H5jvHlMH'].data
const names = ref(Quran).value.map(v => ({ names: v.Name }))
const router = useRouter()
function navToLok(lok: number) {
const advonced = lok + 1 || 1
router.push(`/quran/${advonced}`)
}
</script>
<template>
<ol class="column q-mt-xl q-pt-lg">
<nuxt-link class="cursor-pointer" v-for="(i, ind) in names" :key="i.names"
@click="navToLok(ind)">{{ ind + 1 }}-{{ i.names }}
</nuxt-link>
</ol>
</template>
26 changes: 5 additions & 21 deletions app/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
<script lang="ts" setup>
type ONET = {
Index: number | string,
Name: string,
Location: string,
TotalVerses: number,
Verses: string[],
}
import { useNuxtApp, useRouter } from 'nuxt/app';
import { useNuxtApp } from 'nuxt/app';
import { useQuasar } from 'quasar';
import { ref } from 'vue';
import { appName } from '../constants/global';
const nuxtApp = useNuxtApp()
const Quran: ONET[] = nuxtApp.payload.data['B6H5jvHlMH'].data
const names = ref(Quran).value.map(v => ({ names: v.Name }))
const router = useRouter()
const $q = useQuasar()
const offset = ref([0, 18])
Expand All @@ -25,10 +16,7 @@ function toggleDark() {
toggle()
return $q.dark.mode
}
function navToLok(lok: number) {
const advonced = lok + 1 || 1
router.push(`/quran/${advonced}`)
}
</script>

<template>
Expand All @@ -44,11 +32,7 @@ function navToLok(lok: number) {
</q-header>

<q-drawer persistent min-width="200" v-model="drawerLeft" elevated side="left" bordered>
<ol class="column q-mt-xl q-pt-lg">
<nuxt-link class="cursor-pointer" v-for="(i, ind) in names" :key="i.names"
@click="navToLok(ind)">{{ ind + 1 }}-{{ i.names }}
</nuxt-link>
</ol>
<fahras />
</q-drawer>

<q-page-container>
Expand Down
23 changes: 13 additions & 10 deletions app/pages/quran/[...lok].vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@ watchEffect(() => {
const nuxtApp = useNuxtApp()
const Quran: ONET[] = nuxtApp.payload.data['B6H5jvHlMH'].data
const sura = computed(() => Quran[lok.value - 1])
const sura = computed(() => Quran[lok.value - 1] as unknown as number)
const Verses = computed(() => sura.value.Verses)
const cleanText = computed(() => JSON.stringify(Verses.value).replaceAll(',', '🎗'))
const cleanText = computed(() => JSON.stringify(Verses.value).replaceAll(',', ''))
</script>
<template>
<QPage padding class=" rtl">
<div class="q-mt-xl q-gutter-md">
<q-card>
<q-card-section class="flex">
<div class="q-mt-md q-gutter-md">
<q-card class="text-sm">
<q-card-section class="flex h-50">
<div>

<h1 class="text-h3">{{ sura.Name }}</h1>
<h4 class="text-h3">{{ sura.Name }}</h4>
</div>
<div>
<h4>{{ sura.TotalVerses }}</h4>
<h5>{{ sura.Location }}</h5>
<h4 class="capitalize">{{ sura.TotalVerses }}</h4>
<h4 class="capitalize text-h6">{{ sura.Location }}</h4>
</div>

</q-card-section>
</q-card>
<q-card class="q-mt-xs">
<q-card-section>
<p class="block just fit verse"> {{ cleanText }}</p>
<p class="capitalize block just fit verse"> {{ cleanText }}</p>
</q-card-section>
</q-card>
</div>
Expand All @@ -65,6 +65,9 @@ const cleanText = computed(() => JSON.stringify(Verses.value).replaceAll(',', '
font-size: larger;
}
.capitalize::first-letter {
text-transform: uppercase;
}
.rtl {
direction: rtl;
Expand All @@ -83,6 +86,6 @@ const cleanText = computed(() => JSON.stringify(Verses.value).replaceAll(',', '
}
.verse::after {
content: '🎗';
content: '';
}
</style>
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"compilerOptions": {
"module": "system",
"target": "ES3",
"lib": [
"ESNext"
],
"target": "es2021",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
Expand Down

0 comments on commit 4838596

Please sign in to comment.