forked from Awesome-Of-the-Internet/quran
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73b25a2
commit 5ec7efe
Showing
13 changed files
with
72 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
export interface Props { | ||
count: number | ||
} | ||
const {count=3} = Astro.props | ||
--- | ||
<button> | ||
Remaining itterations: | ||
<span class="btnCount">{count}</span> | ||
</button> | ||
|
||
<script> | ||
const countEl = document.querySelector(".btnCount") as HTMLElement | ||
const getCount = () => +countEl.innerText | ||
const setCount = (n: number|string) => countEl.innerText = `${n}` | ||
const btn = document.querySelector('button') as HTMLElement | ||
|
||
btn.onclick = () => { | ||
const count = getCount() | ||
count > 0 && setCount(count - 1) | ||
if (count <=0) | ||
btn.classList.add('done') | ||
} | ||
|
||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
--- | ||
import Base from "@/layouts/base.astro"; | ||
import azkar from "@/data/zikr.json"; | ||
import RepetitionBtn from "@/components/zkr-btn.astro"; | ||
--- | ||
<Base > <section class="morning"> | ||
<div class="container text-center mt-5"> | ||
<div class="text"> | ||
<h1 class="mb-4">Evening Azkar</h1> | ||
<p class="h4">There are 30 Zikr</p> | ||
</div> | ||
<div id="row-evening"> | ||
{azkar.slice(31, 60+1).map(zikr => { | ||
let {count} = zikr | ||
const getCount = () => count | ||
return ( | ||
<div class="item"> | ||
|
||
<p class="text-start h5 m-2" style="border-bottom: 1px solid rgba(0,0,0,.125);"> | ||
Repetiton: {zikr.count.toLocaleString()} | ||
</p> | ||
|
||
<p class="zekr">{zikr.zekr}</p> | ||
<Base title="Evening Adhkar" > | ||
<section class="morning"> | ||
<div class="container text-center mt-5"> | ||
<div class="text"> | ||
<h1 class="mb-4">Evening Azkar</h1> | ||
<p class="h4">There are 30 Zikr</p> | ||
</div> | ||
<div id="row-evening"> | ||
{azkar.slice(31, 60+1).map(zikr =>( | ||
<div class="item"> | ||
|
||
<p class="text-start h5 m-2" style="border-bottom: 1px solid rgba(0,0,0,.125);"> | ||
Repetiton: {zikr.count.toLocaleString()} | ||
</p> | ||
|
||
<p class="zekr">{zikr.zekr}</p> | ||
|
||
<button onclick="count>0 ? count--:this.classList.add('done')"> | ||
Remaining itterations: | ||
<span class="btnCount">{+getCount().toLocaleString() ||"done"}</span> | ||
</button> | ||
<RepetitionBtn count={+zikr.count} /> | ||
|
||
<p class="text-start h5 m-2" style="border-top: 1px solid rgba(0,0,0,.125);">{zikr.reference}</p> | ||
<p class="text-start h5 m-2" style="border-top: 1px solid rgba(0,0,0,.125);">{zikr.reference}</p> | ||
|
||
</div> | ||
)})} | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</section></Base> | ||
</div> | ||
</section> | ||
</Base> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters