Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa Merkkaus: Palautettu |
||
| Rivi 83: | Rivi 83: | ||
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: 120px; height: 120px; margin: auto; border-radius: 50%; Xbackground-color: var(--syke-green); font-size: 50px; display: flex; justify-content: center; align-items: center; flex-direction: column;">+' + Math.round( jw.obstype[ 'temp' ].mean ) + '°</div>'; | out += '<div style="width: 120px; height: 120px; margin: auto; border-radius: 50%; Xbackground-color: var(--syke-green); font-size: 50px; display: flex; justify-content: center; align-items: center; flex-direction: column;">+' + Math.round( jw.obstype[ 'temp' ].mean ) + '°</div>'; | ||
out += '<h2 class="h6">Pintaveden<br />lämpötila</h2>'; | out += '<h2 class="h6">Pintaveden<br />lämpötila</h2>'; | ||
| Rivi 95: | Rivi 95: | ||
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: 120px; height: 120px; margin: auto; border-radius: 50%; background-color: ' + algcolor[ algmean ] + ';"></div>'; | out += '<div style="width: 120px; height: 120px; margin: auto; border-radius: 50%; background-color: ' + algcolor[ algmean ] + ';"></div>'; | ||
out += '<h2 class="h6">' + algtxt[ algmean ] + '</h2>'; | out += '<h2 class="h6">' + algtxt[ algmean ] + '</h2>'; | ||
| Rivi 106: | Rivi 106: | ||
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: 120px; height: 120px; margin: auto; border-radius: 50%; background-color: #fff; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | out += '<div style="width: 120px; height: 120px; 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>'; | ||
| Rivi 119: | Rivi 119: | ||
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: 120px; height: 120px; margin: auto; border-radius: 50%; background-color: #fff; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | out += '<div style="width: 120px; height: 120px; 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[ 'secchi' ].mean * 10 ) / 10 ).toString().replace( '.', ',' ) + '</div>'; | out += '<div style="font-size: 50px;">' + ( Math.round( jw.obstype[ 'secchi' ].mean * 10 ) / 10 ).toString().replace( '.', ',' ) + '</div>'; | ||


