Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Quotes/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict'


const b=()=>{

let a=document.querySelector('.par');


fetch('https://animechan.vercel.app/api/random').then((user)=>{
return user.json();
}).then((mess)=>{
a.textContent=mess.quote;
console.log(mess.anime);
})
// .catch((data)=>{
// a=data;
// })
}

document.getElementById('btn').addEventListener('click',b);
32 changes: 32 additions & 0 deletions Quotes/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>new</title>
<link rel="stylesheet" href="./style.css">

<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=Comic+Neue:ital,wght@1,700&family=Roboto:ital,wght@1,900&display=swap" rel="stylesheet">
</head>
<body>

<div class="box">

<div class="par">
Fortune favors the bold
</div>


<div class="br">
<button id="btn">Next</button>
</div>

</div>


<script src="./app.js"></script>
</body>
</html>
40 changes: 40 additions & 0 deletions Quotes/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.box{
height: 200px;
width: auto;
border: 2px solid black;

display:flex;
justify-content:center ;
align-items: center;

border-radius: 10px;

background-color:wheat;
font-family: 'Comic Neue', cursive;
font-family: 'Roboto', sans-serif;

font-size: larger;

/* color: aliceblue; */
}

.br{
position:absolute;
top: 30%;
left:40%
}

#btn{
background-color: #011801; /* Green */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 20px;

border-radius: 10px;
}