Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
wansaleh committed Dec 31, 2021
1 parent 43b6a3b commit df12015
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 17 deletions.
15 changes: 15 additions & 0 deletions _hadiths/40-snippets/syurga-dibawah-telapak-kaki-ibu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Syurga Di Bawah Telapak Kaki Ibu
narrators:
- Anas bin Malik
topics:
- Keluarga
- Ibu Bapa
- Syurga
---

<p lang="ar">
الْجَنَّةُ تَحْتَ أقْدامِ الأُمَّهَاتِ
</p>

Syurga itu berada di bawah telapak kaki ibu.
14 changes: 14 additions & 0 deletions _hadiths/40-snippets/ucapan-salam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Ucapan Salam
narrators:
- Bukhari
topics:
- Kemanusiaan
- Salam
---

<p lang="ar">
الَسَّلامُ قَبْلَ الكَلاَمِ
</p>

Ucaplah salam sebelum bicara.
10 changes: 10 additions & 0 deletions _hadiths/51-shorts/menyeru-kepada-hidayah.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
number: 36
title: Menyeru Kepada Hidayah
narrators:
- Muslim
topics:
- Dakwah
---

Barangsiapa yang menyeru kepada petunjuk, maka dia akan mendapat pahala seperti orang yang mengikutinya tanpa kurang dari keduanya. Sesiapa yang menyeru kepada kesesatan, maka dia akan mendapat dosa seperti orang yang mengikutinya tanpa kurang salah satu daripada mereka.

This file was deleted.

22 changes: 15 additions & 7 deletions src/components/home/HadithCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,26 @@ export default function HadithCard({ hadith }: { hadith: Hadith }) {
{hadith.title}
</h2>

<ReactMarkdown
rehypePlugins={[rehypeRaw]}
remarkPlugins={[remarkSmartypants]}
<div
data-word-count={wordCount}
className={clsx(
'prose prose-lg dark:prose-invert leading-normal font-light',
wordCount < 20 && 'text-2xl',
wordCount < 10 && 'text-3xl',
wordCount >= 10 && wordCount < 20 && 'text-2xl',
wordCount >= 20 && wordCount < 30 && 'text-xl',
wordCount > 70 && 'text-sm'
wordCount >= 30 && wordCount < 50 && 'text-base',
wordCount >= 50 && wordCount < 70 && 'text-base',
wordCount >= 70 && 'text-sm'
)}
>
{hadith.content}
</ReactMarkdown>
<ReactMarkdown
rehypePlugins={[rehypeRaw]}
remarkPlugins={[remarkSmartypants]}
data-wordCount={wordCount}
>
{hadith.content}
</ReactMarkdown>
</div>

<div className="flex-1" />

Expand Down

1 comment on commit df12015

@vercel
Copy link

@vercel vercel bot commented on df12015 Dec 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.