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.

            
              <div class="container">
  <h1><br>Jurassic Ipsum</h1>
  <button onclick="generateIpsum('ipsum');">Hold onto your butts</button><button onclick="clearIpsum('ipsum')" class="gray">Clear</button>
  <div id="ipsum"></div>
</div>
            
          
!
            
              @font-face {
  font-family: "JurassicPark";
  src: url("https://gitcdn.xyz/repo/AllThingsSmitty/fonts/master/JurassicPark/JurassicPark.woff2") format("woff2"),
    url("https://gitcdn.xyz/repo/AllThingsSmitty/fonts/master/JurassicPark/JurassicPark.woff") format("woff")
}
body,
html {
  height: 100%
}
html {
  background: #f1f2f3;
  -webkit-font-smoothing: antialiased;
}
body {
  background: #fff;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.06);
  font-family: "Open Sans", sans-serif;
  margin: 0 auto;
  max-width: 800px;
}
.container {
  background: #fff;
  border-top: 20px solid #f44336;
  padding: 2em;
  text-align: center;
}
h1 {
  font-family: "JurassicPark";
  font-size: 10em;
  font-weight: normal;
  line-height: .65;
  margin: 0 0 .1em;
}
h1:before {
  content: "*";
}
button {
  background: #f44336;
  border: none;
  border-radius: 3px;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .5);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  margin: 0 .5em 1em;
  padding: 1em;
  text-transform: uppercase;
}
.gray {
  background: #ccc;
  color: #111;
}
p {
  line-height: 1.75;
  padding-bottom: 1em;
  text-align: left;
}  
            
          
!
            
              //https://github.com/AllThingsSmitty/anything-ipsum

let quotes = [
  'Don\'t get cheap on me, Dodgson.',
  'I bring scientists, you bring a rockstar.',
  'It\'s...it\'s a dinosaur...',
  'Are these characters...auto...erotica?',
  'There\'s no unauthorized breeding in Jurassic Park.',
  'How do you know they\'re all female?',
  'Does somebody go out into the park and pull up the dinosaurs\' skirts?',
  'You bred raptors?',
  'Quick for a biped?',
  'They show extreme intelligence, even problem-solving intelligence.',
  'Don\'t you see the danger, John, inherent in what you\'re doing here?',
  'Yeah, but your scientists were so preoccupied with whether or not they could that they didn\'t stop to think if they should.',
  'The only one I\'ve got on my side is the blood-sucking lawyer.',
  'He\'s gonna eat the goat?',
  'T-Rex doesn\'t want to be fed.',
  'Dinosaurs eat man; woman inherits the earth.',
  'Dennis, our lives are in your hands and you\'ve got butterfingers?',
  'Now eventually you do plan to have dinosaurs on your dinosaur tour?',
  'I really hate that man.',
  'I told you, how many times, we needed locking mechanisms on the vehicle doors!',
  'That is one big pile of shit.',
  'Why didn\'t I build it in Orlando?',
  'Check the vending machines.',
  'I\'m always on the lookout for a future ex-Mrs. Malcolm.',
  'When you gotta go, you gotta go.',
  'Boy, do I hate being right all the time.',
  'Ian, freeze!',
  'Well, at least you\'re out of the tree.',
  'I hate this hacker crap!',
  'Remind me to thank John for the wonderful weekend.',
  'Must go faster!',
  'Bloody move!',
  'White rabbit object: whatever it did, it did it all.',
  'What about the lysine contingency?',
  'Dr. Wu inserted a gene that makes a single faulty enzyme in protein metabolism.',
  'Uh uh uh!...You didn\'t say the magic word!',
  'I can\'t get Jurassic Park back online without Dennis Nedry.',
  'Hold onto your butts.',
  'I can afford more glasses!',
  'I thought you were one of your big brothers.',
  'I\'m gonna run you over when I come back down!',
  'Amphibian DNA.',
  'Look at all the blood.',
  'We spared no expense.',
  'Because we\'re being hunted.',
  'Clever girl.',
  'It\'s a Unix system, I know this!',
  'It\'s gonna come through the glass!'
];

function generateIpsum(e) {
  let minCount = 5,
    maxCount = 13,
    ipsum = Math.floor(Math.random() * (maxCount - minCount)) + minCount,
    ret = '';
  
  for (i = 0; i < ipsum; i++) {
    let newIpsum = quotes[Math.floor(Math.random() * (quotes.length - 1))];
    ret += newIpsum + ' ';
  }
  
  document.getElementById(e).innerHTML = document.getElementById(e).innerHTML + '<p>' + ret + '</p>';
}

function clearIpsum(e) {
  document.getElementById(e).innerHTML = '';
}
            
          
!
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