physical-interface/main/homepage_template.h

64 lines
3.2 KiB
C
Raw Normal View History

2020-05-08 14:08:27 +02:00
String homepage_template(void){
return
"<!DOCTYPE html>"
"<html>"
"<head>"
2020-05-11 11:08:54 +02:00
"<meta charset=\"UTF-8\">"
2020-05-08 14:08:27 +02:00
"<title>"+String(titel)+"</title>"
"<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css\">"
"<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js\"></script>"
"<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js\"></script>"
"<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css\">"
"<script src=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js\"></script>"
"</head>"
"<body>"
"<div class=\"container\">"
"<h1>"+String(titel)+"</h1>"
"<p>An REST-API Arduino microcontroller, which allows you to interact with hardware and the physical environment.</p>"
2020-05-11 11:55:27 +02:00
"<h2>Controller <i class=\"fas fa-cogs\"></i></h2>"
"<h3>Remote Plug Controller<i class=\"fas fa-plug\"></i></h3>"
2020-05-08 14:08:27 +02:00
"<form method=\"get\" >"
"<div class=\"form-group\">"
2020-05-11 11:55:27 +02:00
"<label for=\""+ parameter_plug_id +"\">Plug-ID:</label>"
"<input type=\"number\" class= \"form-control\" id=\""+ parameter_plug_id +"\" name=\""+ parameter_plug_id +"\">"
2020-05-08 14:08:27 +02:00
"</div>"
"<div class=\"form-group\">"
"<label class=\"checkbox-inline\" for=\"on\">"
2020-05-11 11:55:27 +02:00
"<input type=\"radio\" id=\"on\" name=\""+ parameter_plug_status +"\" value=\"1\">"
2020-05-08 14:08:27 +02:00
"<i class=\"fas fa-toggle-on\"></i> on"
"</label>"
"<label class=\"checkbox-inline\" for=\"off\">"
2020-05-11 11:55:27 +02:00
"<input type=\"radio\" id=\"off\" name=\""+ parameter_plug_status +"\" value=\"0\">"
2020-05-08 14:08:27 +02:00
"<i class=\"fas fa-toggle-off\"></i> off"
"</label>"
"</div>"
"<input type=\"submit\" class=\"btn btn-secondary\">"
"</form>"
2020-05-11 11:55:27 +02:00
"<h3>Infared Controller <i class=\"fas fa-plug\"></i></h3>"
"<form method=\"get\" >"
"<div class=\"form-group\">"
"<label for=\""+ parameter_ir_type +"\">"+ parameter_ir_type +":</label>"
"<input type=\"number\" class= \"form-control\" id=\""+ parameter_ir_type +"\" name=\""+ parameter_ir_type +"\">"
"</div>"
"<div class=\"form-group\">"
"<label for=\""+ parameter_ir_data +"\">"+ parameter_ir_data +":</label>"
"<input type=\"number\" class= \"form-control\" id=\""+ parameter_ir_data +"\" name=\""+ parameter_ir_data +"\">"
"</div>"
"<div class=\"form-group\">"
"<label for=\""+ parameter_ir_bits +"\">"+ parameter_ir_bits +":</label>"
"<input type=\"number\" class= \"form-control\" id=\""+ parameter_ir_bits +"\" name=\""+ parameter_ir_bits +"\">"
"</div>"
"<input type=\"submit\" class=\"btn btn-secondary\">"
"</form>"
2020-05-11 11:08:54 +02:00
"<h2>Data <i class=\"fas fa-database\"></i></h2>"
"<pre>"
+ getJson() +
"</pre>"
"<p>The sensor datas in plane text can be reached <a href=\"?format=json\">here</a>.</p>"
2020-05-08 14:08:27 +02:00
"<hr />"
"<p><small>Please check out the <a href=\"https://github.com/kevinveenbirkenbach/physical-interface\">git-repository</a> to get more information about this software.</small></p>"
"</div>"
"<body>"
"<html>";
}