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

              
                <body>
  <div id = "contenitore">
    <div id = "testata">
    <img id = "logo" src = "https://res.cloudinary.com/dts0bdwqj/image/upload/v1487622546/favtwitchlogo_wkwxko.png" />
    </div>
     <div id = "bottoni">
          <a id = "all" class = "btn">All</a>
          <a id = "online" class = "btn">Online</a>
          <a id = "offline" class = "btn">Offline</a>
      </div>
    <div id = "corpo">
      <div id = "riga">
      </div>
    </div>
    <div id = "footer">
         <p > Inspired by FaB. <a href="mailto:russo.fabio7@gmail.com"><span id ="gmail">My GMail.</span></a></p>
    </div>
  </div>
</body>
              
            
!

CSS

              
                /*stili contenitori */

body {background: #6441A5; /* fallback for old browsers */
background: -webkit-linear-gradient(to left, #6441A5 , #2a0845); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to left, #6441A5 , #2a0845); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */}


#testata {width:100;
          display:flex;
justify-content:center;}

#logo{max-width: 90%;
      margin: 15px 0px 15px 0px;}

#bottoni {position:relative;
          width:100%;
          height: 60px;
          display:inline-flex;
          flex-wrap:wrap;
          justify-content: center;
          align-content: center;
          color:white;
          margin-bottom:10px;
          margin-bottom:60px;}


/*stili bottoni */

.btn {
  width: auto;
  height: auto;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  -webkit-transform: perspective(1px) translateZ(0);
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px transparent;
  position: relative;
  -webkit-transition-property: color;
  transition-property: color;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  border:solid;
  margin: 5px 5px 5px 5px;
  font-weight: bold;}

.btn:before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #d40000;
  -webkit-transform: scaleY(0);
  transform: scaleY(0);
  -webkit-transform-origin: 50% 100%;
  transform-origin: 50% 100%;
  -webkit-transition-property: transform;
  transition-property: transform;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}
.btn:hover, .btn:focus, .btn:active {
  color: white;
}
.btn:hover:before, .btn:focus:before, .btn:active:before {
  -webkit-transform: scaleY(1);
  transform: scaleY(1);
}

#riga {display:flex;
       flex-wrap:wrap;
       justify-content:space-around;
       width:99%;}

/*stili streamers*/

.streamerson {width:80%;
            display:inline-flex;
            margin-bottom:50px;}
.streamersoff {width:80%;
            display:inline-flex;
            margin-bottom:50px;}

@media (min-width: 710px) {
.streamerson {width:45%;
            display:inline-flex;
            margin-bottom:50px;}
.streamersoff {width:45%;
            display:inline-flex;
            margin-bottom:50px;}
}

.streamerscont {width:100%;
                min-height:200px;
                display:flex;
                flex-direction:column;
                background:white;
                border:solid purple;
                border-radius:10px;
                -webkit-box-shadow: 4px 7px 5px 0px       rgba(0,0,0,0.75);
                -moz-box-shadow: 4px 7px 5px 0px rgba(0,0,0,0.75);
                box-shadow: 4px 7px 5px 0px rgba(0,0,0,0.75);}

.nomedesc {text-align:center;
           margin:15px 5px 5px 5px;
           font-family: 'Acme', sans-serif;;
           color:purple;
           font-weight: bold;
           word-wrap: break-word;
           font-size:1.2em;}

.games {color:black;
        margin-top:5px;}

.dontexist {color:red;}

.imgstreamon , .imgstreamonplay 
              {border:solid;
              background-size: 50% 50%;
              width:100px;
              height:auto;
              color:green;
              border-radius: 50%;
              padding:5px 5px 5px 5px;
              align-self:center;
              margin-top:-40px;
              -webkit-box-shadow: 4px 7px 5px 0px       rgba(0,0,0,0.75);
              -moz-box-shadow: 4px 7px 5px 0px rgba(0,0,0,0.75);
              box-shadow: 4px 7px 5px 0px rgba(0,0,0,0.75);}

.imgstreamonplay img {
   margin-left:17px;
} 

.imgstreamoff {border:solid;
              width:100px;
              height:auto;
              border:solid;
              color:red;
              border-radius: 50%;
              padding:5px 5px 5px 5px;
              align-self:center;
              margin-top:-40px;
              -webkit-box-shadow: 4px 7px 5px 0px       rgba(0,0,0,0.75);
              -moz-box-shadow: 4px 7px 5px 0px rgba(0,0,0,0.75);
              box-shadow: 4px 7px 5px 0px rgba(0,0,0,0.75);}

