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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <div class ="container-fluid">
  <h1><img src =" https://s3-us-west-2.amazonaws.com/web-design-ext-production/p/Twitch_474x356.png"></h1>
   
  
 
   <div class="row"><div class="col-sm-4 offset-4 col-xs-4 offset-4  firstrow">
     <span>
     <form class="inner-addon left-addon" id ="formData">
  <i class="glyphicon glyphicon-search">
   </i>
   
    
 <input type ="text" id ="Search"/>
  
   
  
      
    </div> 
        </span>
 </div>
  
    </form>
   
    <div class="btn-group-justified">
      <div class="btn-group">
  <button type="button" class ="btn btn-primary"id ="allbutton"> ALL
    </button>
        </div>
      <div class="btn-group">
    <button type="button" class ="btn btn-success" id ="onlinebutton">ONLINE
    </button>
        </div>
        <div class="btn-group">
    <button type="button" class ="btn btn-danger" id ="offlinebutton">OFFLINE
    </button>
         
    </div>
      </div>
    <div class ="freecodecamp">
     
    </div>
  <div class ="col1">
      </div> 
  </div>
   <div id= "footer"> <p>cybersyllables</p></div>
    
   
   
  
  
  
 
              
            
!

CSS

              
                .container-fluid{
  border:65px solid black;
  
}

h1 img{
 width:100%; 
 margin:auto;
}

span{
  display:inline-block;
}



.inner-addon{
 
}

.inner-addon .glyphicon{
 
  
}

.left-addon .glyphicon{ 
 
}

.firstrow{
 
}




.freecodecamp{
  text-align:center;
  font-size:2em;
  height:5%;
}

#submitb{
  font-size:18px;
  color:blue;  
}


#Search{
 width:10%;
  border:solid;
  font-size:24px;
  color:blue;
}



    



.row{
  padding:5px;
  border-radius:5px;
  margin-top:5px;
  margin-bottom:5px;
  text-align:center;
  vertical-align:middle;
  box-shadow:  4px  #888888;
}

