cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

              <div class="colored-name title">Random Quote Machine

      <div class="quote-container">
        <div class="quote">
          Here be quote.
        <div class="author">
          Mr. B
        <div class="quote-separator"></div>

        <div class="button-row">
          <span class="fa fa-twitter fa-2x tweet link"></span>
          <span class="fa fa-refresh fa-2x refresh link"></span>
      <div class="row footer-content">
        <span class="colored-name">by
        <a href="http://balach.de" class="link" target="_blank">
        <span class="colored-name"> Balach</span>
      <div class="zipline-description">
          The is the random quote machine, built for my Free Code Camp Zipline. <br>I have used the quote API from <a href="https://quotes.stormconsultancy.co.uk/api" class="link" target="_blank">Storm Consultancy</a>, fonts from Google Fonts, and a lot of inspiration from other FCC campers.
              body {
	background-color: rgba(245,245,245,0.6);
	font-family: 'Josefin Sans', sans-serif;
	font-size: medium;
	color: rgb(52, 52, 52);
	width: 90%;
	height: 100%;
	text-align: center;

.title {
	font-family: Tangerine,Serif;
	font-size: 5em;
	text-shadow: #000 1px 1px;
	margin: 0.5em;
.zipline-description {
	font-size: 0.8em;

.quote-container {
	background-color: rgba(255, 235, 59, 0.41);
    border-radius: 16px 16px 2px 16px;
    margin-bottom: 1em;
    min-height: 60%;
    border: #607d8b solid 0.2em;
.quote {
	padding: 1em;
	font-size: 2.2em;
	text-shadow: rgba(245,245,245,0.6) 0px 0px 3px;
	vertical-align: middle;
.author {
	padding: 0em 1em 0.4em 0em;
	text-align: right;
	font-size: 1.8em;
	text-shadow: rgba(245,245,245,0.6) 0px 0px 3px;
.quote-separator {
	width: 80%;
	margin: auto;
	border-top: #9e9e9e solid 0.1em;

.button-row {
	height: 3em;

.refresh {
	margin: 0.3em 5em 0.3em 1em;
	float: right;
.tweet {
	margin: 0.3em 1em 0.3em 5em;
	float: left;

.link {
	cursor: pointer;
	text-decoration: none;
	color: #337ab7;
.link:hover {
	text-decoration: none;
	color: #225d90;
	text-shadow: rgba(0,0,0,0.6) 0px 0px 1px;

.colored-name {
  color: #E74C3C;
  font-weight: bold;
              // Start the engines
	// Load first quote
	// Set up the refresh button
	$(".refresh").on("click", function() {
	// Set up tweet click handler
	$(".tweet").on("click", function(){
		window.open($(this).attr("tweet"), "_blank")

function getQuote(){
	// get random quote from storm consultancy
	$.get("https://crossorigin.me/https://quotes.stormconsultancy.co.uk/random.json?" + Date.now())
			// Pass the quote info to the handler
			setQuote(data.quote, data.author);
		.fail(function() {
			// Set my own quote in case of failure or api rate-limit hit
			setQuote("The only good time to hit the API rate-limit is when you are trying to hit it.", "Balach");
		.always(function() {
			// Always stop spinning when done whatever the reason

function setQuote(quote, author){
	// Set quote and author in visually appealing way
  quote.replace(";", ",");

	// Set up the tweet button with new quote
	var tweet = "https://twitter.com/intent/tweet?text=" + encodeURI(quote + "-" + author) + "&via=balatsch&related=FreeCodeCamp";
	$(".tweet").attr( "tweet", tweet);
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................