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.

            
              <body class="gradient">
  <div class="container-fluid gradient">
 
      <h1 id = "header" class="text-center">RANDOM RIKER QUOTE</h1>
    <div id="riker" class="pull-left"></div>
    <div id="quotebox" class="center-block text-center">
      <div id="quote">Words of wisdom from Number One.</div>
      <button id="makeItSo" class="btn btn-danger">Make it so. <i class="glyphicon glyphicon-random"></i> </button>
    <div class="tweeter pull-right">
    <a class="button" id="tweetThis" title="Share the wisdom of Riker" target="_blank">
      <i class="fa fa-twitter"></i>
    </a>
    </div>
      </div>
    <div class="small text-center">Inspired by and sourced from <a href="http://www.rikeripsum.com">Riker Ipsum.</a></div>
  </div>
</body>
            
          
!
            
              .gradient {
  height: 100%;
  margin: 0;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-image: linear-gradient(to bottom, #a90329 0%, #6d0019 50%, #000000 100%);
}

#header {
  font-family: 'Rubik One', sans-serif;
  font-size: 400%;
  color: white;
  text-shadow: 2px 2px black;
  padding-bottom: 15px;
}

#quotebox {
  min-height: 200px;
  margin-top: 2px;
  padding: 30px;
  min-width: 50%;
  max-width: 85%;
  background-color: white;
  border: 10px solid #ccc;
  border-radius: 10px;
}

#quote {
  padding: 20px;
  font-family: 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 150%;
}
#riker {
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/672604/riker.png);
  background-size: cover;
  height: 200px;
  width: 200px;
  border: 10px solid #ccc;
  border-radius: 50%;
  margin-top: -20px;
}
.small {
  color: #ccc;
  padding: 10px;
}
.tweeter {
  font-size: 200%;
}
            
          
!
            
              $(document).ready(function() {
  var quotelist = ["My oath is between Captain Kargan and myself. Your only concern is with how you obey my orders. Or do you prefer the rank of prisoner to that of lieutenant?", "Yesterday I did not know how to eat gagh.", "I recommend you don't fire until you're within 40,000 kilometers.", "That might've been one of the shortest assignments in the history of Starfleet.", "We finished our first sensor sweep of the neutral zone.", "I'll be sure to note that in my log.", "Mr. Worf, you do remember how to fire phasers?", "Captain, why are we out here chasing comets?", "You're going to be an interesting companion, Mr. Data.", "I suggest you drop it, Mr. Data.", "Fear is the true enemy, the only enemy.", "We have a saboteur aboard.", "Shields up! Rrrrred alert!", "Besides, you look good in a dress.", "They were just sucked into space.", "The unexpected is our normal routine.", "When has justice ever been as simple as a rule book?", "Smooth as an android's bottom, eh, Data?"];
  var quote;

  $("#makeItSo").on("click", function(ev) {
    quote = "\"" + quotelist[Math.floor(Math.random() * quotelist.length)] + "\"";

    $("#quote").text(quote);
    //twitter
    $('#tweetThis').attr('href', 'https://twitter.com/intent/tweet?&text=' + encodeURIComponent(quote + '- Commander Riker'));
  });
});
            
          
!
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