cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              

  <body>
    
    <h1> Please view on the <a href = "http://eththe.net/weather.html">weather app,</a> on my <a href = "http://eththe.net/"> website.</a> </h1>
    
    </body>
  <!--
<head>

<meta name="viewport" content="width=device-width, initial-scale=1">

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">


  <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'>

<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome-animation/0.0.9/font-awesome-animation.min.css'>

   <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css'>

        <link rel = "stylesheet" type = "text/css" href = "weather.css"> 
            <script src="weather.js"></script>

</head>
  
<body>

<div class= "container-fluid">
<div class = "main text-primary">
 <div class = "text"> <h2 id = "geo">  </h2> 

   <div class = "col-xs-12"> 

             <h3 id = "day0">  </h3>

             <h3 id = "cond"> </h3> <h3 id ="temp"> </h3>

               <h4 id = "weather"> Today's outlook: </h4>
             
               <h5 id = "des1"> <u><em>During the day</em></u>:   </h5>
               <h5 id = "des2"> <u><em>Tonight<em></u>:   </h5>
          </div>
        </div>
     </div>         

     
         <!-- <div class = "text">
                         <h2 id ="high" >High: </h2>
                         <h2 id ="low"> Low:  </h2>  </div> 
<div class = container>
                                            <div class = "col-xs-12">                     
                                         <h2 class="cast">Forecast: </h2>
                                                    </div>                     
<div class = "col-md-4">                     
 <div class = "f">
   <h4 id = "day"> </h4> 
    <h4 id = "forecast">  </h4>
       <h5 id = "high1">Temp-High: </h5> 
       <h5 id = "low1">Temp-Low: </h5>
       <h5 id = "wind1"> Wind-Speed: </h5>
       <h5 id = "winddir1"> Wind-Dir: </h5>
       <!--<h5 id = "data1">Total-Precip: </h5> 
    </div>
</div>


                     <div class = "col-md-4">
                      <div class = "f1">
                       <h4 id = "day1"> </h4> 
                        <h4 id = "1"> </h4>
                         <h5 id = "high2">Temp-High: </h5> 
                          <h5 id = "low2">Temp-Low: </h5>
                         <h5 id = "wind2"> Wind-Speed: </h5>
                        <h5 id = "winddir2"> Wind-Dir: </h5>
                       <!-- <h5 id = "data2">Total-Precip: </h5>
                      </div>
                    </div>




 <div class = "col-md-4">
   <div class = "f2">
     <h4 id = "day2"> </h4> 
       <h4 id = "2"> </h4>
       <h5 id = "high3">Temp-High: </h5> 
       <h5 id = "low3">Temp-Low: </h5>
       <h5 id = "wind3"> Wind-Speed: </h5>
       <h5 id = "winddir3"> Wind-Dir: </h5>
      <!-- <h5 id = "data3">Total-Precip: </h5> -->
   </div>
  </div>
 </div>

<!--
 <div class = "col-xs-12"> 
     <div class = "sat"> 
     <p id="satellite"> </p>
        <h5> Satellite Images of Your Location</h5>
     </div>
 </div>

  <div class ="by">
                            
<a href="https://twitter.com/share" class="by twitter-share-button" data-text="Weather App"  data-show-count="false">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
                                <h6> <b>By Ethan <sup> Mohan <sup></b></h6>
</div> 
</body>

 <script>                                  

$(document).ready(function(){
      
      $("#geo").addClass("animated bounce"); 
      
      
      });


</script>


</html>

            
          
!
            
              .container-fluid{

	max-width: 70%;
	max-height: 20%;
}
body{

	

background: #FC354C; 
background: -webkit-linear-gradient(to left, #FC354C , #0ABFBC); 
background: linear-gradient(to left, #FC354C , #0ABFBC); 
        
}
#day0 {

	text-align:center;
}
#weather {

  text-align: center; 
}
#extra{

	text-align: center;
}
.main {
	color: black;
  
}
.text{
	font: black;
	font-size:25px;
	font-family: "helveticaneue";
}
 .f {
 	margin-top: 10%;
 
 }
 .f1{
 	margin-top: 10%;
 	
 }
 .f2{
 	margin-top: 10%;
 	
 }
 #satellite {

 	height:30%;
 	width:100%;
 	
 }

.by  {
color: black;
margin-top:20%;
}

#cond{
text-align: center;
}
#temp {
	text-align: center;
	margin-bottom: 15%;
}

            
          
!
            
              

