Random Quote Machine

Developer
Size
2,259 Kb
Views
6,072

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 Previews

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
Random Quote Machine - Script Codes
Home Page Home
Developer Sky
Username skycoder
Uploaded January 29, 2023
Rating 3
Size 2,259 Kb
Views 6,072
Do you need developer help for Random Quote Machine?

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!

Sky (skycoder) Script Codes
Create amazing sales emails 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!