css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Press+Start+2P" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Dancing+Script" rel="stylesheet">

</head>
<body>
  <div class="clouds_one"></div>
<!--   <div class="clouds_two"></div> -->
  <div class = "container draggable">
    <div class = "row">
      <div class = "col text-center quote-box">
        <h1 id = "quote-text" class="quote-text">
        </h1>
        <h2 id = "author" class = "quote-text text-right"></h2>
        </div> <!-- close col  -->
    </div> <!-- close row -->
    <div id = "button-row" class= "row">
      <div id = "button-box" class = "col d-flex">
        <div class = "fa-div"><i class="fab fa-twitter fa-2x"></i></div>
        <div class = "fa-div mr-auto"><i class="fab fa-facebook fa-2x"></i></div>
        <div id = "quote-button" class = "noselect">New Quote</div>
      </div> <!-- close col  -->
    </div> <!-- close row -->
    <div class = "row">
      <div class = "col footer text-right"><p class = "signature ">dayna blackwell</p></div>
    </div>
  </div> <!-- close container -->
</body>

            
          
!
            
              .noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome and Opera */
}

.clouds_one {
  background: url("http://www.scri8e.com/stars/PNG_Clouds/zc06.png?filename=./zc06.png&w0=800&h0s=289&imgType=3&h1=50&w1=140");
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 300%;
  -webkit-animation: cloud_one 50s linear infinite;
  -moz-animation: cloud_one 50s linear infinite;
  -o-animation: cloud_one 50s linear infinite;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0)
}

.clouds_two {
  background: url("http://freepngimages.com/wp-content/uploads/2016/02/clouds-transparent-background-2.png");
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 300%;
  -webkit-animation: cloud_two 75s linear infinite;
  -moz-animation: cloud_two 75s linear infinite;
  -o-animation: cloud_two 75s linear infinite;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  -o-transform: translate3d(0, 0, 0)
}

@-webkit-keyframes cloud_one {
  0% {
    left: 0
  }
  100% {
    left: -200%
  }
}

@-moz-keyframes cloud_one {
  0% {
    left: 0
  }
  100% {
    left: -200%
  }
}

@-webkit-keyframes cloud_two {
  0% {
    left: 0
  }
  100% {
    left: -200%
  }
}

@-moz-keyframes cloud_two {
  0% {
    left: 0
  }
  100% {
    left: -200%
  }
}

.container{
/*   position: relative; */
  top: 110px;
/*   width: 60%; */
  max-width: 500px;
  height: auto;
  overflow: hidden;
  
  
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  
}

body{
  background-color: lightblue;
/*   background: url(https://pixabay.com/get/eb31b90b28f4033ed1534705fb094197e171e0dc1eac104494f7c67aa3e4b5bd/halftone-2484002_1920.jpg) no-repeat fixed center; */
/*   background: url("https://pixabay.com/get/eb31b90c28f7003ecd1f4204e44a449fe46ae3d018b6164290f5c27a/dot-2483031.png") no-repeat  fixed ; */
  background: url("http://www.daynajblackwell.com/images/tilesetOpenGameBackground.png") no-repeat center center fixed;
  background-size: cover;
  
  overflow-y: hidden;
  overflow-x: hidden;
  
}

.quote-box{
  background: #B4E1FF;
  opacity: .75;
/*   border: 5px solid bisque; */
/*   max-width: 500px; */
  border-radius: 20px 20px 0px 0px;
}

.quote-text{
  font-family: 'Press Start 2P', cursive;
  font-size: 1.2em;
  color: grey;
  
/*   color: #F1FAFF; */
  padding: 25px 20px;
/*   margin:25px; */
}

h2{
  padding-right:20px;
}

#button-box{
/*   display: flex; */
  opacity: .75;
  background: #B4E1FF;
  width: 50%;
  height: auto;
/*   border-top: 2px dashed darkslateblue; */
  border-radius: 0px 0px 20px 20px;
  justify-content: space-between;

}

.fa-div{
  display: inline-block;
/*   background: black; */
  padding: 6px;
  margin: 7px;
/*   border-radius: 15px 15px 15px 15px; */
}

.fab:hover{
  color: azure;
  opacity: .9;
}

.fa-facebook{
  
}

#quote-button{
  font-family: 'Press Start 2P', cursive;
  /*   display: inline-block; */
  background-color: #5ABDFD;
  width: auto;
  height: auto;
/*   text-align: center; */
  padding: 10px;
  margin: 10px;
  border-radius: 20px;
  border: 1px inset black;
}

#quote-button:hover{
    background-color: azure !important;
    color: #5ABDFD;
    opacity: .9;
  }

#quote-button:active,.fab:active{color: grey;}

.footer{
  font-family: 'Dancing Script', cursive;

  
}
.signature{
  font-size: 1em;
  color: #5ABDFD
}
.signature:hover{
  color: black;
}
            
          
!
            
              $(document).ready(function()
{
  var twitterUrl;
  var author = $('#author');
  // console.log(author);
  var quote = $('#quote-text');
  newQuote(author, quote);
  
   function newQuote(author, quote)
  { // author is the h2 element which holds the author information
  // quote is the h1 element which holds the quote information.
    
    // URL to the API
    var forismaticURL = "https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?";
  
    $.getJSON(forismaticURL, function success(data) 
    { // send AJAX request; success(data) is the callback function which runs 
      //when JSON request is successful.  data contains the information returned 
      // by the server in response to the AJAX request.
    
      twitterUrl = 'https://twitter.com/intent/tweet?hashtags=quotes&text='+encodeURIComponent( data.quoteText )+encodeURIComponent("- " + data.quoteAuthor);
    
      quote.html(data.quoteText);
      if (data.quoteAuthor) 
      {
        author.html(data.quoteAuthor);
        author.attr("href", data.quoteLink);
      } 
      else 
      {
        author.removeAttr("href");
      // author.html("<strong>Anonymous</strong>");
      }
    });
  }
  
  $('#quote-button').click(function(event) 
  {
    event.preventDefault();
    newQuote(author, quote);
  });
  
  $(".fa-twitter").click(function(event)
  {
    alert(twitterUrl);
    window.open(twitterUrl, '_blank');
  });
});  
  
            
          
!
999px
🕑 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 ..................

Console