JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<body class="gradient">
<div class="container-fluid gradient">
<h1 id = "header" class="text-center">RANDOM RIKER QUOTE</h1>
<div id="riker" class="pull-left"></div>
<div id="quotebox" class="center-block text-center">
<div id="quote">Words of wisdom from Number One.</div>
<button id="makeItSo" class="btn btn-danger">Make it so. <i class="glyphicon glyphicon-random"></i> </button>
<div class="tweeter pull-right">
<a class="button" id="tweetThis" title="Share the wisdom of Riker" target="_blank">
<i class="fa fa-twitter"></i>
</a>
</div>
</div>
<div class="small text-center">Inspired by and sourced from <a href="http://www.rikeripsum.com">Riker Ipsum.</a></div>
</div>
</body>
.gradient {
height: 100%;
margin: 0;
background-repeat: no-repeat;
background-attachment: fixed;
background-image: linear-gradient(to bottom, #a90329 0%, #6d0019 50%, #000000 100%);
}
#header {
font-family: 'Rubik One', sans-serif;
font-size: 400%;
color: white;
text-shadow: 2px 2px black;
padding-bottom: 15px;
}
#quotebox {
min-height: 200px;
margin-top: 2px;
padding: 30px;
min-width: 50%;
max-width: 85%;
background-color: white;
border: 10px solid #ccc;
border-radius: 10px;
}
#quote {
padding: 20px;
font-family: 'Helvetica Neue', Helvetica, sans-serif;
font-size: 150%;
}
#riker {
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/672604/riker.png);
background-size: cover;
height: 200px;
width: 200px;
border: 10px solid #ccc;
border-radius: 50%;
margin-top: -20px;
}
.small {
color: #ccc;
padding: 10px;
}
.tweeter {
font-size: 200%;
}
$(document).ready(function() {
var quotelist = ["My oath is between Captain Kargan and myself. Your only concern is with how you obey my orders. Or do you prefer the rank of prisoner to that of lieutenant?", "Yesterday I did not know how to eat gagh.", "I recommend you don't fire until you're within 40,000 kilometers.", "That might've been one of the shortest assignments in the history of Starfleet.", "We finished our first sensor sweep of the neutral zone.", "I'll be sure to note that in my log.", "Mr. Worf, you do remember how to fire phasers?", "Captain, why are we out here chasing comets?", "You're going to be an interesting companion, Mr. Data.", "I suggest you drop it, Mr. Data.", "Fear is the true enemy, the only enemy.", "We have a saboteur aboard.", "Shields up! Rrrrred alert!", "Besides, you look good in a dress.", "They were just sucked into space.", "The unexpected is our normal routine.", "When has justice ever been as simple as a rule book?", "Smooth as an android's bottom, eh, Data?"];
var quote;
$("#makeItSo").on("click", function(ev) {
quote = "\"" + quotelist[Math.floor(Math.random() * quotelist.length)] + "\"";
$("#quote").text(quote);
//twitter
$('#tweetThis').attr('href', 'https://twitter.com/intent/tweet?&text=' + encodeURIComponent(quote + '- Commander Riker'));
});
});
Also see: Tab Triggers