Before anyone exercise this widget, nosotros volition live giving roughly pregnant reasons why you lot should exercise it too, mainly discussing close its function. Let’s assume a visitor from London, England landed on your site. Now this widget would fetch the information from local atmospheric condition companionship in addition to would furnish its details accurate. Now if the solar daytime is sunny, rainy, cloudy in addition to etc.
Demo of the widget tin transportation away live seen here.
The solution:
The starting fourth dimension affair you lot demand to create is to login into your blogger dashboard. Now acquire to Template >> Edit HTML >> in addition to search for the peel tag, simply higher upwards it glue the next slice of CSS coding (you tin transportation away customize the code if you lot like, but nosotros are for certain that the default ane would simply live correct for everyone)..MyWeatherDiv .centerContainer {
width: 300px;
text-align: left;
margin-bottom: 200px;
}
.green {
color: #a6e22d;
}
.teal {
color: #66d9ef;
}
.purp {
color: #ae81ff;
}
.pink {
color: #f92772;
}
.yellow {
color: #e6db74;
}
.white {
color: #f8f8f2;
}
.grey {
color: #616161;
}
.f12 {
font-size: 12px;
}
.MyWeatherDiv img {
height: 64px;
width: 64px;
}
.weatherInfoRight {
z-index: 999;
position: fixed;
top: 10px;
right: 10px;
}
.weatherInfoLeft {
z-index: 999;
position: fixed;
top: 10px;
left: 10px;
}
.weatherInfoBottomRight {
z-index: 999;
position: fixed;
bottom: 10px;
right: 10px;
}
.weatherInfoBottomLeft {
z-index: 999;
position: fixed;
bottom: 10px;
left: 10px;
}
.MyWeatherDiv {
display: none;
background-color: #272822;
padding: 5px;
-webkit-border-radius: 10px;
border-radius: 10px;
}
.MyWeatherInfo {
text-align: center;
font-family: 'Segoe UI',Tahoma,Helvetica,Sans-Serif;
color: white;
font-size: 14px;
}
#divMyImage {
display: none;
}
.MyWeatherClose {
font-family: 'Segoe UI',Tahoma,Helvetica,Sans-Serif;
cursor: pointer;
position: absolute;
right: 10px;
color: white;
font-size: 20px;
}
.MWTemperature {
display: block;
}
.MWPlace {
display: block;
}
.MWIP {
display: block;
}
#clear-day {
display: none;
}
#clear-night {
display: none;
}
#partly-cloudy-day {
display: none;
}
#partly-cloudy-night {
display: none;
}
#cloudy {
display: none;
}
#rain {
display: none;
}
#sleet {
display: none;
}
#snow {
display: none;
}
#wind {
display: none;
}
#fog {
display: none;
}
The minute affair is to add together the JavaScript file that does the piece of employment quite brilliantly. Within your blogger template search for the </head> tag in addition to simply higher upwards it glue the next JS Coding. (We recommend you lot to delight host the script on your ain either on Google Drive or whatsoever other service because our script mightiness acquire downward if our quota of bandwidth gets full).
<script type="text/javascript" src="https://dl.dropboxusercontent.com/u/137869302/weather.js"></script>
<script type="text/javascript">
$.MyWeather({
position: "right",
showpopup: true,
temperature: "c",
closeicon: true,
showicon: true,
showtemperature: true,
showlocation: true,
showip: true,
size: 80,
iconcolor: "white",
fontcolor: "white",
}, role (e, f, g, a, d, b, c) {
$("#txtCity").html(e);
$("#txtCountry").html(f);
$("#txtIP").html(g);
$("#txtLatitude").html(a);
$("#txtLongitude").html(d);
$("#txtTemperature").html(b);
$("#picTemp").attr("src", c)
});
</script>
We promise this tutorial may convey helped you lot inwards learning How to display atmospheric condition forecast on Your Blogger site. Do plow over it a try, in addition to allow us know what are your thoughts close our latest evolution yesteryear commenting your opinions below.
Comments