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.

            
              
<!----header---->
<body>
<div>
  <h4 style="color: black" align="center"> Random Quote Machine</h4>
</div>
<!--random quote machine-->
<div class="quotebox">
<!--box/holder-->
  <div class="quotes" id="quoteDisplay">	
    <p>"Random Quote"</p>
    <p>"Quote Author"</p>
  </div>
<!--link to twitter-->
  <div>
    <!--Changes size of button-->
   <div class="col-xs-4">
     <a id="tweetCurrentQuote" href="https://www.twitter.com/intent/tweet" target="_blank"><button class="btn btn-block btn-social"><i class="fa fa-twitter">tweet</i></button></a> 
    </div>
  </div>
<!--button for new quote-->
  <div>
    <div class="col-xs-8">
      <button class="btn btn-block" onclick="newQuote()">New Quote</button>
        <!--<script src="javascript.js"></script>-->
      </div>
    </div>
    
</div>
<!----footer---->
<div>
  <h4 style="color: black">by Kevin Robertson</h4>
</div>


            
          
!
            
              /*  <!--font awesome-->*/
@import url(//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css");

 /* <!--min-->*/
@import url(//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css");

  body {
  text-align: center;
	background: grey;
	padding: 12px 12px;
	border-radius: 100%;
  font-size: 18px;
  color: dark grey;
  text-shadow: black 1px 1px;
  margin: auto;
  font-family: Tahoma, Geneva, sans-serif;
 
  }
 
 .quotebox {
  border-radius: 2%;
  margin: 2% auto 2% auto;
  position: relative;
  width: 500px;
  padding: 45px;
  background-color: #545454;
  }
  
  .quotes {
    margin: 35px;
    color: #f2b703;
  }




            
          
!
            
              
var quotes = [
	'A kite needs to be tied down in order to fly. I learned how important restrictions can sometimes be in order to experience freedom. -Damien Rice',
	'Think...of a piano. It has not got two kinds of notes on it, the \'right\' notes and the \'wrong\' ones. Every single note is right at one time and wrong at another. -C.S. Lewis',
	'It is better to apply the one thing you know, than to know 1,000 things and never take action. -Nick Rikkard',
	'Do what you can with what you have. \n -Anonymous',
	'The secret of life, though, is to fall seven times and to get up eight times. -Paulo Coelho',
	'Everything around you that you call life was made up by people that were no smarter than you and you can change it, you can influence it, you can build your own things that other people can use. Once you learn that, you\'ll never be the same again. -Steve Jobs',
	'The opposite of love is not hate, it\'s indifference. The opposite of beauty is not ugliness, it\'s indifference. The opposite of faith is not heresy, it\'s indifference. And the opposite of life is not death, but indifference between life and death. -Elie Wiesel',
	'It\'s kind of fun to do the impossible. -Walt Disney',
	'The only thing necessary for the triumph of evil is that good men should do nothing. -Anonymous',
	'I dare you to ask God to break your heart with the things that break His. -Adam Donyes',
	'Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives. -William A. Foster',
	'Everyone has some hidden, amazing thing about them. -Celeste Headlee',
	'I learned long ago to focus on things you can control and don\'t even pay attention to things you don\'t. \n -Bryan Cranston',
  'There will be a time when we must choose between what is easy and what is right. -Albus Dumbledore',
]

function newQuote() {
	var randomNumber = Math.floor(Math.random() * (quotes.length));
	document.getElementById('quoteDisplay').innerHTML = quotes[randomNumber];
  var currentQuote = quotes[randomNumber];
  document.getElementById('tweetCurrentQuote').href = "https://twitter.com/intent/tweet/?text="+ currentQuote;
}


            
          
!
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.

Console