/* var randomColor = Math.floor(Math.random()*16777215).toString(16);
$('head').append("<style> body { background-color: #"+randomColor+";"+"}"); */


 /* var apiKey = "&units=imperial&appid=57fc5ce9c845cddc46abe979fb367c2d"; 
      
$(function(){

 var loc; 

// grab data from ip info (need to fix function, ipinfo is not the most accurate resource)
//need to change to $.getJSON("http://api.wunderground.com/api/1402eccb0c88b5ec/geolookup/q/", function(data) {
  $.getJSON('http://ipinfo.io', function(data){
}


//split method to turn coordinates into an array 

     var geo = data.loc.split(',');
 
 //grabbing data from open weather map


                $.getJSON("http://api.wunderground.com/api/1402eccb0c88b5ec/conditions/q/" + geo[0] + "," + geo[1] + ".json", 
                 function(zz){
 


 //current data
  

               
                var z = "&#xb0;";
                var currentTemp = zz.current_observation.temp_f;
                var currentState = zz.current_observation.display_location.full; 
                var cel = (currentTemp - 32) * (5/9);
                var currentState2 = zz.current_observation.weather; 

             
          
               $('#geo').append(currentState);
               $('#temp').append(Math.round(currentTemp) + z + "F" + "  " + '(' + Math.round(cel) + z + 'C' + ')' );
               $('#cond').append(currentState2);
  



  //forecast function 
             



             $(function(){
    
                
               $.getJSON("http://api.wunderground.com/api/1402eccb0c88b5ec/forecast/q/" + geo[0] + "," + geo[1] + ".json", 
                function(bc){



 //variable for degree                  
                 

                 var z = "&#xb0;"; 



  
              
//tomorrow var 
                 


                  var day = bc.forecast.simpleforecast.forecastday["1"].date.weekday;
                  var a = bc.forecast.simpleforecast.forecastday["1"].conditions;
                  var b = bc.forecast.simpleforecast.forecastday["1"].icon_url;
                  var c = bc.forecast.simpleforecast.forecastday["1"].high.fahrenheit;
                  var d = bc.forecast.simpleforecast.forecastday["1"].low.fahrenheit;
                  var e = bc.forecast.simpleforecast.forecastday["1"].maxwind.mph;
                  var f = bc.forecast.simpleforecast.forecastday["1"].maxwind.dir;
                  //var g = bc.forecast.simpleforecast.forecastday["1"].
                



//next day var
                  
                  var day1 = bc.forecast.simpleforecast.forecastday["2"].date.weekday;
                  var aa = bc.forecast.simpleforecast.forecastday["2"].conditions;
                  var bb = bc.forecast.simpleforecast.forecastday["2"].icon_url;
                  var cc = bc.forecast.simpleforecast.forecastday["2"].high.fahrenheit;
                  var dd = bc.forecast.simpleforecast.forecastday["2"].low.fahrenheit;
                  var ee = bc.forecast.simpleforecast.forecastday["2"].maxwind.mph;
                  var ff = bc.forecast.simpleforecast.forecastday["2"].maxwind.dir;

// next next 
                  var day2 = bc.forecast.simpleforecast.forecastday["3"].date.weekday;
                  var aaa = bc.forecast.simpleforecast.forecastday["3"].conditions;
                  var bbb = bc.forecast.simpleforecast.forecastday["3"].icon_url;
                  var ccc = bc.forecast.simpleforecast.forecastday["3"].high.fahrenheit;
                  var ddd = bc.forecast.simpleforecast.forecastday["3"].low.fahrenheit;
                  var eee = bc.forecast.simpleforecast.forecastday["3"].maxwind.mph;         
                  var fff = bc.forecast.simpleforecast.forecastday["3"].maxwind.dir;


//current day     
                 var aaaa = bc.forecast.txt_forecast.forecastday["0"].icon_url;
                 var bbbb = bc.forecast.txt_forecast.forecastday["0"].title;
                 var cccc = bc.forecast.txt_forecast.forecastday["0"].fcttext; 
                 var dddd = bc.forecast.txt_forecast.forecastday["1"].fcttext; 
               

//current day append 


                   $("#cond").append('<img src ="' + aaaa + '">');
                   $('#day0').append(bbbb + ", current conditions:"); 
                   $('#des1').append(cccc); 
                   $('#des2').append(dddd);



//tomorrow append 
                   


                   $("#day").append(day + ":");
                   $("#forecast").append(a);
                   $("#forecast").append('<img src ="' + b + '">');
                   $("#high1").append(c + " " + z + "F");
                   $("#low1").append(d + " " + z + "F");
                   $("#wind1").append(e + 'mph');
                   $('#winddir1').append(f);


//next day append
                    

                    $("#day1").append(day1 + ':');
                    $("#1").append(aa);
                    $("#1").append('<img src ="' + bb + '">');
                    $("#high2").append(cc + " " + z + "F");
                    $("#low2").append(dd + " " + z + "F");
                    $("#wind2").append(ee + 'mph');
                    $('#winddir2').append(ff);



//next next append 
                    

                    $("#day2").append(day2 + ':');
                    $("#2").append(aaa);
                    $("#2").append('<img src ="' + bbb + '">');
                    $("#high3").append(ccc + " " + z + "F");
                    $("#low3").append(ddd + " " + z + "F");
                    $("#wind3").append(eee + 'mph');
                    $('#winddir3').append(fff);


                 /* $(function(){
                 $.getJSON("http://api.wunderground.com/api/1402eccb0c88b5ec/satellite/q/" + geo[0] + "," + geo[1] + ".json", 
                 function(cd){


//satellite request 

                         var imagereq = cd.satellite.image_url_ir4;
//satellite append req
                         $('#satellite').append('<img class ="img-responsive" src ="' + imagereq + '">');

 

                            }) 
                          })
                      })
                 })
            })

      })
   })
*/
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console