Some HTML fixes.

master
Holger Wirtz 4 years ago
parent 978ebe8571
commit 0a964e358a
  1. 93
      WLAN_Thermometer.ino

@ -200,72 +200,65 @@ void loop()
client.println("Content-type:text/html");
client.println("Connection: close");
client.println();
client.println("<!DOCTYPE html>\n");
client.println("<html>\n");
client.println("<head>\n");
client.println("<title>Temperatur Kirche Gartenstadt Staaken</title>\n");
client.println("<!DOCTYPE html>");
client.println("<html>");
client.println("<head>");
client.println("<title>Temperatur Kirche Gartenstadt Staaken</title>");
client.print("<meta http-equiv=\"refresh\" content=\"");
client.print(HTML_RELOAD_PAGE_SECS,DEC);
client.println("\">\n");
client.println("</head>\n");
client.println("<body>\n");
client.println("<center>\n");
client.println("<h1 style=\"color:green;\">Temperatur</h1>\n");
client.print(HTML_RELOAD_PAGE_SECS, DEC);
client.println("\"/>");
client.println("<meta http-equiv=\"cache-control\" content=\"no-cache\"/>");
client.println("<meta name=\"robots\" content=\"noindex\"/>");
client.println("</head>");
client.println("<body>");
client.println("<center>");
client.println("<h1 style=\"color:green;\">Temperatur</h1>");
client.print("<h2 style=\"color:green;\">Aktuell: ");
client.print(temp[ACT]);
client.println(" &deg;C</h2>\n");
client.print("<h2 style=\"color:green;\">Minimum: ");
client.println(" &deg;C</h2>");
if (millis() > FIRST_MIN_MAX)
{
client.print("<h2 style=\"color:green;\">Minimum: ");
client.print(temp[MIN]);
client.println(" &deg;C");
}
client.print("</h2>\n");
client.print("<h2 style=\"color:green;\">Maximum: ");
if (millis() > FIRST_MIN_MAX)
{
client.print(" &deg;C");
client.print("</h2>\n");
client.print("<h2 style=\"color:green;\">Maximum: ");
client.print(temp[MAX]);
client.println(" &deg;C");
client.print(" &deg;C");
client.println("</h2>");
}
client.print("</h2>\n");
client.println("<hr>\n");
client.println("<h1 style=\"color:red;\">Gef&uuml;hlte Temperatur</h1>\n");
client.println("<hr>");
client.println("<h1 style=\"color:red;\">Gef&uuml;hlte Temperatur</h1>");
client.print("<h2 style=\"color:red;\">Aktuell: ");
client.print(heat[ACT]);
client.println(" &deg;C</h2>\n");
client.print("<h2 style=\"color:red;\">Minimum: ");
client.println(" &deg;C</h2>");
if (millis() > FIRST_MIN_MAX)
{
client.print("<h2 style=\"color:red;\">Minimum: ");
client.print(heat[MIN]);
client.println(" &deg;C");
}
client.print("</h2>\n");
client.print("<h2 style=\"color:red;\">Maximum: ");
if (millis() > FIRST_MIN_MAX)
{
client.print(" &deg;C");
client.println("</h2>");
client.print("<h2 style=\"color:red;\">Maximum: ");
client.print(heat[MAX]);
client.println(" &deg;C");
client.print(" &deg;C");
client.println("</h2>");
}
client.print("</h2>\n");
client.println("<hr>\n");
client.println("<h1 style=\"color:blue;\">Luftfeuchtigkeit</h1>\n");
client.println("<hr>");
client.println("<h1 style=\"color:blue;\">Luftfeuchtigkeit</h1>");
client.print("<h2 style=\"color:blue;\">Aktuell: ");
client.print(hum[ACT]);
client.println(" %</h2>\n");
client.print("<h2 style=\"color:blue;\">Minimum: ");
client.println(" %</h2>");
if (millis() > FIRST_MIN_MAX)
{
client.print("<h2 style=\"color:blue;\">Minimum: ");
client.print(hum[MIN]);
client.println(" %");
}
client.println("</h2>\n");
client.print("<h2 style=\"color:blue;\">Maximum: ");
if (millis() > FIRST_MIN_MAX)
{
client.print(" %");
client.println("</h2>");
client.print("<h2 style=\"color:blue;\">Maximum: ");
client.print(hum[MAX]);
client.println(" %");
client.print(" %");
client.println("</h2>");
}
client.println("</h2>\n");
if (DateTime.isTimeValid())
{
@ -277,20 +270,20 @@ void loop()
else
add_summertime = 0;
client.println("<hr>\n");
client.println("<hr>");
client.print("<h4 style=\"color:black;\">");
sprintf(dt, "%02d.%02d.%4d %02d:%02d:%02d", p.getMonthDay(), p.getMonth() + 1, p.getYear(), p.getHours() + add_summertime, p.getMinutes(), p.getSeconds());
client.print(dt);
if (add_summertime > 0)
client.print(" Sommerzeit\n");
client.print(" Sommerzeit");
else
client.print(" Winterzeit\n");
client.println("</h2>\n");
client.print(" Winterzeit");
client.println("</h2>");
}
client.println("</center>\n");
client.println("</body>\n");
client.println("</center>");
client.println("</body>");
client.println("</html>");
break;
}

Loading…
Cancel
Save