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 class="header">
        <a class="logo" href="https://www.twitch.tv/" target="_blank"><img src="https://pngimg.com/uploads/twitch/twitch_PNG31.png"></a>
        <h3>FreeCodeCamp Project - Front End Developement</h3>
    </div>
    <hr>
    <div class="container">
        <div class="opt-bar row">
            <div class="col-6 btn-group">
                <button id="all_filter" class="btn btn-sm btn-primary active">All</button> <!-- <i aria-hidden="true" class="fa fa-globe"> </i> -->
                <button id="on_filter" class="btn btn-sm btn-success">Online</button> <!-- <i aria-hidden="true" class="fa fa-toggle-on"> </i>  -->
                <button id="of_filter" class="btn btn-sm btn-danger">Offline</button> <!-- <i aria-hidden="true" class="fa fa-toggle-off"> </i>  -->
            </div>
            <div class="col-6">
                <input id="filter" type="text" class="form-control" placeholder="Search channel..." />
            </div>
        </div>
    </div>
    <hr>
    <div id="main_cont" class="container">
        <div id="channel-list" class="row">
        </div>
    </div>

        <!-- back-to-top -- >
    <a id="back-to-top" href="#" class="btn btn-default btn-lg back-to-top" role="button" data-toggle="tooltip"
        data-placement="right"><span class="glyphicon glyphicon-chevron-up"></span></a>
    </br> -->
    <hr>
    <!-- Footer -->
    <div id="footer" class="container-fluid text-center">
        <div class="footer text-center">
            <a href="https://www.facebook.com/lindakovacsart" target="_blank"><span class="fa fa-facebook-f"></span> Facebook | </a>
            <a href="https://twitter.com/lindakovacsart" target="_blank"><span class="fa fa-twitter"></span> Twitter | </a>
            <a href="https://plus.google.com/u/1/112468176480762133222" target="_blank"><span class="fa fa-google-plus"></span> Google+ | </a>
            <a href="https://www.linkedin.com/in/lindakovacsart" target="_blank"><span class="fa fa-linkedin"></span> LinkedIn | </a>
            <a href="https://github.com/lindakovacs" target="_blank"><span class="fa fa-github"></span> GitHub | </a>
            <a href="https://www.freecodecamp.org/lindakovacs" target="_blank"><i class="fa fa-fire"></i>
                FreeCodeCamp | </a> <!-- class="fa fa-free-code-camp" -->
            <a href="https://codepen.io/lindakovacs" target="_blank"><i class="fa fa-codepen"></i>Codepen</a>
        </div>
        <div class="footer text-center">&copy 2018 Made with &#10084; by Linda Kovacs</div>
    </div>
</body>
              
            
!

CSS

              
                body {
background-color: #9733ee;
}

.logo {
width: 550px;
height: 100px;
}
.header {
	padding: 50px 0;
	margin-bottom: 5px;
	text-align: center;
	color: #fff;
	background-color: #000000;
}

.header>h3 {
	font-size: 25px;
	font-family: 'Raleway', sans-serif;
}

#channel-list {
	background-color: #91E7DD;
}

.channel {
	padding: 10px;
	width: 23%;
	background-color: #fff;
	margin: 15px 1%;
}

.channel div.alert {
	width: 100%;
}

.channel-logo {
	width: 100%;
}

.channel .now {
	font-size: 12px;
}

.btn-group .btn {
	width: 100px;
}

.btn.active {
	border-width: 5px;
}

.btn-info {
background-color: #9733ee;
}

/*
.btn-info a:hover {
background-color: #91e7dd;
}
*/
@media (max-width: 1000px) {
	.channel {
		width: 31.3333%;
	}
}

@media (max-width: 768px) {
	.channel {
		width: 48%;
	}
}

@media (max-width: 480px) {
	.channel {
		width: 98%;
	}
}

#footer {
	width: 100%;
	color: #fff;
	padding: 20px;
	width: 100%;
	text-align: center;
	background-color: #000;
	font-size: 15px;
}

.footer a {
	color: #fff;
	position: relative;
	text-decoration: none;
	font-weight: bold;
}
.footer a:hover {
	color: #000;
	background-color: #fff;
}
.footer p {
	font-size: 17px;
}

              
            
!

JS

              
                $(document).ready(function() {
	var filter_btn = $(".btn-group .btn");
	var channel_div = $(".channel");
	var channelList_div = $("#channel-list");
	var channelList = ["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"];
	
	channelList.forEach(function(val) {
		var url = "https://wind-bow.glitch.me/twitch-api/streams/"+val;
		$.getJSON(url, function(channel) {
			var data = channel.stream;
			if(data===null) {
				var url2 = "https://wind-bow.glitch.me/twitch-api/channels/"+val;
				$.getJSON(url2, function(data){
					channelList_div.append(getChannelCard(status="Offline", data));
				});
			}
			else{
				channelList_div.append(getChannelCard(status="Online",  data.channel));
			}
		});
	});

	filter_btn.click(function() {
		$(".channel").show();
		var t = $(this).text();
		filter_btn.removeClass("active");
		$(this).addClass('active');
		if(t==="All") {
			return;
		}
		var fil = (t==="Online")?".Offline":".Online";
		$(fil).hide();
	});

	$("#filter").keyup(function() {
		filter_btn.removeClass("active");
		var w = $(this).val().toLowerCase();
		//alert(w);
		$(".channel").filter(function() {
			var rw = $(".details", this).text().toLowerCase();
			$(this).toggle(rw.indexOf(w)>-1);
		});
	});

});


function getChannelCard(status, data) {
	var name, logo, stCol, icon, ongoing, link;
	name = data.display_name;
	logo = data.logo;
	link = data.url;
	if(status==="Offline") {
		stCol = "danger";
		icon = "&times;";
		ongoing = "none";
	}
	else {
		ongoing = data.game;
		stCol = "success";
		icon = "&#10003;";
	}
	var text = '<div class="channel '+status+'">\
				<img class="img-fluid channel-logo" src="'+logo+'" />\
				<div class="details">\
					<h3>'+name+'</h3>\
					<p class="now">\
						'+ongoing+'\
					</p>\
				</div>\
				<div class="alert alert-'+stCol+'"><b>'+icon+'</b> '+status+'</div>\
				<a href="'+link+'" target="_blank" class="btn btn-block btn-info">view channel</a>\
			</div>'
	return text;
}
              
            
!
999px

Console