LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

CSS
.form-control:focus {
  border-color: inherit;
  box-shadow: none;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.form-control {
  border-color: inherit;
  box-shadow: none;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

*:focus {
  outline: 0;
}

body {
  background: #6441A5;
  height: 100%;
}

.search {
  margin: 10px 20px;
}

.user img {
  display: inline-block;
  margin-right: 10px;
  width: 60px;
}

img.pre {
  width: 130px;
  padding: 0;
  margin: 0;
}

.user p {
  display: inline-block;
  font-size: 18px;
  text-transform: capitalize;
  color: #2d2828;
}

.icon-active {
  top: 15px;
  right: 15px;
  color: green;
  font-size: 18px;
}

.box {
  position: relative;
  background: rgba(255, 255, 255, 1);
  width: 360px;
  margin: auto;
  margin-top: 100px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

a {
  color: #2CC185;
}

a:hover {
  color: #6441A5;
}

a,
a:hover,
a:active,
a:visited {
  text-decoration: none !important;
  outline: 0 !important;
  border: 0 !important;
  background: none;
}

li a,
li a:hover,
li a:active,
li a:visited {
  text-decoration: none !important;
  outline: 0 !important;
  border: 0 !important;
  background: none;
  width: 120px;
  font-size: 18px !important;
  color: #666;
  float: left;
}

li:active {
  background: none;
  text-decoration: none;
}

.user {
  padding: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}
JS
var app = angular.module('twitchApp', []);
app.controller('mainCtrl', ['$scope', '$http', function($scope, $http) {
  $scope = this;
  $scope.streamers = [];
  $scope.offlineStreamers = [];
  $scope.activeTab = 1;
  $scope.setActiveTab = function(n) {
    $scope.activeTab = n;
  };
  $scope.isActive = function(tab) {
    return $scope.activeTab === tab;
  };
  var channels = ["freecodecamp", "storbeck", "habathcx", "robotcaleb", "dasmehdi", "noobs2ninjas", "iarepandette", 'siegegames', "zackox1000", "dreamhackhs", "tsm_dyrus", "gtimetv", "syndicate", "riotgames", "captainsparklez", "LIRIK", "PhantomL0rd", "swiftor", "gassymexican"];
  channels.forEach(function(user) {
    $http.get('https://api.twitch.tv/kraken/streams/' + user).success(function(data) {
      if (data.stream === null) {
        $http.get(data._links.channel).success(function(data2) {
          $scope.offlineStreamers = {
            name: data2.name,
            link: data2.url,
            image: data2.logo,
            online: false
          }
          $scope.streamers.push($scope.offlineStreamers);
        })
      } else {
        $scope.streamers.push({
          name: data.stream.channel.name,
          link: data.stream.channel.url,
          image: data.stream.channel.logo,
          desc: data.stream.channel.status,
          game: data.stream.channel.game,
          preview: data.stream.preview.medium,
          online: true,
        });
      }
    });
  })
}])
Term
Sat, 01/13/2018 - 16:17

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv