Random Quote Machine

Size
2,826 Kb
Views
34,408

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 Anukaran Kathuria on 21 August 2022, 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 prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <head> <title>RCG</title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <link href="https://fonts.googleapis.com/css?family=Caveat" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body background="http://i66.tinypic.com/331m5jt.jpg"> <!-- Navigation --> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> <a target=_blank class="navbar-brand" href="http://codepen.io/anukath/full/EgaqgQ/"><span class="glyphicon glyphicon-user"></span>Anukaran's Portfolio</a> </div> </div>
</nav> <div class="container-fluid "> <h1 id="heading">Random Quote Machine</h1> <div class="row"> <div id="ab" class="col-sm-12" align="center"> </div> </div> <div class="row" id="r2"> <div class="col-sm-12" align="center"> <button id="tw" type="button" class='btn btn-primary'>Tweet Quote</button>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp <button type="button" class="btn btn-primary" id="clk">Random Quote</button> </div> </div> </div> <div class="footer">Created by <a href="https://www.linkedin.com/in/anukath/" target=_blank>Anukaran Kathuria</a></div>
</body> <script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Random Quote Machine - Script Codes CSS Codes

#heading { text-align: center;
font-family: 'Roboto', sans-serif; font-size: 45px; color:white;
}
#clk { align: center;
}
.row { margin-top:5%;
}
#ab { background: transparent; border: none; outline: none; resize: none; overflow: hidden; color:white; text-align:center;
}
.footer { padding: 1rem; background-color:#202020; color:white; text-align: center;
}
#r2{ padding-top:20px;
}

Random Quote Machine - Script Codes JS Codes

 var quotes = []; var r; function rand() { var ran = Math.floor((Math.random() * 30)); r = ran; $("#ab").html(quotes[ran].content.slice(3, -5) + "\n\n&mdash;" + quotes[ran].title); } $(document).ready(function() { $.getJSON("http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=30&callback=", function(a) { quotes = a; rand(); }); $("#clk").click(function() { rand(); }); /* function cl() { var bg_colour = Math.floor(Math.random() * 16777215).toString(16); bg_colour = "#" + ("000000" + bg_colour).slice(-6); document.body.style.backgroundColor = bg_colour; setTimeout(cl, 2200); } cl();
*/ $('#tw').on("click", function() { var url = 'https://twitter.com/intent/tweet?text=' + quotes[r].content.slice(3, -5) + ' ' + quotes[r].title; window.open(url, 'twitter'); return false; }); });
Random Quote Machine - Script Codes
Random Quote Machine - Script Codes
Home Page Home
Developer Anukaran Kathuria
Username anukath
Uploaded August 21, 2022
Rating 3
Size 2,826 Kb
Views 34,408
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!

Anukaran Kathuria (anukath) Script Codes
Create amazing blog posts 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!