Pen Settings

HTML

CSS

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

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <meta name="viewport" content="width=device-width" />
<html>

<body class="background container-fluid" background="https://images2.alphacoders.com/153/153450.jpg">
  <div id="container">
    <img class="imgtitle img-responsive" src="https://s.yimg.com/ny/api/res/1.2/iwW6YeuWTQIy5exg7VFDpw--/YXBwaWQ9aGlnaGxhbmRlcjtzbT0xO3c9ODAwO2lsPXBsYW5l/https://31.media.tumblr.com/0ae4ebb3646029914c7153a185c1961c/tumblr_inline_n5tzlytMFd1s9clfh.jpg">
    <!--<input id="search"></input>-->
    <nav id="tabs" class="container-fluid">
      <li><button href="#" data-tab="all" id="alltabs" class="tablinks current">All</button></li>
      <li><button href="#online" data-tab="online" id="onlinetab" class="tablinks">Online</button></li>
      <li><button href="#offline" data-tab="offline" id="offlinetab" class="tablinks">Offline</button></li>
    </nav>
    <div class="allusers">
      <div id="online" class="tab-content current"></div>
      <div id="offline" class="tab-content current"></div>
      <div id="inactive" class="tab-content current"></div>
    </div>
    
  </div>
</body>
  <footer>By <a href=https://www.freecodecamp.com/nickeyvee target='_blank'><strong>NickeeVee</strong></a></footer>
  </div>
<html>

</html>
              
            
!

CSS

              
                .background{ 
  font-family: roboto mono;
  background-size: 100%px;
  background-height: 80%;
  background-attachment: fixed;
  text-align: center;
  display: block;
}
#container{
  font-family: roboto mono;
  background-color: black;
  opacity: 0.8;
  padding: 1%;
  width: 420px;
  width-max: 90%;
  margin-right: auto;
  margin-left: auto;
  margin-right-min: 5%;
  margin-left-min: 5%;
}
.imgtitle{
  margin: auto;
  width-max: 40%;
  overflow: auto;
}
#search{
  border-radius: 8px;
  margin-bottom: 40px;
}
#tabs{
   margin-left: 5%;
}
#tabs li{
  float: left;
  width: 31.3%;
  display:block;
  overflow: auto;
  margin-bottom: 10px;
  text-decoration: none;
}
#tabs li button{
  font-size: 100%;
  border-radius: 50px;
  padding: 5%;
  overflow: auto;
  color: #897494;
  outline: none;
  background-color: black;
  width: 90%;
  border: solid grey 2px;
}
#tabs button:hover{
  color: white;
  background-color:#a48cb0;
}
#tabs button:focus{
  color: white;
  background-color:#897494; 
}
.row{
  font-size: 135%;
  padding-bottom: 75%;
  height-max: 100%;
  overflow: hidden;
  color: white;
  box-sizing: border-box;
  background-color: grey;
  width: 90%;
	height: 20%;
  max-height: 50%;
  border-radius:8px;
  margin: 5%;
  display: block;
  padding: 5%;
}
a:hover{
  text-decoration: none;
}
.allusers{
 padding: 10px;
 margin-bottom: 10px;
 background-size: 15px;
 display: block;
 padding: 20px;
}
#fccFollower .row .logo{
  border-radius: 50%;
  height: 20%;
  width: 20vw;
}
footer{
   font-size: 25px;
   margin: 15px;
   color: white;
}
footer a{
  color: white;
}
footer a:hover{
color: #65347e;
}
a .logo{
  width: 20%;
}

              
            
!

JS

              
                $(document).ready(function() {
  var names = [
    "ESL_SC2",
    "OgamingSC2",
    "cretetion",
    "freecodecamp",
    "storbeck",
    "habathcx",
    "RobotCaleb",
    "comster404",
    "brunofin",
    "adobe"
  ];
  //Test these inactive accounts: , "comster404", "brunofin"
  var notAvail =
    "http://vignette2.wikia.nocookie.net/walkingdead/images/6/67/Question_Mark.JPG/revision/latest?cb=20131020011512",
    userURL = "https://api.twitch.tv/kraken/users/",
    streamURL = "https://api.twitch.tv/kraken/streams/",
    link = "https://www.twitch.tv/",
    cb = "?client_id=75d3ro6frttsp0kmj24osvylzyib5db";

  names.forEach(function(user) {
    $.getJSON(streamURL + user + cb, function(data) {
      console.log(streamURL + user + cb);
      //console.log(data);
      //function to hold all of user information.

      function addUser(id, displayName, logo, status) {
        $(id).prepend(
          "<a href=https://twitch.tv/" +
            user +
            " target='_blank' class='row current'><img class='col-md-3 logo img-responsive' src='" +
            logo +
            "'><div  class='displayName'>" +
            displayName +
            "</div><div class='status game'>" +
            status +
            "</div></a>"
        );
      }
      if (data.error) {
        //console.log(data.error)
        addUser("#inactive", user, notAvail, data.error);
      } else if (data.stream) {
        $.getJSON(userURL + user + cb, function(data2) {
          //console.log(data2); //TEST
          addUser("#online", data2.display_name, data2.logo, data.stream.game);
          $("#online .row").css({
            background: "#897494",
            "font-color": "white"
          });
          $("#online .row");
        });
      } else {
        $.getJSON(userURL + user + cb, function(data2) {
          console.log(data2); //TEST
          addUser("#offline", data2.display_name, data2.logo, "Offline");
        });
      }
    });
  });
});

$("#alltabs").click(function() {
  $(".allusers .tab-content").show();
});
$("#onlinetab").click(function() {
  $("#online").show();
  $("#online").siblings().fadeOut(500);
});
$("#offlinetab").click(function() {
  $("#offline").show();
  $("#offline").siblings().hide();
});

              
            
!
999px

Console