123

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://fonts.googleapis.com/css?family=Rubik" rel="stylesheet">

</head>
  <body >
  <div id = "topbar" class = "container-fluid text-center">
  <h1 style = "text-align: center";><font size = "25px"> Quote 'em up!</font>
    </h1>
  </div>
  
    <div class = "text-center">
  <div  class= "container-fluid" >
    <h2 id="quotey"></h2>
    </div>
  <button onclick ="randomQuote()"> Push me </button>
    <a href="https://twitter.com/share" class="twitter-share-button" data-show-count="false">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>

  
  
  
  
<script src="javascript.js"></script>
  
</body>
            
          
!
            
              body {background-color: #42aaf4; }
h1 {font-family: Rubik;}
#buttons {text-align: center;}
#topbar {margin: 30px;
color: #beedbb;}
            
          
!
            
              var quote = ["How many cares one loses when one decides not to be something but to be someone. -Gabrielle “Coco” Chanel" 
                , 
 "Be who you are and say what you feel, because those who mind don’t matter and those who matter don’t mind. -Dr. Seuss"
                ,
  "Imitation is suicide. -Ralph Waldo Emerson"
                ,
  
"Do your own thing on your own terms and get what you came here for. -Oliver James"
                ,
 "Flatter yourself critically. -Willis Goth Regier"
                ,
  "Do what you feel in your heart to be right, for you’ll be criticized anyway. -Eleanor Roosevelt"
               ,
"Whenever you find yourself on the side of the majority, it is time to pause and reflect.-Mark Twain"
                ,
"I will not let anyone walk through my mind with their dirty feet. -Mahatma Gandhi"
                ,
"Better to write for yourself and have no public, than to write for the public and have no self. -Cyril Connolly"
                ,
"We must not allow other people’s limited perceptions to define us. -Virginia Satir"
                ,
"Don’t look for society to give you permission to be yourself. -Steve Maraboli"
                ,
"If things go wrong, don’t go with them. -Roger Babson"
                ,
"Wanting to be someone else is a waste of who you are. -Kurt Cobain"
                ,
"Tension is who you think you should be. Relaxation is who you are. -Chinese Proverb"
                ,
"Where’s your will to be weird? -Jim Morrison"
          ];

function randomQuote() {
var randomX = Math.floor(Math.random() * 15);
document.getElementById("quotey").innerHTML = quote[randomX] ;

}


            
          
!
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