Webserver controller with url trimming for value controls

Dependencies:   LCD_DISCO_F746NG BSP_DISCO_F746NG

Revision:
6:e2d251d535f0
Parent:
5:e1218721aefd
Child:
7:02a0635aeeac
--- a/main.cpp	Mon May 08 14:27:58 2017 +0000
+++ b/main.cpp	Tue May 09 06:12:22 2017 +0000
@@ -130,7 +130,7 @@
     httpContent += "left: 0;";
     httpContent += "right: 0;";
     httpContent += "bottom: 0;";
-    //httpContent += "border-radius: 34px;";
+    httpContent += "border-radius: 34px;";
     httpContent += "background-color: #ccc;";
     httpContent += "-webkit-transition: .4s;";
     httpContent += "transition: .4s;";
@@ -143,7 +143,7 @@
     httpContent += "width: 26px;";
     httpContent += "left: 4px;";
     httpContent += "bottom: 4px;";
-    //httpContent += "border-radius: 50%;";
+    httpContent += "border-radius: 50%;";
     httpContent += "background-color: white;";
     httpContent += "-webkit-transition: .4s;";
     httpContent += "transition: .4s;";
@@ -169,21 +169,19 @@
     httpContent += "<body>";
     httpContent += "<h2><a href=\".\" title=\"Click to refresh the page\">Smart Home</a></h2>"; 
     httpContent += "<pre>Temperature:\t" + string(roomTempStr) + "&deg;C</pre>";
-    httpContent += "<pre>\r\nHeating:\t";
+    httpContent += "<pre>Heating:\t";
 
     if(status == ON) {
-        httpContent += "<a href=\"./?sw=0\">";
-        httpContent += "<button class=\"switch\"> ";
+        httpContent += "<a href=\"./?sw=0\" class=\"switch\"> ";
         httpContent += "<input type=\"checkbox\" checked>";
     }
     else {
-        httpContent += "<a href=\"./?sw=1\">";
-        httpContent += "<button class=\"switch\"> ";
+        httpContent += "<a href=\"./?sw=1\" class=\"switch\"> ";
         httpContent += "<input type=\"checkbox\">";
    }
         
     httpContent += "<div class=\"slider\"></div>";
-    httpContent += "</button></a></pre>";
+    httpContent += "</a></pre>";
     httpContent += "<hr>";
     httpContent += "<pre>2017 ARMmbed</pre>";       
     httpContent += "</body>";