Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 102: | Rivi 102: | ||
var algcolor = [ '#308fb3', '#8db335', '#f1cb00', '#ce0000' ]; | var algcolor = [ '#308fb3', '#8db335', '#f1cb00', '#ce0000' ]; | ||
out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | ||
out += '<div style="height: 30px; display: flex; justify-content: center; align-items: center; flex-direction: column;"><span class="h6" style="margin: 0;">' + jw.obstype[ 'alg' ].newest.inRelationToToday() + '</span></div>'; | |||
out += '<div style="width: 84px; height: 84px; margin: auto; border-radius: 50%; background-color: ' + algcolor[ algmean ] + ';"></div>'; | out += '<div style="width: 84px; height: 84px; 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>'; | ||
| Rivi 113: | Rivi 116: | ||
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-2 text-center">'; | out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | ||
out += '<div style="height: 30px; display: flex; justify-content: center; align-items: center; flex-direction: column;"><span class="h6" style="margin: 0;">' + jw.obstype[ 'ice' ].newest.inRelationToToday() + '</span></div>'; | |||
out += '<div style="width: 84px; height: 84px; margin: auto; border-radius: 50%; background-color: #fff; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | out += '<div style="width: 84px; height: 84px; margin: auto; border-radius: 50%; background-color: #fff; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | ||
out += '<div style="font-size: 36px;">' + Math.round( jw.obstype[ 'ice' ].mean ) + '</div>'; | out += '<div style="font-size: 36px;">' + Math.round( jw.obstype[ 'ice' ].mean ) + '</div>'; | ||
| Rivi 126: | Rivi 132: | ||
out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | out += '<div class="col col-6 col-sm-4 col-md-2 text-center">'; | ||
out += '<div style="height: 30px; display: flex; justify-content: center; align-items: center; flex-direction: column;"><span class="h6" style="margin: 0;">' + jw.obstype[ 'secchi' ].newest.inRelationToToday() + '</span></div>'; | |||
out += '<div style="width: 84px; height: 84px; margin: auto; border-radius: 50%; background-color: none; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | out += '<div style="width: 84px; height: 84px; margin: auto; border-radius: 50%; background-color: none; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | ||
out += '<div style="font-size: 36px;">' + ( Math.round( jw.obstype[ 'secchi' ].mean * 10 ) / 10 ).toString().replace( '.', ',' ) + '</div>'; | out += '<div style="font-size: 36px;">' + ( Math.round( jw.obstype[ 'secchi' ].mean * 10 ) / 10 ).toString().replace( '.', ',' ) + '</div>'; | ||


