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.

            
              <body>
  <div class = "page container-fluid">
    <div class = "spacer"></div>
    <div class = "block col-md-12 text-center">
      <h1 class= "col-md-12">Twitch TV</h1>
      <!-- following div sections display logo's and create a section for info for each twitch streamer -->
      <div class = "col-md-12 well-class well"><a href = "https://www.twitch.tv/freecodecamp" target = "_blank"><h3>freecodecamp<span id = "fcc">...</span><img class="img col-md-2" src = "https://static-cdn.jtvnw.net/jtv_user_pictures/freecodecamp-profile_image-d9514f2df0962329-300x300.png"></h3></a></div>
      
   <div class = "col-md-12 well-class well"><a href = "https://www.twitch.tv/ESL_SC2" target = "_blank"><h3>ESL_SC2<span id = "ESL">...</span><img class = "img col-md-2" src= "https://static-cdn.jtvnw.net/jtv_user_pictures/esl_sc2-profile_image-d6db9488cec97125-300x300.jpeg"></h3></a></div>
      
    <div class = "col-md-12 well-class well"><a href = "https://www.twitch.tv/RobotCaleb" target = "blank"><h3>RobotCaleb<span id = "RC">...</span><img class = "img col-md-2" src = "https://static-cdn.jtvnw.net/jtv_user_pictures/robotcaleb-profile_image-9422645f2f0f093c-300x300.png"></h3></a></div>
      
    <div class = "col-md-12 well-class well"><a href = "https://www.twitch.tv/noobs2ninjas" target = "blank"><h3>noobs2ninjas<span id = "n2n">...</span><img class = "img col-md-2" src = "https://static-cdn.jtvnw.net/jtv_user_pictures/noobs2ninjas-profile_image-34707f847a73d934-300x300.png"></h3></a></div>
      
    <div class = "col-md-12 well-class well"><a href = "https://www.twitch.tv/habathcx" target = "_blank"><h3>habathcx<span id = "hab">...</span><img class = "img col-md-2" src = "https://static-cdn.jtvnw.net/jtv_user_pictures/habathcx-profile_image-d75385dbe4f42a66-300x300.jpeg"></h3></a></div>
      
   <div class = "col-md-12 well-class well"><a href = "https://www.twitch.tv/cretetion" target = "_blank"><h3>cretetion<span id = "cret">...</span><img class = "img col-md-2" src = "https://static-cdn.jtvnw.net/jtv_user_pictures/cretetion-profile_image-12bae34d9765f222-300x300.jpeg"></h3></a></div>
      
    <div class = "col-md-12 well-class well"><a href = "https://www.twitch.tv/OgamingSC2" target = "_blank"><h3>OgamingSC2<span id = "Oma">...</span><img class="img col-md-2" src = "https://static-cdn.jtvnw.net/jtv_user_pictures/ogamingsc2-profile_image-9021dccf9399929e-300x300.jpeg"></h3></a></div>  
 </div>
  </div>
</body>
    
   
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Alfa+Slab+One');
/*box-sizing: border-box added to each element for responsive design*/
body {
  background: url(https://www.twitch.tv/p/assets/uploads/glitch_474x356.png) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    box-sizing: border-box;
}
a{
  color: white;
  box-sizing: border-box;
}
h1 {
  font-size: 50px;
  font-family: Alfa Slab One, Veranda;
  color:  white;
  box-sizing: border-box;
}
.block {
  background-color: #35043b;
  opacity: .9;
  color: purple;
  padding: 50px;
  width: 75%;
  margin-right: auto;
  margin-left: auto;
  border-radius: 15px;
  font-size: 24px;
  padding-bottom: 2%;
  box-sizing: border-box;
}
.spacer {
  padding-top: 3%;
  box-sizing: border-box;
}
.img {
  box-sizing: border-box;
}
.well-class{
  background-color: black;
  opacity: .9;
  box-sizing: border-box;
}
/*used for responsive design, looks good on phones too*/
.col-md-1 {width: 8.33%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-2 {width: 16.66%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-3 {width: 25%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-4 {width: 33.33%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-5 {width: 41.66%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-6 {width: 50%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-7 {width: 58.33%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-8 {width: 66.66%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-9 {width: 75%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-10 {width: 83.33%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-11 {width: 91.66%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}
.col-md-12 {width: 100%;
            float: left;
            padding: 5px;
            border: 0px solid purple;}




            
          
!
            
              $(function(){
  //create an array of users
  var names = ["freecodecamp", "ESL_SC2", "RobotCaleb", "noobs2ninjas", "habathcx", "cretetion", "OgamingSC2"];
  var tags = ["#fcc", "#ESL", "#RC", "#n2n", "#hab", "#cret", "#Oma"] 
  //cycle through each user, and insert names property into JSON call
  names.forEach(function(el, ind, arr){
 $.getJSON("https://wind-bow.gomix.me/twitch-api/streams/" + el + "?callback=?").done(function(data){
   //if not currently streaming, replace HTML element id (tags same index as name) with OFFLINE
  if(data.stream == null){
    $(tags[ind]).html(' OFFLINE');
    //if currently streaming, replace HTML element id (tags same index as name) with Streaming now - (game they are playing)
  }else{(data.stream == true)
    $(tags[ind]).html(' Streaming Now - ' + data.stream.game);      
       } 
      });                                                                                            
     });
    });
            
          
!
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