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">
		<div class="jumbotron">
			<h1>Talking Design:</h1>




	<div class="loader"><i class="fa fa-circle-o-notch fa-spin fa-3x fa-fw"></i></div>

			<div class="content" id="quoteDiv">


				<div class="blockquote animate-bottom">

					<blockquote>
						<p id="quoteContent"></p>
						<footer id="quoteAuthor"></footer>
					</blockquote>



				<div class="buttons">
					<button id="nextQuote" class="btn btn-primary">
					<i class="fa fa-arrow-right"></i>
				</button>

					<a href="#" id="tweet" class="share-btn">
						<i class="fa fa-twitter"></i>
					</a>
				</div>

			</div>
		</div>

		</div>
		<!-- end jumbotron -->
	</div>

              
            
!

CSS

              
                * {
    margin: 0;
    padding: 0;
    list-style: none;
    vertical-align: baseline;
}

body {
    font-family: 'Monaco', sans-serif;
    margin: 0;
    padding: 0;
    height: auto;
    width: 100%;
    background: #78C68E;
}

.loader i {
	color: #5D9A71;
}

@-webkit-keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.animate-bottom {
	position: relative;
	-webkit-animation-name: animatebottom;
  -webkit-animation-duration: 1s;
  animation-name: animatebottom;
  animation-duration: 1s
}

@-webkit-keyframes animatebottom {
  from { bottom:-100px; opacity:0 }
  to { bottom:0px; opacity:1 }
}

@keyframes animatebottom {
  from{ bottom:-100px; opacity:0 }
  to{ bottom:0; opacity:1 }
}

#quoteDiv {
	display: none;
}

.container-fluid {
    width: 80%;
    max-width: 768px;
    margin: 30px auto;
}

.jumbotron {
    margin: 30px auto;
    text-align: center;
    padding: 30px;
    -webkit-box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.5);
    box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.5);
}

.jumbotron h1 {
    font-size: 2.4em;
    color: #5D9A71;
    padding-bottom: 20px;
}

.blockquote {
	overflow: hidden;
}

.blockquote p {
    color: #5D9A71;
    font-size: 1.2em;
		font-family: 'Inconsolata', sans-serif;
}

.blockquote footer {
    color: #5D9A71;
    font-size: 1em;
		font-family: 'Monaco', sans-serif;
}

.buttons .btn {
    display: block;
    margin: 0 auto;
    background: transparent;
    border-color: #5D9A71;
    color: #5D9A71;
}

.btn:hover {
    background: #5D9A71;
    color: white;
    border-color: white;
}

.btn:focus {
    outline: 0;
    background: transparent;
    border-color: #5D9A71;
    color: #5D9A71;
}

.buttons .share-btn {
    display: block;
    margin: 10px auto 0;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 2em;
    color: #5D9A71;
    transition: 0.2s ease-in;
    cursor: pointer;
}

.share-btn:hover {
    color: #5D9A71;
    opacity: 0.7;
}

.share-btn:focus {
    outline: 0;
}

              
            
!

JS

              
                var app = {};

app.init = function() {
  app.url = "//quotesondesign.com/wp-json/posts?filter[orderby]=rand&filter[posts_per_page]=1&callback=";
  $(window).on('load', app.loader);
  app.getQuote();
  app.nextQuote();
};



app.loader = function() {
	setTimeout(app.showPage, 2000);
};

app.showPage = function() {
	$('.loader').css('display', 'none');
	$('#quoteDiv').css('display', 'block');
};

app.getQuote = function() {
  $('#status').show();
  $.ajax({
    url: app.url,
    success: function(data) {
      $('#status').fadeOut();
      var post = data.shift(); // The data is an array of posts. Grab the first one.
      $('#quoteAuthor').text(post.title).hide().fadeIn();
      $('#quoteContent').html(post.content).hide().fadeIn();
      app.postAuthor = post.title;
      app.postContent = $('#quoteContent').html(post.content).text();
    },
    cache: false
  });
};

app.nextQuote = function() {
  $('#nextQuote').on('click', app.getQuote);
};

//Twitter API
$("#tweet").on("click", function() {
  window.open("//twitter.com/intent/tweet?text=" + app.postContent + " - " + app.postAuthor);
});

app.init();

              
            
!
999px

Console