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

              
                <body>
  <article>
    <header>
      <nav>
        <ul class="menu">
          <li><figure>
            <img src ="http://www.gamezone.de/screenshots/1280x1024/2016/06/Twitch-buffed.PNG" alt="twitch-logo">
            </figure></li>
          <li id ="all"><h6><a href="#">ALL</a></h6></li>
          <li id ="online"><h6><a href="#">Online</a></h6></li>
          <li id ="offline"><h6><a href="#">Offline</a></h6></li>
        </ul>
      </nav>
    </header>
  </article>
  <main class="grid-container fluid">
    <div class="grid-x grid-margin-x">
      <div class="cell medium-4" id="result">
        <h3 id="fcc-status"><a href = "https://www.twitch.tv/freecodecamp" target = "blank">FreeCodeCamp</h3></a>
      </div>
    </div>
    
  </main>
  <footer class="social-footer">
      <div class="social-footer-icons">
          <ul class="menu align-center">
              <li><a href="https://www.linkedin.com/in/nadia-ardon-5a021772" target="_blank"><i class="fab fa-linkedin"></i></i></a></li>        
             <li><a href="https://npardon.github.io/myportfolio/" target="_blank"><i class="fab fa-github-square"></i></a></li>
            <li><a href="https://www.freecodecamp.org/npardon" target="_blank"><i class="fab fa-free-code-camp"></i></a> </li>
            <li><a href="https://codepen.io/npardon/#" target="_blank"><i class="fab fa-codepen"></i></a></li>
          </ul>
      </div>
    </footer>
  
</body>
              
            
!

CSS

              
                $body-background:#d1d3d6;
$heading: #b548f9;
$social-links: #b548f9;

body{
 background: $body-background;
}


img{
  height:200px;
  width: 200px;
}

H6{
  font-family:"Times New Roman", sans-serif;
  color: $heading;
}
h3{
  font-family:"Times New Roman", sans-serif;
  color: $heading; 
}
.social-footer{
  padding: 1rem;
  justify-content: space-between;

social-footer-icons{
  li:last-of-type{
    margin-right:0;
  }
}
.fab{
  font-size: 1.3rem;
  color:$social-links;
  
  &:hover{
    color: darken($social-links, 25%);
    transition: color 0.5s ease-in;
  }
}
}
              
            
!

JS

              
                $(document).ready(function(){
  
  
  $(document).ready(function(){
let options = "streams";
let streamChannel = "freecodecamp"; "esl_sc2", "cretetion";

$.ajax({
  type: "GET",
  url: "https://wind-bow.glitch.me/twitch-api/" + options  + "/" + streamChannel,
  dataType: "json",
  success:  function (data1) {
    console.log('success! data1:', data1);
  if(data1.stream === null){
    $('#result').html('Freecodecamp is offline');
  }else {
    $("#result").html("Freecidecamp is online");
  }
  }
});
  $.ajax({
    type: "GET",
    url: "https://wind-bow.glitch.me/twitch-api/users/freecodecamp/follows/channels/",
    crossDormain: true,
    success: function(data2){
      for(let i = 0; i < data2.follows.length; i++){
        console.log(data2.follows[0]);
        // get displayName
        let displayName = data2.follows[i].channel.display_name;
        let logo = data2.follows[i].channel.logo;
        let status = data2.follows[i].channel.status;
        if (logo = null){
          logo = "http://www.gamezone.de/screenshots/1280x1024/2016/06/Twitch-buffed.PNG";
          }
        
      }
    }
  })
});
  
  //freecodecamp api
//var url="https://wind-bow.gomix.me/twitch-api/";
 //var url_Channels ="https://wind-bow.gomix.me/twitch-api/channels/?callback=?";
//var url_Streams ="https://wind-bow.gomix.me/twitch-api/streams/?callback=?";
 //var logo = 'http://crossorigin.me/http://www.gamezone.de/screenshots/1280x1024/2016/06/Twitch-buffed.PNG';
//var cors ='http://crossorigin.me';
//var streamChannels = [ "freecodecamp", 'esl_sc2', "cretetion"];
 //streamChannels.forEach(function(streamChannels){
   //console.log( streamChannels);
   //$.getJSON(cors + url_Streams +cors + streamChannels, function(data){
     //var channel, status;
     //channel = data.stream === null ? "Offline" : data.stream.channel;
     //status = data.stream === null ? "offline" : "online";
     //$.getJSON(cors + url_Channels + cors + streamChannels, function(data){
       //var logo = data.logo != null ? data.logo : "";
       //var	name = data.display_name != null ? data.display_name : streamChannels;
       //var	description = status === "online" ? data.status : "";
     
     
       //html = '<div class="grid-x grid-margin-x' + status +'">< <div class="cell medium-4"><div class="media"><div class="media-center"><img class="media-object" width="100" height="100" src="' + logo + '"></div><div  class="media-body"><h3 class="media-heading"><a href="' + data.url + '" target="_blank">' + name + "</a></h4>" + description + "<div class='grid-x grid-margin-x'>" + channel + "</div></div></div></div>";
       //status === "online" ? $("#result").prepend(html) : $("#result").append(html); 
      //}

//});
              
            
!
999px

Console