Skip to content

Commit

Permalink
Add quran by verse in both html and api
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Jan 27, 2025
1 parent 78b8bf6 commit e85cb8e
Show file tree
Hide file tree
Showing 10 changed files with 90,678 additions and 36 deletions.
19 changes: 17 additions & 2 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var Endpoints = []*Endpoint{
Description: "Returns the entire Quran",
},
{
Name: "Quran | Chapter",
Name: "Quran by Chapter",
Path: "/api/quran/{chapter}",
Params: nil,
Description: "Returns a chapter of the quran",
Expand All @@ -49,6 +49,21 @@ var Endpoints = []*Endpoint{
},
}},
},
{
Name: "Quran by Verse",
Path: "/api/quran/{chapter}/{verse}",
Params: nil,
Description: "Returns a verse of the quran",
Response: []*Value{{
Type: "JSON",
Params: []*Param{
{Name: "chapter", Value: "int", Description: "Chapter of the verse"},
{Name: "number", Value: "int", Description: "Number of the verse"},
{Name: "text", Value: "string", Description: "Text of the verse"},
{Name: "arabic", Value: "string", Description: "Arabic text of the verse"},
},
}},
},
{
Name: "Hadith",
Path: "/api/hadith",
Expand All @@ -57,7 +72,7 @@ var Endpoints = []*Endpoint{
Description: "Returns the entire Hadith",
},
{
Name: "Hadith | Book",
Name: "Hadith by Book",
Path: "/api/hadith/{book}",
Params: nil,
Description: "Returns a book from the hadith",
Expand Down
40 changes: 34 additions & 6 deletions html/files/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
padding: 5px;
border-radius: 5px;
}
.dots {
font-size: 1.5em;
text-align: center;
margin-bottom: 25px;
padding: 25px;
}
@media only screen and (max-width: 600px) {
#head a { margin-right: 5px; }
}
Expand Down Expand Up @@ -74,7 +80,7 @@ <h4 id="response">Response</h4>

<p></p>

<h2 id="quran-chapter">Quran | Chapter</h2>
<h2 id="quran-by-chapter">Quran by Chapter</h2>

<hr>

Expand All @@ -96,6 +102,28 @@ <h4 id="response-1">Response</h4>

<p></p>

<h2 id="quran-by-verse">Quran by Verse</h2>

<hr>

<p></p>

<p>Returns a verse of the quran</p>

<p>URL: <a href="/api/quran/{chapter}/{verse}"><code>/api/quran/{chapter}/{verse}</code></a></p>

<h4 id="response-2">Response</h4>

<p>Format <code>JSON</code></p>

<ul>
<li><code>number</code> - <strong><code>int</code></strong> - Number of the verse</li>
<li><code>text</code> - <strong><code>string</code></strong> - Text of the verse</li>
<li><code>arabic</code> - <strong><code>string</code></strong> - Arabic text of the verse</li>
</ul>

<p></p>

<h2 id="hadith">Hadith</h2>

<hr>
Expand All @@ -106,13 +134,13 @@ <h2 id="hadith">Hadith</h2>

<p>URL: <a href="/api/hadith"><code>/api/hadith</code></a></p>

<h4 id="response-2">Response</h4>
<h4 id="response-3">Response</h4>

<p>Format <code>JSON</code></p>

<p></p>

<h2 id="hadith-book">Hadith | Book</h2>
<h2 id="hadith-by-book">Hadith by Book</h2>

<hr>

Expand All @@ -122,7 +150,7 @@ <h2 id="hadith-book">Hadith | Book</h2>

<p>URL: <a href="/api/hadith/{book}"><code>/api/hadith/{book}</code></a></p>

<h4 id="response-3">Response</h4>
<h4 id="response-4">Response</h4>

<p>Format <code>JSON</code></p>

Expand All @@ -143,7 +171,7 @@ <h2 id="names">Names</h2>

<p>URL: <a href="/api/names"><code>/api/names</code></a></p>

<h4 id="response-4">Response</h4>
<h4 id="response-5">Response</h4>

<p>Format <code>JSON</code></p>

Expand All @@ -169,7 +197,7 @@ <h4 id="request">Request</h4>

<p></p>

<h4 id="response-5">Response</h4>
<h4 id="response-6">Response</h4>

<p>Format <code>JSON</code></p>

Expand Down
44,577 changes: 44,577 additions & 0 deletions html/files/hadith.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion html/files/hadith.json

Large diffs are not rendered by default.

50 changes: 29 additions & 21 deletions html/files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
padding: 5px;
border-radius: 5px;
}
.dots {
font-size: 1.5em;
text-align: center;
margin-bottom: 25px;
padding: 25px;
}
@media only screen and (max-width: 600px) {
#head a { margin-right: 5px; }
}
Expand All @@ -56,54 +62,56 @@
</div>
<div id="content"><h1 id="what-is-the-reminder">What is the Reminder?</h1>