.onlinecolor {
    background: linear-gradient(to right,#072800 0%,#c1f7b7 100%);
}


 .offlinecolor{
    background: linear-gradient(to right, #ff0000 0%,#ffb7b7 100%);
}

.displayname{
 font-size:30px;
  font-style:cheltenham;
  color:white;
}

.btn-group-vertical{
  width:90%;
  margin-bottom:10px;
  margin-right:50px;
  margin-left:50px;
}

.btn-group{
  margin-top:10px;
  border-radius:30%;
}
  
.statusdisplay{
  } 

.displaygame{
  
}

.statbox{

}

.profilelogo{
  border:3px solid black;
  padding:2px white;
}




.col1{
  postion:relative;
  top:0px;
  left:0px;
  font-weight:bold;
  p:color-black;
  
  
}

#footer{
  background-color:black;
  border:solid 1px white;
  font-size:20px;
  p-color:white;
  height:30px;
  width:100%;
  margin-bottom:0px;
  
}



              
            
!

JS

              
                var channel = [
  "ESL_SC2",
  "OgamingSC2",
  "cretetion",
  "freecodecamp",
  "storbeck",
  "habathcx",
  "RobotCaleb",
  "noobs2ninjas",
  "brunofin",
  "comster404"
];

var searchbuttonchannels = [];
var input = "";
var steamstatus = "";
var onnow = 1;
var offlinenow = 1;
var mainfeature = 0;
var currentgame;
var doesnotexist = " does not exist ";
var cleanarray = [];
var searchTerm="";
var loading ="<p>loading</p>";

function loadanimate(){

$(".freecodecamp").animate({
                fontSize: "60px"
            }, 3000);
  $(".freecodecamp").animate({
                fontSize: "20px"
            }, 3000);
}

$(document).ready(function() {
  function remover(channelname1 ,channelarray1){
  $.getJSON(
    "https://wind-bow.gomix.me/twitch-api/channels/"+channelname1+"?&callback=?",
    function(data1) {
      if (data1.name !== undefined) {
         console.log(data1.name);
        cleanarray.push(channelname1);
      }
      else{
        $(".freecodecamp").append("<p>"+channelname1+ " does not exist</p>");
        
         }
      
    }); 
  }
      
  channel.forEach(remover);
  console.log(cleanarray);
 

  function all() {
    
    function myfunction(channelname, channelarray) {
      $.getJSON(
        "https://wind-bow.gomix.me/twitch-api/channels/" +
          channelname +
          "?&callback=?",
        function(data) {
          var channeluser = data.url;
          var channelimage = data.logo;
          var channelviews = data.views;
          var channelfollowers = data.followers;
          var channelstatus = data.status
          console.log(data);
          console.log(channelfollowers);
            if (data.name == null) {
              $(".freecodecamp").empty();
$(".freecodecamp").append("<p>"+channelname+ " does not exist </p>");
       return;
          }
      
       

      $.getJSON(
        "https://wind-bow.gomix.me/twitch-api/streams/" +
          channelname +
          "?&callback=?",
        function(datastream) {
          if (datastream.stream === null && offlinenow == 1) {
            console.log(datastream);
             $(".freecodecamp").empty();
            streamstatus = "offline";
            input =
              "<div class='row offlinecolor'><div class = 'col-sm-4'><a href='" +
              channeluser +
              "'> <img class='profilelogo img-circle img-responsive' src ='" +
              channelimage +
              "'alt='No Image available'></div><div class = 'col-sm-4 displayname'><p>" +
              channelname +
              "</p></a>" +
              "<p>" +
              streamstatus +
              "</p></div><div class = 'col-sm-4'><p>VIEWS  "+channelviews+"</p><p>FOLLOWERS "+channelfollowers+"</p><p>STATUS "+channelstatus+"</p></div></div>";

            $(".col1").append(input);
          } else if (datastream.stream !== null && onnow == 1) {
             $(".freecodecamp").empty();
            currentgame = datastream.stream.game;
            streamstatus = "online";
            input =
              "<div class='row onlinecolor'><div class = 'col-sm-4'><a href ='" +
              channeluser +
              "'> <img class='profilelogo img-circle img-responsive' src ='" +
              channelimage +
              "'alt='no image available'><p></div><div class='col-sm-4 displayname'>" +
              channelname +
              "</a>" +
              "<p>" +
              streamstatus +
              "</p>" +
              "<p>" +
              currentgame +"</p></div><div class ='col-sm-4'><p> views "+channelviews+"</p><p>followers "
              +channelfollowers+"</p><p>STATUS "+channelstatus+"</p></div></div>";
              
           

            $(".col1").append(input);
          }
        });
     

      //streamstatus = "";

      
              
         
      
          });

     
        }
      
      

      if (mainfeature == 1) {
        cleanarray.forEach(myfunction);
      }
      if (mainfeature === 0) {
        searchbuttonchannels.forEach(myfunction);
      }
      searchbuttonchannels = [];
          
    }
        
  

  $("#allbutton").click(function() {
    $(".col1").empty();
    $(".freecodecamp").empty();
     $(".freecodecamp").append(loading);
    loadanimate();
    mainfeature = 1;
    onnow = 1;
    offlinenow = 1;
    stopanimate=1;
    all();
   
  });

  $("#onlinebutton").click(function() {
    $(".col1").empty();
    $(".freecodecamp").empty();
    $(".freecodecamp").append(loading);
    loadanimate();
    mainfeature = 1;
    onnow = 1;
    offlinenow = 0;
    all();
    
    
  });

  $("#offlinebutton").click(function() {
    $(".col1").empty();
    $(".freecodecamp").empty();
     $(".freecodecamp").append(loading);
    loadanimate();
    mainfeature = 1;
    onnow = 0;
    offlinenow = 1;
    all();
   
  });

  $("#formData").click(function(event) {
    $("#Search").animate({ width: "100%" });
    mainfeature = 0;
    event.preventDefault();
    $(".freecodecamp").empty();
     $(".freecodecamp").append(loading);
    loadanimate();
    $(".col1").empty();

    searchTerm = $("#Search").val();
    searchbuttonchannels.push(searchTerm);

    all();
  });
  
});
     

              
            
!
999px

Console