Skip to content

Commit eb84da7

Browse files
Merge pull request #21 from rajmishra-47/main
First commit
2 parents 3e82495 + 2f53193 commit eb84da7

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

Quotes/app.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict'
2+
3+
4+
const b=()=>{
5+
6+
let a=document.querySelector('.par');
7+
8+
9+
fetch('https://animechan.vercel.app/api/random').then((user)=>{
10+
return user.json();
11+
}).then((mess)=>{
12+
a.textContent=mess.quote;
13+
console.log(mess.anime);
14+
})
15+
// .catch((data)=>{
16+
// a=data;
17+
// })
18+
}
19+
20+
document.getElementById('btn').addEventListener('click',b);

Quotes/index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>new</title>
8+
<link rel="stylesheet" href="./style.css">
9+
10+
<link rel="preconnect" href="https://fonts.googleapis.com">
11+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12+
<link href="https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@1,700&family=Roboto:ital,wght@1,900&display=swap" rel="stylesheet">
13+
</head>
14+
<body>
15+
16+
<div class="box">
17+
18+
<div class="par">
19+
Fortune favors the bold
20+
</div>
21+
22+
23+
<div class="br">
24+
<button id="btn">Next</button>
25+
</div>
26+
27+
</div>
28+
29+
30+
<script src="./app.js"></script>
31+
</body>
32+
</html>

Quotes/style.css

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.box{
2+
height: 200px;
3+
width: auto;
4+
border: 2px solid black;
5+
6+
display:flex;
7+
justify-content:center ;
8+
align-items: center;
9+
10+
border-radius: 10px;
11+
12+
background-color:wheat;
13+
font-family: 'Comic Neue', cursive;
14+
font-family: 'Roboto', sans-serif;
15+
16+
font-size: larger;
17+
18+
/* color: aliceblue; */
19+
}
20+
21+
.br{
22+
position:absolute;
23+
top: 30%;
24+
left:40%
25+
}
26+
27+
#btn{
28+
background-color: #011801; /* Green */
29+
border: none;
30+
color: white;
31+
padding: 15px 32px;
32+
text-align: center;
33+
text-decoration: none;
34+
display: inline-block;
35+
font-size: 20px;
36+
37+
border-radius: 10px;
38+
}
39+
40+

0 commit comments

Comments
 (0)