<p>The Reminder refers to the messages and revelations from Allah, particularly the Quran, which serve as guidance, warnings, and lessons for humanity to reflect upon and adhere to in order to live a righteous life. It emphasizes remembrance of Allah, moral conduct, and awareness of the consequences of one&rsquo;s actions.</p>
<p>The Reminder refers to the Quran, which is a divine revelation intended to provide guidance, instructions, and reminders to humanity about faith, morality, and the existence of Allah. It serves as a warning, a source of wisdom, and a guide for those who seek to live in accordance with divine teachings.</p>

<h1 id="what-is-the-quran">What is the Quran?</h1>

<p>The Quran is the holy book of Islam, believed to be the word of Allah as revealed to the Prophet Muhammad through the Angel Gabriel. It serves as a guide for personal conduct, worship, and law, and is regarded as a source of spiritual wisdom and knowledge. The Quran is written in Arabic and consists of various chapters (Surahs) that address a range of topics and issues relevant to faith and life.</p>
<p>The Quran is the holy book of Islam, believed to be the word of Allah (God) as revealed to the Prophet Muhammad through the angel Gabriel. It serves as a guide for personal conduct and spiritual guidance, containing teachings, laws, and narratives. The Quran is written in Arabic and is regarded as a complete and final revelation to humanity.</p>

<h1 id="what-is-the-hadith">What is the Hadith?</h1>

<p>A Hadith is a recorded saying, action, or approval of the Prophet Muhammad (peace be upon him). It serves as a source of guidance for Muslims, along with the Quran, on matters of faith, law, and morality. Each Hadith often has a chain of narrators that verifies its authenticity.</p>
<p>A Hadith is a record of the sayings, actions, and approvals of the Prophet Muhammad. It serves as a guide for Islamic beliefs, practices, and laws, complementing the teachings of the Quran. Hadith collections are essential for understanding the Sunnah, the traditional practices of the Prophet.</p>

<h1 id="who-is-allah">Who is Allah?</h1>

<p>Allah is the one true God in Islam, the Creator of all things. He is all-knowing, all-powerful, and merciful. Allah is described as the Sustainer and Maintainer of the universe, with no partners or rivals, and is worthy of worship alone.</p>
<p>Allah is the one and only God in Islam. He is the Creator of all things, the Supreme Being, and is characterized as the Most Compassionate, Most Merciful, All-Knowing, and All-Wise. Allah is considered to have no partners or equals and is the Sustainer of everything in the heavens and the earth. Worship is due to Him alone.</p>

<h1 id="who-is-the-prophet-muhammad">Who is the prophet Muhammad</h1>

<p>Prophet Muhammad is the last messenger of Allah in Islam, known as the Prophet who conveyed the final revelation, the Quran. He was born in Mecca around 570 CE and is revered for his teachings and exemplary character. Muhammad is considered both a prophet and a messenger, playing a crucial role in the spread of Islam and guiding humanity towards the worship of one God. His life and teachings are documented in the Hadith literature, which complement the Quran.</p>
<p>Prophet Muhammad is the last messenger of Allah in Islam, known as the Seal of the Prophets. Born in Mecca around 570 CE, he received divine revelation that forms the basis of the Quran. He is revered for his exemplary character, leadership, and teachings, promoting a message of monotheism, compassion, and justice. His life and sayings, known as Hadith, continue to guide millions of Muslims worldwide.</p>

<h1 id="why-do-we-worship-allah">Why do we &lsquo;worship&rsquo; Allah?</h1>

<p>We worship Allah because He is the Creator and Sustainer of everything, deserving of our gratitude and devotion. Worship is a way to express our love, reverence, and obedience to Him, recognizing His mercy, wisdom, and power. It helps us cultivate a connection with Him, guiding us in our lives and actions.</p>
<p>We worship Allah because He is the Creator and Sustainer of all things, deserving of reverence, gratitude, and devotion. Worshiping Allah helps us to acknowledge His greatness, seek His guidance, and cultivate a deeper connection with Him, leading to a fulfilling spiritual life. Additionally, worship is a means of obedience to His commands and an expression of our faith and appreciation for His blessings.</p>

<h1 id="how-do-we-worship-allah">How do we &lsquo;worship&rsquo; Allah?</h1>

<p>Worshiping Allah involves sincere devotion, which includes prayer, supplication, gratitude, and following His commandments. Key acts of worship include:</p>

