"quote"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/dudleystorey/pen/ORKWoE?limit=all&page=26&q=food" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <style class="cp-pen-styles">@import url("https://fonts.googleapis.com/css?family=Jim+Nightshade"); @import url("https://fonts.googleapis.com/css?family=Assistant:300"); body { min-height: 100vh; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; } #quotation { font-family: 'Jim Nightshade', script; font-size: 13vmin; line-height: 1.2; hanging-punctuation: first; } #source { font-family: 'Assistant', sans-serif; font-size: 4vmin; text-indent: 4vmin; color: rgba(0, 0, 0, 0.6); } button { font-family: 'Assistant', sans-serif; display: block; padding: .5rem; outline: none; font-size: .8rem; background: none; border: 1px solid rgba(0, 0, 0, 0.6); } </style></head><body> <blockquote> <p id="quotation"></p> <footer> <p id="source"></p> </footer> </blockquote> <button>Generate Quote</button> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script> <script >const quotes = [ { "quote" : "The only sin is ignorance", "source" : "Christopher Marlowe" }, { "quote" : "A man is his own easiest dupe, for what he wishes to be true he generally believes to be true", "source" : "Demosthenes" }, { "quote" : "A lie can travel halfway around the world while the truth is putting on its shoes", "source" : "Mark Twain" }, { "quote" : "Great minds discuss ideas; average minds discuss events; small minds discuss people", "source" : "Eleanor Roosevelt" }, { "quote" : "If you have a garden and a library, you have everything you need", "source" : "Marcus Tullius Cicero" }, { "quote" : "Truth comes out in wine", "source" : "Pliny the Elder" }, { "quote" : "Everything in the universe is within you. Ask all from yourself", "source" : "Rumi" }, { "quote" : "When I get a little money I buy books; and if any is left I buy food and clothes", "source" : "Desiderius Erasmus" } ] function randomQuote() { let random = quotes[Math.floor(Math.random() * quotes.length)]; quotation.innerText = `“${random.quote}.”`; source.innerText = random.source; } randomQuote(); document.querySelector("button").addEventListener('click', randomQuote) //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: