Skip to content

Commit c2a09b5

Browse files
committed
Programmer's Motivational Quotes Generator added with readme
1 parent 81d0f73 commit c2a09b5

File tree

4 files changed

+157
-0
lines changed

4 files changed

+157
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# Programmer's Motivational Quotes Generator
3+
fetching quote through api
4+
5+
## 🚀 About Me
6+
I'm a full stack developer...you can follow me here -https://github.com/RAHULBAWA777
7+
8+
9+
## Run Locally
10+
11+
Clone the project
12+
13+
14+
Start the live server
15+
16+
17+
## Used By
18+
19+
This project is used by the following companies:
20+
21+
-https://github.com/Dezenix/frontend-html-css-js
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<title>Programmer's Motivational Quoates Generator</title>
9+
<link rel="stylesheet" href="style.css">
10+
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap" rel="stylesheet">
11+
</head>
12+
13+
<body>
14+
<div class="box">
15+
<p id="words"></p>
16+
<p id="name" class="name"></p>
17+
</div>
18+
<button class="butt" onclick="dataFetch()">Next Quote</button>
19+
20+
<script src="script.js"></script>
21+
</body>
22+
23+
</html>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const words = document.getElementById("words");
2+
const name = document.getElementById("name");
3+
4+
function dataFetch() {
5+
fetch("http://quotes.stormconsultancy.co.uk/random.json")
6+
.then((res) => {
7+
return res.json();
8+
})
9+
.then((data) => {
10+
words.innerText = data.quote;
11+
name.innerText = `-${data.author}`;
12+
});
13+
}
14+
dataFetch();
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
*{
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
font-family: 'Dancing Script', cursive;}
6+
body{
7+
display: flex;
8+
justify-content: center;
9+
flex-direction: column;
10+
align-items: center;
11+
height: 100vh;
12+
background-color: black;
13+
}
14+
.box{
15+
/* height: 300px; */
16+
width: 900px;
17+
padding: 3rem 2rem;
18+
background: #181717;
19+
box-shadow: 0 0 30px rgb(255, 96, 122);
20+
font-size: 40px;
21+
color: white;
22+
position: relative;
23+
display: flex;
24+
flex-direction: column;
25+
align-items: center;
26+
}
27+
.name{
28+
margin-top: 80px;
29+
margin-left: 30rem;
30+
}
31+
32+
.butt {
33+
padding: 0.6em 2em;
34+
border: none;
35+
outline: none;
36+
color: rgb(255, 255, 255);
37+
background: #111;
38+
cursor: pointer;
39+
font-size: 40px;
40+
position: relative;
41+
z-index: 0;
42+
border-radius: 10px;
43+
user-select: none;
44+
margin-top: 3rem;
45+
-webkit-user-select: none;
46+
touch-action: manipulation;
47+
}
48+
49+
.butt:before {
50+
content: "";
51+
background: linear-gradient(
52+
45deg,
53+
#ff0000,
54+
#ff7300,
55+
#fffb00,
56+
#48ff00,
57+
#00ffd5,
58+
#002bff,
59+
#7a00ff,
60+
#ff00c8,
61+
#ff0000
62+
);
63+
position: absolute;
64+
top: -2px;
65+
left: -2px;
66+
background-size: 400%;
67+
z-index: -1;
68+
filter: blur(5px);
69+
-webkit-filter: blur(5px);
70+
width: calc(100% + 4px);
71+
height: calc(100% + 4px);
72+
animation: glow 20s linear infinite;
73+
transition: opacity 0.3s ease-in-out;
74+
border-radius: 10px;
75+
}
76+
77+
@keyframes glow {
78+
0% {
79+
background-position: 0 0;
80+
}
81+
50% {
82+
background-position: 400% 0;
83+
}
84+
100% {
85+
background-position: 0 0;
86+
}
87+
}
88+
89+
.butt:after {
90+
z-index: -1;
91+
content: "";
92+
position: absolute;
93+
width: 100%;
94+
height: 100%;
95+
background: #222;
96+
left: 0;
97+
top: 0;
98+
border-radius: 10px;
99+
}

0 commit comments

Comments
 (0)