.dati {color:gray;}

/*gestione footer*/
#footer {
         display:flex;
         justify-content:center;
         align-items:flex-end;
         color:white;
         font-size:0.7em;}


a:hover, a:active, a:visited {color: purple;
                               text-decoration:none;}

/*stili icone*/

.material-icons {
  margin-left: 10px;
  margin-right: -5px;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  color:#d40000;
  margin-right:10px;
  vertical-align:top;
 /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;
  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;
  /* Support for IE. */
  font-feature-settings: 'liga';
}

              
            
!

JS

              
                //nascondi footer inizialmente
$("#footer").hide()
//esegui funzione di ricerca canali
$(document).ready(esegui)

function esegui() {
var chan = ["freecodecamp","streamerhouse","monstercat","nintendo","ESL_SC2","nocopyrightsounds","comster404"];

$("#corpo").hide()
//cicla su ogni valore di array
chan.forEach(utente => {
  
  const canali = 'https://wind-bow.glitch.me/twitch-api/channels/' + utente,
        streams = 'https://wind-bow.glitch.me/twitch-api/streams/' + utente;
//chiama due Json per info sui canali      
      $.getJSON(canali, function chandata(chan) {
        $.getJSON(streams, function streamdata(stream) {
 //crea le schede dei canali         
                 if (chan.status === 404) {
                 $("#riga").append('<div class = "streamersoff"><div class = "streamerscont"><img class = "imgstreamoff" src = "https://res.cloudinary.com/dts0bdwqj/image/upload/v1487675146/twitchnoexist_udj4zt.png"/><div class = "nomedesc"><p>'+utente+'<br><span class =  "dontexist">'+"Does not exist :("+'</span></p></div></div></div>')  
                 }
                 else if (stream.stream === null) {
                 $("#riga").append('<div  class = "streamersoff"><div class = "streamerscont"><img class = "imgstreamoff"  src = "'+chan.logo+'"/><div class = "nomedesc"><p>'+chan.display_name+'</p></div></div></div>')  
                 }
                 else {
                 $("#riga").append('<div class = "streamerson"><div class = "streamerscont"><img class = "imgstreamon"  src = "'+stream.stream.channel.logo+'"/><a class = "imgstreamonplay" href = "'+chan.url+'" target = "_blank"><img src = "https://res.cloudinary.com/dts0bdwqj/image/upload/v1487694168/play-btn_a2hv8m.png"/></a><div class = "nomedesc"><p>'+chan.display_name+'<br><span class =  "games">'+"Now playing: "+chan.game+'</span></p><div class = "dati"><i class="material-icons">visibility</i>'+stream.stream.viewers+'<i class="material-icons">group</i>'+chan.followers+'</div></div></div></div>')  
   $(".imgstreamonplay").hide();
                 }
//gestisci i tre bottoni         
   $("#online").on("click",function(){
     $(".streamersoff").hide();
     $(".streamerson").show();
     $(".dati").hide();
     $(".imgstreamonplay").hide();
     $(".imgstreamon").show();
   })
    $("#offline").on("click",function(){
     $(".streamersoff").show();
     $(".streamerson").hide();
     $(".dati").hide();
     $(".imgstreamonplay").hide();
     $(".imgstreamon").show();
   })
    $("#all").on("click",function(){
     $(".streamersoff").show();
     $(".streamerson").show();
   })
//nascondi i dati per creare un effetto slide
   $(".dati").hide();      
//valorizza da animatecss          
   var flip = "animated flip";
   var flipOut = "animated tada";
   var hinge = "animated hinge";
   var fadeIn = "animated fadeInDown";
   var noAnim = "webkitAnimationEnd animationed onanimationed MSAnimationEnd mozAnimationEnd";
//crea effetto lancio moneta  
    $(".imgstreamon, .imgstreamoff").addClass(flip).on(noAnim,function(){
     $(this).removeClass(flip);
   })
 //effetti di slide, cambio immagini e link a canali         
   $(".streamerson").on("click tap",function(){
   $(".imgstreamon").show();
   $(".imgstreamonplay").hide(); 
   $(".dati").hide();
   $(".imgstreamon").removeClass(flipOut);                
   $(this).find(".dati").fadeTo(700, 1 );                                   $(this).find(".imgstreamon").hide();
     $(this).find(".imgstreamonplay").show().addClass(flipOut).on(noAnim,function(){
     $(this).removeClass(flipOut);
   });
   }) 
 $("#corpo").fadeTo(700, 1 );
 $("#footer").show();
        })  
      })
   })
}
              
            
!
999px

Console