Tiny Weather fixes

This commit is contained in:
Philip Schell 2019-08-28 12:51:16 +02:00
parent 3fda36ecbc
commit 968f6f411b
6 changed files with 20 additions and 3 deletions

View File

@ -102,6 +102,9 @@
<Content Include="resources\css\icons\failtile.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\filter.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="resources\css\icons\information.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@ -50,7 +50,7 @@ namespace Fraunhofer.Fit.IoT.LoraMap.Model {
this.From = warning["properties"]["SENT"].ToString();
this.To = warning["properties"]["EXPIRES"].ToString();
this.Location = warning["properties"]["NAME"].ToString();
this.Type = warning["properties"]["EVENT"].ToString();
this.Type = warning["properties"]["EVENT"].ToString().ToLower();
this.Level = warning["properties"]["SEVERITY"].ToString().ToLower();
this.Headline = warning["properties"]["HEADLINE"].ToString();
this.Body = warning["properties"]["DESCRIPTION"].ToString();

View File

@ -59,6 +59,9 @@ object {
#menucollumn .pos {
background-image: url("icons/placeholder.png");
}
#menucollumn .filter {
background-image: url("icons/filter.png");
}
#menucollumn .admin {
background-image: url("icons/admin-with-cogwheels.png");
}
@ -220,6 +223,7 @@ margin: 4px;
}
#pannels #pannels_weather .alertitem {
padding: 5px;
margin-bottom: 10px;
}
#pannels #pannels_weather .alertitem.minor {
background-color: #ffeb3b;
@ -233,6 +237,9 @@ margin: 4px;
#pannels #pannels_weather .alertitem.extreme {
background-color: #880e4f;
}
#pannels #pannels_weather .alertitem.hitze {
background-color: #c9f;
}
#pannels #pannels_weather .alertitem .head {
font-weight: bold;
display: block;

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

View File

@ -54,6 +54,7 @@
<li><a href="https://www.freepik.com/" title="Freepik">Freepik</a> licensed <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></li>
<li><a href="http://www.famfamfam.com/about/" title="Silk Iconset">Silk Iconset</a> licensed <a href="http://creativecommons.org/licenses/by/2.5/" title="Creative Commons BY 2.5" target="_blank">CC 2.5 BY</a></li>
<li><a href="https://www.flaticon.com/authors/those-icons" title="Those Icons">Those Icons</a> licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></li>
<li><a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></li>
</ul>
</div>
</div>

View File

@ -169,11 +169,17 @@
var html = "";
for (var i = 0; i < json.length; i++) {
var walert = json[i];
html += "<div class='alertitem " + walert.Level + "'>" +
html += "<div class='alertitem " + walert.Level +" "+ walert.Type + "'>" +
"<span class='head'>" + walert.Headline + "</span>" +
"<span class='ort'>" + walert.Location + "</span>" +
"<span class='text'>" + walert.Body + (walert.Instructions != "" ? "<br><br>" + walert.Instructions : "") + "</span>" +
"<span class='time'><b>Von:</b> vor " + FunctionsObject.TimeCalculation(walert.From, "difftext") + " <b>Bis:</b> in " + FunctionsObject.TimeCalculation(walert.To, "difftextn") + "</span>" +
"<span class='time'><b>Von:</b> ";
if (FunctionsObject.TimeCalculation(walert.From, "diffraw") < 0) {
html += "in " + FunctionsObject.TimeCalculation(walert.From, "difftextn");
} else {
html += "vor " + FunctionsObject.TimeCalculation(walert.From, "difftext");
}
html += " <b>Bis:</b> in " + FunctionsObject.TimeCalculation(walert.To, "difftextn") + "</span>" +
"</div>";
}
document.getElementById("pannels_weather").innerHTML = html;