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


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.


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.


 <meta charset="UTF-8">
 <title>Free Code Camp Weather App</title>
 <link href=",700" rel="stylesheet">
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE-edge">
 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=nos">
 <script src="" integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script>
 <script src=""></script>

 <div class="wrapper">
  <div class="col-md-12">
    <h1 class="h1-title">Local Weather App </h1>
   <div class="weather-info-div">
    <h2 class="location-section"></h2>
    <div class="darksky-icon">
     <canvas id="clear-day" width="64" height="64"></canvas>
     <canvas id="clear-night" width="64" height="64"></canvas>
     <canvas id="partly-cloudy-day" width="64" height="64"></canvas>
     <canvas id="partly-cloudy-night" width="64" height="64"></canvas>
     <canvas id="cloudy" width="64" height="64"></canvas>
     <canvas id="rain" width="64" height="64"></canvas>
     <canvas id="sleet" width="64" height="64"></canvas>
     <canvas id="snow" width="64" height="64"></canvas>
     <canvas id="wind" width="64" height="64"></canvas>
     <canvas id="fog" width="64" height="64"></canvas>
    <!-- <div>
            <img src="images/clear-night.jpg" alt="clear-night" />
            <img src="images/fog.jpg" alt="fog" />
            <img src="images/partly-cloudy-day.jpg" alt="partly-cloudy-day" />
            <img src="images/partly-cloudy-night.jpg" alt="partly-cloudy-night">
            <img src="images/rain.jpg" alt="rain">
            <img src="images/sleet.jpg" alt="sleet">
            <img src="images/snow.jpg" alt="snow">
            <img src="images" alt="">
          </div> -->
    <a><h2 class="temp-div"></h2>
            <h2 class="temp-measurement"></h2>
            <h2 class="temp-div-celsius"></h2>
            <h2 class="temp-measurement-celsius"></h2></a>
    <h2 class="weather-summary"></h2>
    <h4 class="daily-summary"></h4>

  <a href="">Powered by Dark Sky</a>
  <h5>Made with ❤️ in Pittsburgh, Pennsylvania</h5>



footer {
	color: #fff;
	text-shadow: #000 3px 3px 2px;
	text-align: center;

.temp-measurement, .darksky-icon {
	text-align: center;

html {
	min-height: 100%;

body {
	font-family: "Roboto";
	font-weight: 400;
	background-size: cover;
	background-repeat: no-repeat;

footer {
	font-family: "Roboto";
	font-weight: 400;
a:link {
	color: #fff;
	text-decoration: none;



                $(document).ready(function() {
	navigator.geolocation.getCurrentPosition(function(position) {
			"" +
				position.coords.latitude +
				"," +
			function(json) {
				"" +
				position.coords.latitude +
				"," +
			type: "GET",
			dataType: "jsonp",

			success: function(json) {
				let farenheitTemp = json.currently.temperature;
				let location = json.timezone;
				let currentIcon = json.currently.icon;
				let weatherSummary = json.currently.summary;
				let tempF =
					"<img class='farenheit-image' src ='' width='30px' height='30px'></img>";
				let tempC =
					"<img class='celsius-image' src ='' width='30px' height='30px'></img>";
				let dailySummary = json.daily.summary;
				let celsiusTemp = Math.round((farenheitTemp - 32) / 1.8);

				$(".location-section").html("Your current local conditions are<br>");

				let iconDisplay = (iconName, current) => {
					const jqObj = $(`#${iconName}`);
					iconName === current ? : jqObj.hide();

				iconDisplay("clear-day", currentIcon);
				iconDisplay("clear-night", currentIcon);
				iconDisplay("partly-cloudy-day", currentIcon);
				iconDisplay("partly-cloudy-night", currentIcon);
				iconDisplay("cloudy", currentIcon);
				iconDisplay("fog", currentIcon);
				iconDisplay("rain", currentIcon);
				iconDisplay("sleet", currentIcon);
				iconDisplay("snow", currentIcon);
				iconDisplay("wind", currentIcon);

				const iconMap = {

				(function() {
					$("body").css("background-image", iconMap[currentIcon]);


				$(".temp-div, .temp-measurement").on("click", function() {
					$(".temp-div, .temp-measurement").hide();
					$(".temp-div-celsius, .temp-measurement-celsius").show();
				$(".temp-div-celsius, .temp-measurement-celsius").on("click", function() {
					$(".temp-div-celsius, .temp-measurement-celsius").hide();
					$(".temp-div, .temp-measurement").show();

				let icons = new Skycons({ color: "#fff" });

				icons.set("clear-day", Skycons.CLEAR_DAY);
				icons.set("clear-night", Skycons.CLEAR_NIGHT);
				icons.set("partly-cloudy-day", Skycons.PARTLY_CLOUDY_DAY);
				icons.set("partly-cloudy-night", Skycons.PARTLY_CLOUDY_NIGHT);
				icons.set("cloudy", Skycons.CLOUDY);
				icons.set("rain", Skycons.RAIN);
				icons.set("sleet", Skycons.SLEET);
				icons.set("snow", Skycons.SNOW);
				icons.set("wind", Skycons.WIND);
				icons.set("fog", Skycons.FOG);;