Random Quote Machine
How do I make an random quote machine?
What is a random quote machine? How do you make a random quote machine? This script and codes were developed by Sky on 29 January 2023, Sunday.
Random Quote Machine - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Random Quote Machine</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="quote" class="blockquote"><i class="fa fa-spin fa-spinner fa-3x"></i></div>
<a id="new-quote" class="btn" onclick="getQuote()">New Quote</a>
<a id="twitter" target="_blank" class="btn" href="https://twitter.com/intent/tweet?text="><i class="fa fa-twitter"></i> Share</a> <script src="js/index.js"></script>
</body>
</html>
Random Quote Machine - Script Codes CSS Codes
html { height: 100vh;
}
body { background-image: -webkit-linear-gradient( 315deg, #ABDCFF 10%, #0396FF 100%); background-image: linear-gradient( 135deg, #ABDCFF 10%, #0396FF 100%); color: #222; font-family: sans-serif; margin: 10vh auto 0; max-width: 400px; min-width: 280px;
}
.btn:hover { background-color: #11299C;
}
.btn { background-color: #003366; border-radius: 4px; color: #fff; cursor: pointer; display: inline-block; margin-left: 1.5em; padding: .75em; text-align: center; text-decoration: none; min-width: 85px;
}
.blockquote { border-left: 10px solid #B30F0F; margin-bottom: 1.5em; min-height: 7.5em; padding: 5px 0 20px 20px;
}
.fa-spin { margin: .5em 0 0 .5em;
}
Random Quote Machine - Script Codes JS Codes
const getQuote = () =>
fetch("https://quotesondesign.com/wp-json/posts?filter[orderby]=rand&callback=" + Math.random()) .then(res => res.json()) .then(data => quote.innerHTML = data[0].content + "<br> — " + data[0].title) .then(() => twitter.setAttribute("href", twitter.href + encodeURIComponent(quote.textContent)));
window.onload = getQuote;
![Random Quote Machine - Script Codes](http://shots.codepen.io/skycoder/pen/eROEqx-512.jpg)
Developer | Sky |
Username | skycoder |
Uploaded | January 29, 2023 |
Rating | 3 |
Size | 2,259 Kb |
Views | 6,072 |
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!
Name | Size |
Bootstrap 3 Grid Example | 2,111 Kb |
A Pen by Sky | 4,531 Kb |
Colors and Sounds | 4,204 Kb |
Calculator | 4,133 Kb |
Media Queries | 2,045 Kb |
Random Quote Machine | 2,259 Kb |
Dark Sky - Simple 5-day Forecast | 4,941 Kb |
Show the Local Weather - and a local background image | 8,205 Kb |
FCC Leaderboard - vanilla JS | 2,546 Kb |
Wikipedia Viewer | 3,538 Kb |
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!
Name | Username | Size |
Scroll Arrow | Robooneus | 4,437 Kb |
Simple Responsive Text | Fbrz | 2,282 Kb |
Animated bar chart | CreativePunch | 3,124 Kb |
Pure CSS Tooltips | Mobius1 | 2,271 Kb |
CSS3 Butterfly | Timohausmann | 3,430 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
Simple Flat Menu | Jeplaa | 2,467 Kb |
Cloudy Spiral CSS animation | Hakimel | 6,587 Kb |
Under construction | GhostRider | 1,642 Kb |
Bootstrap 4 Gridsystem Demo | Rivella50 | 1,535 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!