FreeCodeCamp Project, Quote Bot

Size
4,760 Kb
Views
40,480

How do I make an freecodecamp project, quote bot?

What is a freecodecamp project, quote bot? How do you make a freecodecamp project, quote bot? This script and codes were developed by Twesh Chowdhury on 15 June 2022, Wednesday.

FreeCodeCamp Project, Quote Bot Previews

FreeCodeCamp Project, Quote Bot - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>FreeCodeCamp Project, Quote Bot</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <head> <meta charset="utf-8"> <meta content="Random Quote Generator" description="Twesh Chowdhury"> <title>~Random Quote Generator~</title>
</head>
<header>
<div class="container-fluid"> <div class="center"> <h1><strong>randomQuoteBot</strong></h1> <p class="sub-header">A mini-project by Twesh Chowdhury</p> </div> </header> <main role="main"> <div class="container-fluid"> <div style="margin:auto" id="message" class="well center message"> <p class="text-center" id="quoteID" >Click the next button for some quotes!</p> </div> </div> <div class="center"> <div style="padding:10px"> <button id="whenClicked" class="btn btn-primary" onclick="temp2()">Next!</button>
</div> </main> <footer> <p>Quotes taken from <a href="https://inspirationalquotes.tumblr.com">Inspirational Quotes</a> / For Educational Purposes Only / Copyright Twesh Chowdhury &copy; 2017</p> </footer> <script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

FreeCodeCamp Project, Quote Bot - Script Codes CSS Codes

@import url("https://fonts.googleapis.com/css?family=Amatic+SC|Raleway|Roboto:100|VT323");
body { background-color: #968282;
}
h1 { font-size: 2.8rem; letter-spacing: .4rem; border-bottom: 2px solid black; text-align: left; font-family: 'Roboto', sans-serif;
}
h1:hover { color: #F78181;
}
.sub-header { font-size: 2.2rem; padding-top: 1rem; border-top: 2px dotted #F78181; text-align: right; letter-spacing: .1rem; font-family: 'Amatic SC', cursive;
}
.link { color: inherit;
}
.link:hover { color: #F78181;
}
.well { width: 180px; height: 160px; overflow: auto; background-color: white; font-size: 1.8rem; position: relative; font-family: 'VT323', monospace; text-align: center;
}
.well p { position: absolute; left: 50%; margin-right: -50%; top: 50%; transform: translate(-50%, -50%);
}
.center { margin: auto; width: 50%; border: 3px grey; text-align: center;
}
.btn { background-color: transparent; border-width: .1rem; border-color: #F78181; font-size: 1.9rem; letter-spacing: .3rem; font-family: 'Amatic SC', cursive;
}
.btn:hover { background-color: #F78181; border-color: #F78181;
}
footer { width: 100%; position: fixed; bottom: 0; left: 0; z-index: 1; background-color: transparent; text-align: center; font-family: 'Roboto', sans-serif; font-weight: bold; font-size: 1.22rem;
}
#quoteID { padding-left: 20px; padding-right: 20px;
}

FreeCodeCamp Project, Quote Bot - Script Codes JS Codes

 /*$(document).ready(function() { $("#whenClicked").on("click", function(){ $("#message").html(quotes[randomNum]+", random number is: "+randomNum); }); });
var randomNum= Math.floor(Math.random() * 6) + 0;
var quotes=["yellow","green","blue","white","turquoise","magenta", "lime green"];
window.onload = randomQuote();
button.addEventListener('click', randomQuote);
function randomQuote (){ //get a random number to pick a random quote object random = Math.floor(Math.random() * quoteArray.length); //get that random quote's content quote.innerHTML = quotes[random].content;
}
/*
function temp2(){
var randomNum= Math.floor(Math.random() * 3) + 0;
document.getElementByID('message').innerHTML = quotes[randomNum];
}
*/
// create new variables for
// a. "Next!" button
// b.
function f1() { var randomNum= Math.floor(Math.random() * 14) + 0; var quotes =["“Nothing can dim the light which shines from within.” </br> - Maya Angelou",
"“A leader … is like a shepherd. He stays behind the flock, letting the most nimble go out ahead, whereupon the others follow, not realizing that all along they are being directed from behind.” </br> - Nelson Mandela",
"“Many of life’s failures are people who did not realize how close they were to success when they gave up.” </br> - Thomas Edison",
"“The successful warrior is the average man, with laserlike focus.” </br> - Bruce Lee",
"“The only place where success comes before work is in the dictionary” </br> - Vidal Sassoon",
"“There are two types of people who will tell you that you cannot make a difference in this world: those who are afraid to try and those who are afraid you will succeed.” </br> - Ray Goforth",
"“Success is walking from failure to failure with no loss of enthusiasm.” </br> - Winston Churchill",
"To Infinity and Beyond! </br> - Toy Story, 1995", "“If I have the belief that I can do it, I shall surely acquire the capacity to do it even if I may not have it at the beginning.” </br> - Gandhi",
"“Formal education will make you a living; self-education will make you a fortune.”<br> - Jim Rohn",
"“No one of achievement has avoided failure, sometimes catastrophic failures, but they keep at it. They learn from mistakes. They don’t quit.” <br> - Barrack Obama",
"“The first step towards getting somewhere is to decide that you are not going to stay where you are.” <br> - J.P. Morgan",
"“In a world that’s changing really quickly, the only strategy that is guaranteed to fail is not taking risks.” <br> - Mark Zuckerberg",
"“I alone cannot change the world, but I can cast a stone across the water to create many ripples.” <br> - Mother Teresa" ]; $("#whenClicked").on("click", function(){ $("#message > p").html(quotes[randomNum]); });
}
window.onload = function() { document.getElementById("whenClicked").onclick = function fun() { f1(); //validation code to see State field is mandatory. }
}
/*
var quotes =["“Nothing can dim the light which shines from within.” - Maya Angelou",
"“A leader … is like a shepherd. He stays behind the flock, letting the most nimble go out ahead, whereupon the others follow, not realizing that all along they are being directed from behind.” - Nelson Mandela",
"“Many of life’s failures are people who did not realize how close they were to success when they gave up.” - Thomas Edison",
"“The successful warrior is the average man, with laserlike focus.” - Bruce Lee",
"“The only place where success comes before work is in the dictionary” - Vidal Sassoon",
"“There are two types of people who will tell you that you cannot make a difference in this world: those who are afraid to try and those who are afraid you will succeed.” - Ray Goforth",
"“Success is walking from failure to failure with no loss of enthusiasm.” - Winston Churchill"];
*/
FreeCodeCamp Project, Quote Bot - Script Codes
FreeCodeCamp Project, Quote Bot - Script Codes
Home Page Home
Developer Twesh Chowdhury
Username twesh
Uploaded June 15, 2022
Rating 3
Size 4,760 Kb
Views 40,480
Do you need developer help for FreeCodeCamp Project, Quote Bot?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Twesh Chowdhury (twesh) Script Codes
Create amazing SEO content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!