<ol>
<li><strong>Prayer (Salah)</strong>: Performing the five daily prayers.</li>
<li><strong>Recitation of the Quran</strong>: Reading and reflecting on the Quran.</li>
<li><strong>Zakat</strong>: Giving charity to those in need.</li>
<li><strong>Fasting</strong>: Observing the fast during the month of Ramadan.</li>
<li><strong>Invocation (Dua)</strong>: Making personal supplications and prayers.</li>
<li><strong>Acknowledging His oneness</strong>: Believing in and proclaiming that there is no deity worthy of worship except Allah.</li>
</ol>

<p>Worship is expressed through both actions and intentions, aiming to please Allah in all aspects of life.</p>
<p>Worshiping Allah involves sincere devotion and obedience to Him. This includes performing the five obligatory prayers, reciting the Quran, practicing good deeds, and following the teachings of Prophet Muhammad. It also encompasses being grateful, maintaining honesty, kindness to others, and striving for righteousness in all aspects of life. Ultimately, worship should be done solely for Allah, with nothing associated alongside Him.</p>

<h1 id="what-happens-when-we-die">What happens when we die?</h1>

<p>When we die, our souls are taken by the Angel of Death. We enter a different state of existence where we will eventually be resurrected on the Day of Judgment. Our deeds and actions during life will be reviewed, determining our fate in the Hereafter, either in Paradise or Hell.</p>
<p>When we die, our souls are taken by the Angel of Death, and we return to our Lord for judgment. Everyone will be resurrected on the Day of Judgment, where our deeds will be assessed, and we will face the consequences of our actions. Believers may enter Paradise, while disbelievers may face punishment.</p>

<h1 id="how-do-i-remember-allah">How do I remember Allah?</h1>

<p>You can remember Allah by engaging in regular prayer, reciting the Quran, making dhikr (remembrance) through phrases like &ldquo;Subhanallah&rdquo; (Glory be to Allah), &ldquo;Alhamdulillah&rdquo; (Praise be to Allah), and &ldquo;Allahu Akbar&rdquo; (Allah is the Greatest). Reflect on His creations, express gratitude, and maintain mindfulness of His presence in your daily life. Frequent invocation and gratitude help strengthen your connection with Allah.</p>
<p>To remember Allah, you can engage in practices such as:</p>

<ol>
<li><strong>Regular Prayer</strong>: Establish your daily prayers and focus on your connection with Allah during these times.</li>
<li><strong>Recitation of the Quran</strong>: Read and reflect on the verses of the Quran.</li>
<li><strong>Dhikr (Remembrance)</strong>: Use specific phrases like &ldquo;SubhanAllah,&rdquo; &ldquo;Alhamdulillah,&rdquo; and &ldquo;Allahu Akbar&rdquo; in your daily life.</li>
<li><strong>Reflect on Creation</strong>: Contemplate the wonders of the universe and your own existence.</li>
<li><strong>Gratitude</strong>: Acknowledge Allah&rsquo;s blessings in your life and express gratitude regularly.</li>
<li><strong>Seek Knowledge</strong>: Learn about Islamic teachings and the names of Allah to deepen your understanding and connection with Him.</li>
</ol>

<p>Engaging in these practices can enhance your mindfulness and remembrance of Allah throughout your daily life.</p>

<h1 id="how-do-i-become-muslim">How do I become Muslim?</h1>

<p>To become a Muslim, one must sincerely declare the Shahada, which is the testimony of faith. This involves saying, &ldquo;Ashhadu an la ilaha illallah, wa ashhadu anna Muhammadur Rasulullah,&rdquo; meaning &ldquo;I bear witness that there is no deity but Allah, and Muhammad is His Messenger.&rdquo; It is also important to understand the basic teachings of Islam, perform the five daily prayers, observe fasting during Ramadan, give Zakat (almsgiving), and strive to live according to the principles of Islam. It is recommended to seek guidance from knowledgeable Muslims or local Islamic centers.</p>
<p>To become a Muslim, you need to sincerely declare your faith in the oneness of Allah and the prophethood of Muhammad. This declaration is known as the Shahada. You can say: &ldquo;Ashhadu an la ilaha illallah, wa ashhadu anna Muhammadur Rasulullah,&rdquo; which means &ldquo;I bear witness that there is no deity but Allah, and Muhammad is His Messenger.&rdquo;</p>

<p>Following the declaration, it&rsquo;s recommended to learn about the pillars of Islam, which include performing the five daily prayers (Salah), giving to charity (Zakat), fasting during Ramadan, and if possible, performing the pilgrimage to Mecca (Hajj). Additionally, it&rsquo;s helpful to connect with a local Muslim community for support and guidance.</p>
</div>
</div>
</body>
Expand Down
Loading

0 comments on commit e85cb8e

Please sign in to comment.