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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Random_Quote_Generator_Website/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
let jokes=[
"Be yourself; everyone else is already taken." ,
"A room without books is like a body without a soul.",
"To live is the rarest thing in the world. Most people exist, that is all.",
"Be who you are and say what you feel, because those who mind don't matter, and those who matter don't mind.",
"You only live once, but if you do it right, once is enough.",
"Be the change that you wish to see in the world.",
"If you want to know what a man's like, take a good look at how he treats his inferiors, not his equals",
"Insanity is doing the same thing, over and over again, but expecting different results.",
"Fairy tales are more than true: not because they tell us that dragons exist, but because they tell us that dragons can be beaten.",
"Life is what happens to us while we are making other plans.",

];

let jokeText1=document.getElementById("jokeText");
let clicks=0;

function updateJoke(){

clicks=clicks+1;
clicks=clicks%(jokes.length);
//the array just cycles to give new jokes
jokeText1.textContent=jokes[clicks];

}

35 changes: 35 additions & 0 deletions Random_Quote_Generator_Website/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css" />
<title> Random Quote Generator</title>
</head>
<body>
<div class="container">

<h3>Random Quote Generator</h3>
<div id="joke" class="joke">
<div>
<svg id="ic1" xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-quote" viewBox="0 0 16 16">
<path d="M12 12a1 1 0 0 0 1-1V8.558a1 1 0 0 0-1-1h-1.388c0-.351.021-.703.062-1.054.062-.372.166-.703.31-.992.145-.29.331-.517.559-.683.227-.186.516-.279.868-.279V3c-.579 0-1.085.124-1.52.372a3.322 3.322 0 0 0-1.085.992 4.92 4.92 0 0 0-.62 1.458A7.712 7.712 0 0 0 9 7.558V11a1 1 0 0 0 1 1h2Zm-6 0a1 1 0 0 0 1-1V8.558a1 1 0 0 0-1-1H4.612c0-.351.021-.703.062-1.054.062-.372.166-.703.31-.992.145-.29.331-.517.559-.683.227-.186.516-.279.868-.279V3c-.579 0-1.085.124-1.52.372a3.322 3.322 0 0 0-1.085.992 4.92 4.92 0 0 0-.62 1.458A7.712 7.712 0 0 0 3 7.558V11a1 1 0 0 0 1 1h2Z"/>
</svg>
</div>
<br>
<br>
<div id="jokeText">
Be the change you wish to see in the world .
</div></div>
<div id="btn1"><button id="jokeBtn" class="btn" onclick="updateJoke()">Get Another Quote</button></div>
</div>
<div id="icon2">
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill="currentColor" class="bi bi-chat-left-quote" viewBox="0 0 16 16">
<path d="M14 1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4.414A2 2 0 0 0 3 11.586l-2 2V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12.793a.5.5 0 0 0 .854.353l2.853-2.853A1 1 0 0 1 4.414 12H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/>
<path d="M7.066 4.76A1.665 1.665 0 0 0 4 5.668a1.667 1.667 0 0 0 2.561 1.406c-.131.389-.375.804-.777 1.22a.417.417 0 1 0 .6.58c1.486-1.54 1.293-3.214.682-4.112zm4 0A1.665 1.665 0 0 0 8 5.668a1.667 1.667 0 0 0 2.561 1.406c-.131.389-.375.804-.777 1.22a.417.417 0 1 0 .6.58c1.486-1.54 1.293-3.214.682-4.112z"/>
</svg>
</div>

<script src="app.js"></script>
</body>
</html>
78 changes: 78 additions & 0 deletions Random_Quote_Generator_Website/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
body{
background-color:#749F82;

}


h3{
border: 3px solid #CFFF8D;
font-weight:1000;
padding:20px 0 20px;
border-radius:10px;
color:#CFFF8D;
background-color:#425F57;
font-family:sans-serif ;
display:flex;
font-size:2.5rem;
flex-direction:row;
justify-content:center;



}
#ic1{
margin-left:0%;
}



#joke{
font-style:italic;
padding:2% 4% 4% 2%;
font-family:sans-serif;
border-radius:10px;
background-color:#A8E890;
width:70%;
height: 50px;
border:solid 3px #425F57;
margin:0 auto;

display:flex;
flex-direction:row;
justify-content:center;
}

#btn1{
margin:10px auto;
display:flex;
flex-direction:row;
justify-content:center;
}

#jokeBtn{
font-weight:bold;
color:#CFFF8D;
background-color:#425F57;
display:flex;
flex-direction:row;
justify-content:center;
border:3px solid #CFFF8D;
border-radius:10px;
padding:1%

}

#jokeBtn:hover{
color:#425F57;
background-color:#CFFF8D;
}
#icon2 {
margin-top:50px;
display:flex;
flex-direction:row;
justify-content:center;

}
path{
width:1100px;
}