css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

              <main ng-app="twitch">
  <section ng-controller="StreamController">
    <header class="container col-md-4 col-md-offset-4">
      <h2 class="text-center">Coders on <i class="fa fa-twitch"></i> Twitch</h2>

      <div class="btn-group btn-group-justified" role="group">
        <div class="btn-group">
          <button type="button" class="btn btn-default selected" ng-click='toggleSelectedClass($event); showAll()'>ALL
        <div class="btn-group">
          <button type="button" class="btn btn-default" ng-click='toggleSelectedClass($event); showOnline()'>Online</button>
        <div class="btn-group">
          <button type="button" class="btn btn-default" ng-click='toggleSelectedClass($event); showOffline()'>Offline</button>
      <div class='streams'>
        <div class="input-group">
          <input type="text" ng-model="searchText.name" class="input-lg" placeholder="Filter" />
          <i class="fa fa-search-plus fa-4x filter-glass"></i>
        <div class="row" >
          <a ng-repeat="user in currentView | filter:searchText" href="https://www.twitch.tv/{{user.name}}">
            <div class="col-sm-4 portfolio-item">
            <div class='stream'>
              <img class="user-logo img-circle" ng-src={{user.logo}} />
              <div class='stream-text'>
                <span class='username'>{{user.name}}<span class="online-icon glyphicon {{user.onlineIcon}}"></span></span>
                <span class='description'>{{user.desc}}</span>
              * {
   /* border:1px solid black; */ 
  font-family: 'Montserrat', sans-serif;

body {
  background-color: white;

.clearfix {
  overflow: auto;

.description {
  display: block;
  margin: 0px 0px 10px 30px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 80%;
  color: grey;

.user-logo {
  width: 35%;
  margin: 20px 20px 0px 20px;
.green {
  color: green;
.red {
.username {
  display: block;
  font-size: 20px;
  text-align: center;
.stream-text {
  display: inline-block;
  width: 30%;
  position: absolute;
  top: 20px;
.input-lg {
  width: 100%;
  padding-left: 40px;

.input-group {
  width: 100%;

.btn-group .selected, .btn-group .selected:hover{

.filter-glass {
  float: left;
  position: absolute;
  left: 10px;
  top: 15px;
  font-size: 1.95em;

              var app = angular.module('twitch', []);

var usernames = ["jtbricker","freecodecamp", "storbeck", "terakilobyte", "noobs2ninjas", "beohoff", 'faceittv', 'medrybw']; //usernames to grab from API
var api_url = "https://api.twitch.tv/kraken/"; //base API url
var blank_logo = 'http://trythenaturalway.com/how-to-increase-height/sites/all/themes/business/images/anonymous.png'; //location of image for profiles without profile images
var onIcon = "glyphicon-ok green"
var offIcon = "glyphicon-remove red"

app.controller('StreamController', function($scope, $http) {
  $scope.toggleSelectedClass = function(event) {
  $scope.showAll = function() {
    $scope.currentView = $scope.all;
  $scope.showOnline = function() {
    $scope.currentView = $scope.online;
  $scope.showOffline = function() {
    $scope.currentView = $scope.offline;

  $scope.online = [];
  $scope.offline = [];
  $scope.all = [];

usernames.forEach(function(username) {
    var temp = {};
//    var username = usernames[i];
    $.getJSON(api_url + 'streams/' + username + '?callback=?', function(data) {
      var isOnline = (data.stream !== null);
      temp.desc = isOnline ? data.stream.channel.status : "";
      $.getJSON(api_url + 'users/' + username + '?callback=?', function(data) {
        temp.name = data.display_name;
        temp.logo = data.logo !== null ? data.logo : blank_logo;
          temp.onlineIcon = onIcon;
          temp.onlineIcon = offIcon;
        $scope.currentView = $scope.all;


🕑 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.
Loading ..................