Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource


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


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.


Auto Save

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.


                <div ng-app="weatherApp" ng-controller="forecastController" class="component--weatherBox">
	<div class="panel">
		<div class="weather-data">
			<h1>{{ }}</h1><small>{{ dailyForecast[0].weather[0].description }}</small>
		<div class="currentTemp"><i ng-class="applyIcon(dailyForecast[0].weather[0].icon)" class="wi"></i><i class="wi wi-degrees"></i></div>
	<div class="component--weatherBox-row">
		<div ng-repeat="daily in dailyForecast track by $index" class="content">
			<div class="component--weatherBox-heading">{{ day($index) }}</div>
			<div class="component--weatherBox-info"><i ng-class="applyIcon([0].icon)" class="wi"></i><span class="degrees">{{ | number: 0}}<i class="wi wi-degrees"></i></span></div>


                /* Variables */

$bg-main: #E06B4F
/* Styles */
	background: #dce2e5
	font-family: 'Roboto', sans-serif
	font-weight: 100
	font-size: 11px

	margin: 30px auto
	width: 420px
	border: 1px solid darken($bg-main, 3%)
	border-radius: 10px
	overflow: hidden
	box-shadow: 2px 5px 20px 1px #444

	position: relative
	overflow: hidden
	color: #fff
	background: $bg-main
	height: 120px
		content: ''
		display: block
		position: absolute
		left: 0
		top: 0
		width: 100%
		height: 100%
		z-index: 1
		opacity: 0.3
		background-image: url('')
		background-repeat: no-repeat
		background-position: 0 63%
		background-size: cover

	width: 50%
	text-align: center
	display: inline-block
	float: left
	z-index: 2
	position: relative

	font-weight: 400
	font-size: 40px
	line-height: 40px
	padding-bottom: 0
	margin-bottom: 0
	margin-top: 0.75em

	width: 50%
	z-index: 2
	text-align: center
	float: left
	font-size: 50px
	text-align: center
	margin-top: 0.5em
	position: relative
	vertical-align: middle
		line-height: 40px
		margin-left: -10px
		vertical-align: top!important // ish
		margin-right: 20px
		font-size: 40px
		vertical-align: baseline

	display: flex
	clear: both
	flex: 1
	text-align: center

	background: lighten($bg-main, 8%)
	border: 1px solid darken($bg-main, 10%)
	border-left: none
	text-transform: uppercase
	color: #fff
	font-weight: 800
	padding: 10px
	background: #fff
	color: $bg-main
	padding-bottom: 10px
	border-right: 1px solid darken($bg-main, 10%)
		display: block
		margin: 0 auto
		font-size: 24px
		padding: 15px 0
		font-size: 20px
		line-height: 20px
			display: inline
	font-size: 12px


                /* work in progress:

>> fix controller structure; need to take everything out of $http


angular.module('weatherApp', [])

.controller('forecastController', ['$scope', '$http', '$filter', 
  function ($scope, $http, $filter) {
		$http.get('' + YOUR_APP_ID)
			.success(function(data) {
				$ = data;
				$scope.dailyForecast = data.list;
				$scope.currentTemp = $filter('number')($scope.dailyForecast[0], 0);
				$ = function(index){
					return $filter('date')($scope.dailyForecast[index].dt * 1000, 'EEE');
			$scope.applyIcon = function(icon){

				if(icon === '01d'){
					return ('wi-day-sunny');
				else if(icon === '01n'){
					return ('wi-night-clear');	
				else if(icon === '02d' || '02n'){
					return ('wi-cloudy');
				else if(icon === '03d' || '03n' || '04d' || '04n'){
					return ('wi-night-cloudy');
				else if(icon === '09d' || '09n'){
					return ('wi-showers');
				else if(icon === '10d' || '10n'){
					return ('wi-rain');	
				else if(icon === '11d' || '11n'){
					return ('wi-thunderstorm');
				else if(icon === '13d' || '13n'){
					return ('wi-snow');
				else if(icon === '50d' || '50n'){
					return ('wi-fog');
				else { // whoa, desctruction!
					return ('wi-meteor'); 
			$scope.weatherLink = ''+ $scope.applyIcon() + '.png';