-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
155 lines (132 loc) · 3.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html>
<head>
<style>
button {
background-color: #fbe8c2;
border-radius: 100px;
box-shadow: rgba(75, 55, 10, 0.2) 0 -25px 18px -14px inset,rgba(44, 187, 99, .15) 0 1px 2px,rgba(130, 110, 21, 0.15) 0 2px 4px,rgba(104, 84, 10, 0.15) 0 4px 8px,rgba(62, 45, 2, 0.15) 0 8px 16px,rgba(187, 137, 44, 0.15) 0 16px 32px;
color: rgb(170, 128, 36);
cursor: pointer;
display: inline-block;
font-family: 'Rocher';
padding: 7px 20px;
text-align: center;
text-decoration: none;
transition: all 250ms;
border: 0;
font-size: 16px;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}
button:hover {
box-shadow: rgba(50, 29, 7, 0.35) 0 -25px 18px -14px inset,rgba(51, 29, 6, 0.25) 0 1px 2px,rgba(44,187,99,.25) 0 2px 4px,rgba(77, 51, 9, 0.25) 0 4px 8px,rgba(80, 53, 12, 0.25) 0 8px 16px,rgba(93, 57, 13, 0.25) 0 16px 32px;
transform: scale(1.05) rotate(-1deg);
}
body {
background-image: url("re.png");
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
@media (max-width: 480px) {
body {
background-size: contain;
}
}
@font-face {
font-family: 'Rocher';
src: url(https://assets.codepen.io/9632/RocherColorGX.woff2);
}
body {
font-family: 'Rocher';
text-align: center;
font-size: 20px;
height: 60vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
h1 {
margin: 0;
}
@font-palette-values --Grays {
font-family: Rocher;
base-palette: 9;
}
@font-palette-values --Purples {
font-family: Rocher;
base-palette: 6;
}
@font-palette-values --Mint {
font-family: Rocher;
base-palette: 7;
}
.grays {
font-palette: --Grays;
}
.purples {
font-palette: --Purples;
}
.mint {
font-palette: --Mint;
}
@import url(https://fonts.googleapis.com/css?family=Scheherazade:400,700&subset=arabic);
.quran{
font-family: 'Scheherazade', 'Arabic Typesetting', serif;
font-size: 2.6em;
margin-top: 1em;
color: black;
text-shadow: 2px 2px 8px #361c03;
font-weight: bolder;
}
.quran .iqlab {
color: purple;
}
.quran .ghunna {
color: red;
}
.quran .idghambighunna {
color: green;
}
.quran .idghambilaghunna {
color: blue;
}
.quran .ikhfaa {
color: green;
}
</style>
<title>Random Ayah Generator</title>
<script>
function getRandomAyah() {
var randReference = Math.floor(Math.random() * 6236) + 1;
var apiUrl = "http://api.alquran.cloud/v1/ayah/" + randReference;
fetch(apiUrl)
.then(response => response.json())
.then(data => {
document.getElementById("surah-name").innerHTML = data.data.surah.englishName;
document.getElementById("ayah-text").innerHTML = data.data.text;
document.getElementById("ayah-number").innerHTML = randReference;
});
}
</script>
</head>
<br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<body>
<button onclick="getRandomAyah()" >Generate Random Ayah</button>
<div style="height: auto;">
<p id="ayah-text" class="quran"></p>
</div>
<div>
<h3>Surah Name:</h3>
<p id="surah-name" class="grays"></p>
</div>
<div>
<h3>Ayah Number in the Quran:</h3>
<p id="ayah-number" class="grays"></p>
</div>
</body>
</html>