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>
  <h1>Writer's Un<span class="block">block</span></h1>
  <span class="subtitle">A creative app to help with writer's block.</span>
  <hr>
  <span class="about"><br/>When you load the page, you will see two completely random and unrelated English words appear on the screen. Use these word prompts to get your creative juices flowing and get an idea for a story, poem, or some other form of content. If you want a new prompt, just click "new words" and a fresh prompt will appear.</span>
  <span id="spacer"></span>
  <dt></dt>
  <dd></dd>
  <p>new words</p>
  <span class="creds">Made with &hearts; by <a href="http://kennethalvares.com" target="_new" style="color: #fff;">Kenneth Alvares</a>
</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Pacifico')
@import url('https://fonts.googleapis.com/css?family=Lato')
  
body
  background-color: #669999
  color: #e0ffff
  font-family: 'Lato', sans-serif
  
dt
  display: none
  font-size: 60px
  font-weight: 400
  max-width: 100vw
  max-height: 100vh
  
dd
  display: none
  font-size: 26px
  font-weight: 100
  max-width: 100vw
  max-height: 100vh
  
  
p
  display: none
  color: #334f4f
  border-radius: 7px
  border: 3px solid #334f4f
  font-size: 24px
  text-decoration: none
  padding: 7px
  margin-left: 40px
  font-family: 'Lato', sans-serif
  &:hover
    background-color: #334f4f
    color: #669999
  
div
  text-align: center
  height: 97.7vh
  display: flex
  flex-direction: column
  align-items: center
  
hr
  width: 75%
  display: none
  
.subtitle
  display: none
  
h1
  font-family: 'Lato', sans-serif
  display: none
  letter-spacing: 5px
  
.block
  margin: 1px
  border: 2px solid #e0ffff
  background-color: #e0ffff
  color: #669999
  font-family: 'Pacifico', cursive
  padding: 7px
  padding-top: 0
  padding-bottom: 0
  border-radius: 5px
  
.about
  width: 75%
  display: none
  
#spacer
  height: 100px
  
.creds
  display: none
            
          
!
            
              jQuery(document).ready(function($) {
  $('h1').fadeIn(2000);
  $('.about').fadeIn(2000);
  $('.subtitle').fadeIn(2000);
  $('hr').fadeIn(2000);
  $('p').fadeIn(3000);
  $('.creds').fadeIn(3000);
 $.get('https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt', function(data) {
        var quotes = data.split("\n");
        var idx = Math.floor(quotes.length * Math.random());
        $('dt').html(quotes[idx]).fadeIn(3000);
   });
  $.get('https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt', function(data) {
        var quotes = data.split("\n");
        var idx = Math.floor(quotes.length * Math.random());
        $('dd').html(quotes[idx]).fadeIn(3000);
   });
});

$("p").click(function(){
  $('dt').fadeOut(500)
  $('dd').fadeOut(500)
  $('p').fadeOut(500)
  var delay = 500;
  setTimeout(function() {
    $.get('https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt', function(data) {
        var quotes = data.split("\n");
        var idx = Math.floor(quotes.length * Math.random());
        $('dt').html(quotes[idx]).fadeIn(500);
   });
  $.get('https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt', function(data) {
        var quotes = data.split("\n");
        var idx = Math.floor(quotes.length * Math.random());
        $('dd').html(quotes[idx]).fadeIn(500);
    $('p').fadeIn(500);
   });
      }, delay);
});
            
          
!
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