Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 82: | Rivi 82: | ||
out = ''; | out = ''; | ||
//out += '<h2 class="h3">Välijärvi nyt</h2>'; | //out += '<h2 class="h3">Välijärvi nyt</h2>'; | ||
out += '<div class="row | out += '<div class="row">'; | ||
if ( typeof jw.obstype[ 'temp' ] != 'undefined' ) { | if ( typeof jw.obstype[ 'temp' ] != 'undefined' ) { | ||
if ( jw.obstype[ 'temp' ].count > 0 ) { | if ( jw.obstype[ 'temp' ].count > 0 ) { | ||
out += '<div class="col col-6 col-sm-4 col-md- | out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | ||
out += '<div style="width: | out += '<div style="width: 100px; height: 100px; margin: auto; border-radius: 50%; background-color: none; font-size: 50px; display: flex; justify-content: center; align-items: center; flex-direction: column;">+' + Math.round( jw.obstype[ 'temp' ].mean ) + '°</div>'; | ||
out += '<div style="height: 60px; display: flex; justify-content: center; align-items: center; flex-direction: column;"><span class="h6" style="margin: 0;">Pintaveden<br />lämpötila</span></div>'; | out += '<div style="height: 60px; display: flex; justify-content: center; align-items: center; flex-direction: column;"><span class="h6" style="margin: 0;">Pintaveden<br />lämpötila</span></div>'; | ||
out += '</div>'; | out += '</div>'; | ||
| Rivi 98: | Rivi 98: | ||
var algtxt = [ 'Ei sinilevää', 'Hieman sinilevää', 'Runsaasti sinilevää', 'Erittäin runsaasti sinilevää' ]; | var algtxt = [ 'Ei sinilevää', 'Hieman sinilevää', 'Runsaasti sinilevää', 'Erittäin runsaasti sinilevää' ]; | ||
var algcolor = [ '#308fb3', '#8db335', '#f1cb00', '#ce0000' ]; | var algcolor = [ '#308fb3', '#8db335', '#f1cb00', '#ce0000' ]; | ||
out += '<div class="col col-6 col-sm-4 col-md- | out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | ||
out += '<div style="width: | out += '<div style="width: 100px; height: 100px; margin: auto; border-radius: 50%; background-color: ' + algcolor[ algmean ] + ';"></div>'; | ||
out += '<div style="height: 60px; display: flex; justify-content: center; align-items: center; flex-direction: column;"><span class="h6" style="margin: 0;">' + algtxt[ algmean ] + '</span></div>'; | out += '<div style="height: 60px; display: flex; justify-content: center; align-items: center; flex-direction: column;"><span class="h6" style="margin: 0;">' + algtxt[ algmean ] + '</span></div>'; | ||
out += '</div>'; | out += '</div>'; | ||
| Rivi 109: | Rivi 109: | ||
icecatmean = Math.round( jw.obstype[ 'ice' ].catmean ); | icecatmean = Math.round( jw.obstype[ 'ice' ].catmean ); | ||
icetxt = [ 'Ei jäätä', 'Osittain jäässä', 'Yhtenäinen jääpeite' ]; | icetxt = [ 'Ei jäätä', 'Osittain jäässä', 'Yhtenäinen jääpeite' ]; | ||
out += '<div class="col col-6 col-sm-4 col-md- | out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | ||
out += '<div style="width: | out += '<div style="width: 100px; height: 100px; margin: auto; border-radius: 50%; background-color: #fff; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | ||
out += '<div style="font-size: 50px;">' + Math.round( jw.obstype[ 'ice' ].mean ) + '</div>'; | out += '<div style="font-size: 50px;">' + Math.round( jw.obstype[ 'ice' ].mean ) + '</div>'; | ||
out += '<div style="font-size: 28px; margin-top: -26px;">cm</div>'; | out += '<div style="font-size: 28px; margin-top: -26px;">cm</div>'; | ||
| Rivi 122: | Rivi 122: | ||
if ( jw.obstype[ 'secchi' ].count > 0 ) { | if ( jw.obstype[ 'secchi' ].count > 0 ) { | ||
out += '<div class="col col-6 col-sm-4 col-md- | out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | ||
out += '<div style="width: | out += '<div style="width: 100px; height: 100px; margin: auto; border-radius: 50%; background-color: none; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | ||
out += '<div style="font-size: 50px;">' + ( Math.round( jw.obstype[ 'secchi' ].mean * 10 ) / 10 ).toString().replace( '.', ',' ) + '</div>'; | out += '<div style="font-size: 50px;">' + ( Math.round( jw.obstype[ 'secchi' ].mean * 10 ) / 10 ).toString().replace( '.', ',' ) + '</div>'; | ||
out += '<div style="font-size: 28px; margin-top: -26px;">m</div>'; | out += '<div style="font-size: 28px; margin-top: -26px;">m</div>'; | ||


