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.

<link href="|Bungee" rel="stylesheet">
<link href="" rel="stylesheet" type="text/css">
<body id="bgcolor">
 <div id="main-content" class="header">
   <form action="" class="tempswitch">
    <input name="temp" type="radio" onclick="tempC();" > Celcius<br>
    <input name="temp" type="radio" onclick="tempF();"> Fahrenheit<br>
   <h1 class="title"> Local Weather </h1>
 <div class="weatherinfo">
  <div id="wrap">
   <h2 id="weather"></h2>
  <div id="wrap">
   <h2 id="temp"></h2>
   <h2 id="inner"></h2>
  <h2 id="location">location</h2>
		 <canvas class="iconclass" id="iconid" width="64" height="64">
	<a href = >Powered by Dark Sky </a>


                    body {
#bgcolor {
  background-color: pink;
  .header {
    text-align: center;
    width: 100%;
    padding: 1% 0;

      h1 {
        font-family: 'Bungee', cursive;
        text-align: center;
        font-weight: bold;
        font-size: 40px;
.title {
   width: 400px;
   margin: 0px auto;

.tempswitch {
  float: right;
  color: grey;
  font-family: 'Bungee', cursive;
  .label {
    float: left;
      h2 {
        font-family: 'BioRhyme', serif;
        text-align: center;
        font-weight: bold;
        font-size: 30px;
        margin-top: 0;
        margin-bottom: 0;
      #wrap {
        text-align: center;
      #inner {
        display: inline-block;
      h3 {
        font-family: 'David Libre', serif;
        font-size: 40px;
      p {
        font-family: 'Athiti', sans-serif;
        padding: 0 10% 0 10%;
        font-size: 18px;
      #main-content {
/*         padding: 20px 20px 20px 20px; */
        border-radius: 10px;
/*         margin: 20px 20px 20px 20px; */
      .weatherinfo {
        background-color: lightblue;
        border-radius: 10px;

.iconclass {
	margin-left: auto;
    margin-right: auto;
    display: block;

/*       .button {
        background-color: #66ffcc;
        border: none;
        border-radius: 5px;
        color: white;
        padding: 15px 32px;
        text-align: center;
        text-decoration: none;
        display: block;
        margin: auto;
        font-size: 16px;
        cursor: pointer;
        -webkit-transition-duration: 0.4s;
        transition-duration: 0.4s;
      .button:hover {
        box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
      .button:active {
        transform: scale(0.95);
      }  */
              // Global variables underneath

var api_Key = "e4ee4e08479f304c27ed35b06b56f873";
var loc0, loc1, currentTempFaherenheit, currentTempCelcius, weatherIcon;

  // Gets the current location in degrees and prints the location: city and region.
  $.getJSON("", function(data){
	  var city =;
	  var region = data.region;
	  $("#location").html(city + ", " + region); // @Todo do not replace location but instead make the text "your current location is:"
	  var loc = data.loc;
	  var locArray = loc.split(",");
	  loc0 = locArray[0];
	  loc1 = locArray[1];
	  $.getJSON("" + api_Key + "/" + loc0 + "," + loc1 + "?callback=?", function(data){

		   currentTempFaherenheit = Math.round(data.currently.temperature);
		   currentTempCelcius = Math.round((currentTempFaherenheit - 32) * 5/9);
		   weatherIcon = data.currently.icon;
		   $('.iconclass').attr('id', weatherIcon);
// This will add the icons available for use.
var icons = new Skycons(),
  list  = [
    "clear-day", "clear-night", "partly-cloudy-day",
    "partly-cloudy-night", "cloudy", "rain", "sleet", "snow", "wind",
      for(i = list.length; i--; )
        icons.set(list[i], list[i]);;

// This is triggered by the radiobutton with ID: #temp.

var tempC = function() {
  $("#temp").text(currentTempCelcius + "C");

var tempF = function() {
   $("#temp").text(currentTempFaherenheit + "F");



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