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

              
                <!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>FCC: G.K. Chesterton Quote Generator - Dennis Daubney</title>
	<link href="css/bootstrap.css" rel="stylesheet">
	<link href="css/animate.css" rel="stylesheet">
	<link href="css/main.css" rel="stylesheet" type="text/css">
	<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css?family=Berkshire+Swash|Open+Sans" rel="stylesheet">
</head>
<body>
	<div class="container-fluid text-center reflexive">
		<br>
		<br>
		<br>
		<section class="reflexive">
			<div class="reflexive">
				<h1><strong>The Wisdom of G.K. Chesterton</strong></h1>
			</div><br>
			<div class="reflexive">
				<h3 class="animated pulse" id="quotebox">Click the button below to generate a quote</h3>
			</div><br>
			<br>
			<!--<a href="#"><i class="fa fa-facebook-official social_margin" style="font-size:36px;color:#3b5998" aria-hidden="true"></i></a>-->
			<br>
			<div class="">
				<button class="btn" id="getquote" onclick="randomQuoteGen()">Get a Quote</button>
			</div><br>
			<!--<div>
                <a href="" id="shareTweet" class="twitter-share-button" onclick="shareTweet()">Tweet</a>
            <a href="#">Share to twitter<i class="fa fa-twitter social_margin" style="font-size:36px;color:#1DA1F2" aria-hidden="true"></i></a>
            </div>-->
		</section>
	</div>
	<script src="https://code.jquery.com/jquery-2.1.3.min.js">
	</script> 
	<script src="js/bootstrap.js">
	</script> 
	<script async charset="utf-8" src="//platform.twitter.com/widgets.js">
	</script> 
	<script src="js/main.js">
	</script>
</body>
</html>
              
            
!

CSS

              
                h1 {
    font-family: 'Berkshire Swash', cursive;
    font-size: 3.5em;
}

h3 {
    font-style: italic;
    font-family: 'Open Sans', cursive;
}
              
            
!

JS

              
                var quoteArray = []
quoteArray[0] = "Courage is almost a contradiction in terms. It means a strong desire to live taking the form of a readiness to die.";
quoteArray[1] = "A dead thing can go with the stream, but only a living thing can go against it.";
quoteArray[2] = "Men do not differ much about what things they will call evils; they differ enormously about what evils they will call excusable.";
quoteArray[3] = "Fallacies do not cease to be fallacies because they become fashions.";
quoteArray[4] = "If we want to give poor people soap we must set out deliberately to give them luxuries. If we will not make them rich enough to be clean, then empathically we must do what we did with the saints. We must reverence them for being dirty.";
quoteArray[5] = "Art, like morality, consists of drawing the line somewhere.";
quoteArray[6] = "There are in this world of ours only two kinds of speakers. The first is the man who is making a good speech and won’t finish. The second is the man who is making a bad speech and can’t finish. The latter is the longer.";
quoteArray[7] = "There are two kinds of revolutionists, as of most things – a good kind and a bad. The bad revolutionists destroy conventions by appealing to fads – fashions that are newer than conventions. The good do it by appealing to facts that are older than conventions.";
quoteArray[8] = "It is perfectly obvious that in any decent occupation (such as bricklaying or writing books) there are only two ways (in any special sense) of succeeding. One is by doing very good work, the other is by cheating.";
quoteArray[9] = "I would rather a boy learnt in the roughest school the courage to hit a politician, or gained in the hardest school the learning to refute him – rather than that he should gain in the most enlightened school the cunning to copy him.";

var credits = " -G.K. Chesterton ";
//console.log(quoteArray.q1 + credits);

function randomQuoteGen() {
	var randomMathGen = Math.floor(Math.random() * (quoteArray.length));
	document.getElementById('quotebox').innerHTML = '"' + quoteArray[randomMathGen] + '"' + credits + " ";

	var tweetQuote = quoteArray[randomMathGen];
	twttr.widgets.createShareButton('/', document.getElementById('quotebox'), {
		text: document.getElementById('quotebox').innerHTML
	});
	/* function shareTweet(){
	 var textToTweet = tweetQuote;
	 textToTweet = encodeURI(textToTweet)
	 window.open("https://twitter.com/intent/tweet?text=" + textToTweet);
	 }; */
};

$(document).ready(function() {
	$("#getquote").click(function() {
		$('.pulse').toggleClass('fadeInLeft');
	});
});
              
            
!
999px

Console