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


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


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.


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.


                <div id="wrap">
  <div id="main" class="container clear-top text-center">
    <!-- quote card -->
    <div class="jumbotron">
      <blockquote class="blockquote-reverse">
        <i class="fa fa-quote-left fa-3x fa-pull-left" aria-hidden="true"></i>
        <p id="quoteText">...</p>
        <div id="quoteAuthor" class="quote-author"></div>
    </div><!-- jumbotron -->

    <!-- buttons -->
    <div class="container-fluid">
      <!-- warning icon -->
      <a id="warningIcon" href="#" title="There seem to be a problem loading the quote. Try again, or come back after a break." class="invisible">
        <span id="">
          <i class="fa fa-exclamation-triangle fa-1x" aria-hidden="true"></span></i>
      <!-- refresh button -->
      <a id="refreshAnchor" href="#">
        <span id="refreshButton" class="fa-stack fa-lg fa-rw">
          <i class="fa fa-square-o fa-stack-2x"></i>
          <i id="spinButton" class="fa fa-refresh fa-stack-1x"></i>

      <!-- twitter button -->
      <a id="twitterButton" href="" target="_blank">
        <span class="fa-stack fa-lg fa-rw">
          <i class="fa fa-square-o fa-stack-2x" aria-hidden="true"></i>
          <i class="fa fa-twitter fa-stack-1x" aria-hidden="true"></i>
    </div><!-- container-fluid -->
  </div><!-- container -->
</div><!--   wrap -->
<!-- footer -->
<footer class="bg-footer footer-app-colophon text-gray-light text-sm text-center">
  <p>Bootstrap Theme designed and coded with &nbsp;<i class="fa fa-star fa-1" title="love" aria-hidden="true"></i>&nbsp; by 
    <a href="" title="lorepirri" target="_blank">me</a>



                  .container {
    padding: 70px 0px 70px 0px;

  .jumbotron {
    background-color: #efab95;
    margin-left: 2%;
    margin-right: 2%;
    padding-bottom: 10px;
    margin-bottom: 10px;

  .jumbotron p {
    color: #435071;
    font-size: 21px;

  blockquote {
    color: #719ac1;
    font-size: 18px;

  body {
    color: #435071;
    font-size: 14px;
    font-weight: 300;
    font-family: RobotoDraft, Roboto, sans-serif;

  a {
    color: #435071;
    text-decoration: none;
  a:hover {
    color: #719ac1;
    text-decoration: none;

  .fa-twitter:hover {
    color: #1da1f2;
    text-decoration: none;

  .fa-exclamation-triangle {
    color: orange;
    text-decoration: none;

  text-decoration:none !important;
  /* */

  footer {
    font-size: 14px;
    font-weight: 300;
    padding-top: 30px;
    padding-bottom: 30px;
    color: grey;
    position: relative;
    margin-top: -60px; /* negative value of footer height */
    height: 60px;

html, body {
  height: 100%;

#wrap {
  min-height: 100%;

#main {
  padding-bottom:150px; /* this needs to be bigger than footer height*/



                function fixedEncodeURIComponent(str) {
  return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
    return '%' + c.charCodeAt(0).toString(16);

var defaultQuote = {"quoteText":"The key to growth is the introduction of higher dimensions of consciousness into our awareness. ", "quoteAuthor":"Lao Tzu", "senderName":"", "senderLink":"", "quoteLink":""}

function showWarning() {
    $("#warningIcon").toggleClass("invisible"); // show warning 
function hideWarning() {
    $("#warningIcon").addClass("invisible"); // hide warning
function waitForQuote() {
  $("#refreshAnchor").bind('click', false); // disable
  $("#spinButton").addClass('fa-spin'); // spin 
function readyQuote(thereWasAnError) {
  $("#refreshAnchor").unbind('click'); // enable
  $("#spinButton").toggleClass('fa-spin'); // stop spin 
  if (thereWasAnError) {
  } else {

function fetchRandomQuote() {
  waitForQuote(); // update UI
  // fetch the quote
  // in case of error, notify with an icon 
  // and return the default quote
    url: "",
    datatype: 'jsonp',
    error: function(err){
      readyQuote(true); // update UI
      setQuote(defaultQuote); // update UI
    success: function(result){
      readyQuote(false); // update UI
      setQuote(result); // update UI

function setQuote(quote) {
  // generate URL
  var url = fixedEncodeURIComponent("");
  var text =  fixedEncodeURIComponent('"' + quote.quoteText + '" [' + quote.quoteAuthor + "]");
  var tweetURL = ""+url+"&via=lorepirri&related=twitterapi%2Cfreecodecamp&hashtags=freecodecamp%2Crandomquotegenerator&text="+text;  
  // update link in the twitter button
  $("#twitterButton").attr('href', tweetURL);

  console.log("tweet set: " + tweetURL);  

$(document).ready(function() {
  // first quote
  $("#refreshButton").on("click", function() {
    fetchRandomQuote(); // fetch and update UI