Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container-fluid wrapper">
	<h1>Outlander Quote Generator</h1>
	<p>Welcome to the random Outlander Quote Generator. Click on the the buttons below to generate a new quote or tweet the current one.</p>
	<div class="transbox">
		<span class="quote">Click Below</span>
	</div>
	<div class="buttons">
		<button class="btn btn-block btn-primary" id="generate">Get Ye Quotes!</button>
		<br>
		<button class="btn btn-block btn-info" id="tweet"><i class="fa fa-twitter fa-lg" aria-hidden="true"></i> Tweet This!</button>
	</div>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Uncial+Antiqua|Open+Sans);
body {
	background-image: url('http://vanessa-smith.com/wp-content/uploads/2016/09/outlander-bg.jpg');
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-size: cover; 
	font-family: 'Open Sans';
	font-size: 16px;
}


h1 {
	font-family: 'Uncial Antiqua';
	font-size: 5em;
	text-align: center;
	color: #fff;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
	@media screen and (max-width: 764px){
		h1{ font-size: 4em;}
	}
		@media screen and (max-width: 425px){
			h1 {font-size: 2.5em;}
	}
	

p {
	font-size: 1.25em;
	text-align: center;
	color: #fff;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
span { 
	font-style: italic;
	color: #666;
}
button{
	-webkit-box-shadow: 3px 3px 3px 1px rgba(0,0,0,0.2);
		 -moz-box-shadow: 3px 3px 3px 1px rgba(0,0,0,0.2);
					box-shadow: 3px 3px 3px 1px rgba(0,0,0,0.2);
}
.wrapper {
	width: 90%;
	min-height: 100vh;
	margin: 0 auto;
}
.transbox {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 40%;
	min-height: 200px;
	padding: 2em;
	border-radius: 0.25em;
	-webkit-box-shadow: 3px 3px 3px 1px rgba(0,0,0,0.2);
		 -moz-box-shadow: 3px 3px 3px 1px rgba(0,0,0,0.2);
					box-shadow: 3px 3px 3px 1px rgba(0,0,0,0.2); 
	background-color: rgba(255,255,255,0.6)
}
@media screen and (max-width: 1024px){
	.transbox{
		width: 75%;
	}
}
@media screen and (max-width: 768px){
	.transbox{
		width: 90%;
		margin: 0 auto;
	}
}
.buttons{
	margin-top:1em;
	width: 40%;
	}
@media screen and (max-width: 1024px){
	.buttons{
		width: 75%;
	}
}
@media screen and (max-width: 768px){
	.buttons{
		width: 90%;
		margin: 1em auto;
	}
}
              
            
!

JS

              
                $(document).ready(function() {
	var randomQuote;
	var randomNum;

	function getQuotes() {
		var quotes = ["'When the day shall come that we do part,' he said softly, and turned to look at me, 'if my last words are not 'I love you'-ye'll ken it was because I didna have time'",
			"For where all love is, the speaking is unnecessary",
			"I can bear pain myself, he said softly, but I couldna bear yours. That would take more strength than I have",
			"Oh, aye, Sassenach. I am your master . . . and you're mine. Seems I canna possess your soul without losing my own",
			"Ye are Blood of my Blood, and Bone of my Bone, I give ye my Body, that we Two might be One. I give ye my Spirit, 'til our Life shall be Done",
			"'Ye werena the first lass I kissed,' he said softly. 'But I swear you'll be the last'",
			"I want to hold you hard to me and kiss you, and never let you go. I want to take you to my bed and use you like a whore, 'til I forget that I exist. And I want to put my head in your lap and weep like a child.' The mouth turned up at one corner, and a blue eye opened slitwise. 'Unfortunately,' he said, 'I can't do any but the last of those without fainting or being sick again.'"
		];
		randomNum = Math.floor((Math.random() * quotes.length));

		randomQuote = quotes[randomNum];

		$(".quote").text(randomQuote);
	}
	$("#tweet").on("click", function() {
		window.open("https://twitter.com/intent/tweet?text=" + randomQuote);
	});
	$("#generate").on("click", function() {
		getQuotes();
	});

});
              
            
!
999px

Console