Skip to content

Commit

Permalink
Add page titles
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Feb 23, 2025
1 parent 39e880a commit 093365b
Show file tree
Hide file tree
Showing 12 changed files with 406 additions and 683 deletions.
9 changes: 6 additions & 3 deletions hadith/hadith.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"embed"
"encoding/json"
"fmt"
"strings"
)

//go:embed data/*.json
Expand Down Expand Up @@ -39,7 +40,7 @@ func (b *Book) JSON() []byte {
func (b *Book) HTML() string {
var data string

data += fmt.Sprintf(`<h1>%s</h1>`, b.Name)
data += fmt.Sprintf(`<h2>%s</h2>`, b.Name)
data += fmt.Sprintln()
data += fmt.Sprintln()

Expand All @@ -61,7 +62,7 @@ func (v *Volumes) TOC() string {
var data string

for id, book := range v.Books {
data += fmt.Sprintf(`<div class="chapter"><a href="/hadith/%d">%s</a></div>`, id+1, book.Name)
data += fmt.Sprintf(`<div class="chapter"><a href="/hadith/%d">%d: %s</a></div>`, id+1, id+1, book.Name)
}

return data
Expand Down Expand Up @@ -138,8 +139,10 @@ func Load() *Volumes {
for num, b := range d["books"].([]interface{}) {
bk := b.(map[string]interface{})

name := strings.Split(bk["name"].(string), ". ")[1]

book := &Book{
Name: bk["name"].(string),
Name: name,
Number: num + 1,
}

Expand Down
13 changes: 11 additions & 2 deletions html/files/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap" rel="stylesheet">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; font-family: "Nunito Sans", serif; }
a:visited { color:blue; }
#head { margin-bottom: 2.5em; }
a { color: #333333; }
a:visited { color: #333333;}
#head {
position: fixed;
background: white;
padding: 15px 0 15px 0;
top: 0;
width: 100%;
}
#head a { margin-right: 10px; color: black; font-weight: bold; text-decoration: none; }
#container { height: 100%; max-width: 1024px; margin: 0 auto; padding: 25px;}
#content { padding-bottom: 100px; }
#content p { padding: 0 0 25px 0; margin: 0; }
#title { margin-top: 50px; font-size: 1.2em; font-weight: bold; margin-bottom: 10px; }
li { margin-bottom: 5px; }
@font-face {
font-family: 'arabic';
Expand Down Expand Up @@ -63,6 +71,7 @@
<a href="/search">Search</a>
<button id="install" hidden>Install</button>
</div>
<div id="title">API</div>
<div id="content"><h1 id="endpoints">Endpoints</h1>

<p>A list of API endpoints</p>
Expand Down
199 changes: 104 additions & 95 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.

47 changes: 22 additions & 25 deletions html/files/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@

<html>
<head>
<title>Index | Reminder</title>
<title>Home | Reminder</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="manifest" href="/manifest.webmanifest">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap" rel="stylesheet">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; font-family: "Nunito Sans", serif; }
a:visited { color:blue; }
#head { margin-bottom: 2.5em; }
a { color: #333333; }
a:visited { color: #333333;}
#head {
position: fixed;
background: white;
padding: 15px 0 15px 0;
top: 0;
width: 100%;
}
#head a { margin-right: 10px; color: black; font-weight: bold; text-decoration: none; }
#container { height: 100%; max-width: 1024px; margin: 0 auto; padding: 25px;}
#content { padding-bottom: 100px; }
#content p { padding: 0 0 25px 0; margin: 0; }
#title { margin-top: 50px; font-size: 1.2em; font-weight: bold; margin-bottom: 10px; }
li { margin-bottom: 5px; }
@font-face {
font-family: 'arabic';
Expand Down Expand Up @@ -63,57 +71,46 @@
<a href="/search">Search</a>
<button id="install" hidden>Install</button>
</div>
<div id="title">Home</div>
<div id="content"><h1 id="what-is-the-reminder">What is the Reminder?</h1>

<p>The Reminder refers to the Quran, which is a guidance and a message for humanity. It serves as a divine revelation preserved by Allah, providing guidance, wisdom, and warnings to all people.</p>
<p>The &ldquo;Reminder&rdquo; refers to the Quran. It is described as a guide and a mercy for people, and it serves as a warning and a source of reminders for those who are mindful of Allah.</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 delivered to the Prophet Muhammad through the angel Gabriel. It serves as a guide and mercy for those with sure faith, offering insights, reminders, and clear revelations in Arabic. The Quran is considered a confirmation of previous scriptures and is preserved in its original form. It is a source of spiritual and legal guidance for Muslims.</p>
<p>The Quran is the sacred scripture of Islam, believed to be the literal word of Allah as revealed to the Prophet Muhammad through the angel Gabriel. It is a guide and a source of spiritual insight, delivered in Arabic, and is regarded as a clear Book whose verses are perfectly explained. It serves as a guide and a mercy for people of sure faith.</p>

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

<p>A Hadith is a narration or a report detailing the sayings, actions, or approvals of the Prophet Muhammad. It serves as a significant source of Islamic teachings and law, second only to the Quran.</p>
<p>A Hadith is a report or narration about the sayings, actions, or approvals of the Prophet Muhammad. Hadiths are an essential source of guidance for Muslims, complementing the Quran in providing insights into Islamic practices and teachings. They are collected in various books by scholars and are used for understanding the implementation of the Prophet&rsquo;s teachings in daily life.</p>

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

<p>Allah is the one true God in Islam, the Creator of the heavens and the earth. He is the Most Compassionate, Most Merciful, All-Knowing, and All-Wise. Everything in creation glorifies Him, and He is the Sustainer and Maintainer of all things. There is no deity worthy of worship except Allah, and all creatures will return to Him.</p>
<p>Allah is the One and Only God, the Creator of all things, the Sustainer, and the One worthy of worship. He is the Almighty, All-Knowing, Most Compassionate, Most Merciful, and possesses the Most Beautiful Names. Everything in the heavens and the earth glorifies Him.</p>

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

<p>Prophet Muhammad is considered the last prophet in Islam, sent by Allah to guide humanity. He is regarded as the &ldquo;Messenger of Allah&rdquo; and the &ldquo;Seal of the Prophets.&rdquo; Muhammad was born in Mecca and received divine revelations from Allah, which are recorded in the Quran, the holy book of Islam. Muslims believe he was sent as a witness, a bringer of glad tidings, and a warner. Prophet Muhammad is highly respected for his character, teachings, and as a mercy to the worlds.</p>
<p>Prophet Muhammad is the last prophet in Islam, sent by Allah as a messenger to convey His final revelation, the Quran, to humanity. He is described as a witness, a bringer of glad tidings, a warner, and a protector for the people. He is known for his exemplary character, being neither harsh nor hard-hearted, forgiving and kind even to those who wronged him. Muhammad is also referred to as &ldquo;Al-Mutawakkil,&rdquo; one who depends upon Allah. He is regarded as the &ldquo;seal of the prophets,&rdquo; indicating that no prophets will come after him.</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 all things, and the only One worthy of worship. Worshipping Allah is a fundamental aspect of Islamic faith, emphasizing our devotion, gratitude, and obedience to Him. It helps us maintain a strong spiritual connection, seek guidance, and fulfill the purpose of our existence.</p>
<p>Muslims worship Allah because He is the One true God, the Creator and Sustainer of the universe. Worshiping Allah is an act of gratitude, devotion, and obedience, recognizing His supremacy, mercy, and guidance in life. The Quran emphasizes that worship is due to Allah alone, as He has no partners and nothing else is worthy of worship. It is a means to strengthen the spiritual connection and seek His pleasure and rewards in this life and the hereafter.</p>

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

<p>Worshipping Allah involves believing in Him and associating nothing with Him. It includes performing acts such as offering prayers, showing gratitude, establishing prayer, giving charity, fasting, and performing good deeds sincerely for His sake. Worship also means following Allah&rsquo;s commands, maintaining sincerity and devotion in all actions dedicated to Him, and fulfilling the rights and responsibilities He has prescribed.</p>
<p>Worshipping Allah involves performing the obligatory prayers, fasting during Ramadan, giving to charity (Zakat), and performing Hajj if we are able. It also includes being sincerely devoted to Allah, associating no partners with Him, and obeying His commands. Worship can be practiced through acts of devotion, remembrance, gratitude, and living a life in accordance with Islamic teachings.</p>

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

<p>According to Islamic teachings, when a person dies, their soul is taken by angels and they experience the state of barzakh, an intermediary stage until the Day of Judgment. On that day, all people will be resurrected and judged by Allah based on their deeds. Those who were righteous will be awarded Paradise, while those who did evil will face punishment in Hell.</p>
<p>In Islam, when we die, our soul is taken by the Angel of Death and we are returned to Allah. The Quran mentions that Allah gives life and causes death, and to Him we are returned (10:56). After death, one&rsquo;s deeds remain with them and they will be shown their place in either Paradise or Hell, which will be their destination until the Day of Resurrection (Hadith, Bukhari Volume 2, Book 23, Number 422). Eventually, everyone will be resurrected for judgment by Allah (Quran 45:26).</p>

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

<p>To remember Allah, you can:</p>

<ol>
<li><p>Engage in regular prayer (Salat) and establish it as a routine.</p></li>

<li><p>Recite and reflect on the Quran frequently.</p></li>

<li><p>Engage in Dhikr, which involves repeating praises and supplications.</p></li>

<li><p>Remember Allah&rsquo;s blessings and express gratitude.</p></li>

<li><p>Maintain mindfulness of Allah in daily actions and decisions.</p>
<p>You can remember Allah by regularly engaging in prayer, reflection on His signs and blessings, reciting the Quran, and invoking His names. Pausing throughout the day to make dhikr (remembrance) such as saying &ldquo;Subhanallah&rdquo; (Glory be to Allah), &ldquo;Alhamdulillah&rdquo; (Praise be to Allah), &ldquo;Allahu Akbar&rdquo; (Allah is the Greatest), or any other forms of remembrance strengthens your connection with Allah. Engaging sincerely in these activities can help keep your heart connected to Him.</p>

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

<p>To become a Muslim, you need to sincerely proclaim the Shahada, which is the testimony of faith. The Shahada is: &ldquo;Ashhadu an la ilaha illallah, wa ashhadu anna Muhammadur rasulullah.&rdquo; This means, &ldquo;I bear witness that there is no god but Allah, and I bear witness that Muhammad is the Messenger of Allah.&rdquo; It is important to say this with sincere belief and understanding. Embracing Islam also involves accepting its core beliefs and practices, such as belief in one God, the prophets, and the Quran, and committing to follow the principles of Islam in your life.</p></li>
</ol>
<p>To become a Muslim, you need to declare the Shahada, which is the Islamic declaration of faith. It states: &ldquo;Ashhadu an la ilaha illallah, wa ashhadu anna Muhammadur Rasoolallah,&rdquo; meaning &ldquo;I bear witness that there is no god but Allah, and I bear witness that Muhammad is the Messenger of Allah.&rdquo; This declaration is sufficient for embracing Islam. It&rsquo;s also encouraged to follow Islamic practices like prayer, fasting, and engaging with the Muslim community for guidance and support.</p>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 093365b

Please sign in to comment.