mirror of
https://github.com/kevinveenbirkenbach/physical-interface.git
synced 2024-11-10 20:41:03 +01:00
64 lines
3.2 KiB
C
64 lines
3.2 KiB
C
String homepage_template(void){
|
|
return
|
|
"<!DOCTYPE html>"
|
|
"<html>"
|
|
"<head>"
|
|
"<meta charset=\"UTF-8\">"
|
|
"<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>"
|
|
"<h2>Controller <i class=\"fas fa-cogs\"></i></h2>"
|
|
"<h3>Remote Plug Controller<i class=\"fas fa-plug\"></i></h3>"
|
|
"<form method=\"get\" >"
|
|
"<div class=\"form-group\">"
|
|
"<label for=\""+ parameter_plug_id +"\">Plug-ID:</label>"
|
|
"<input type=\"number\" class= \"form-control\" id=\""+ parameter_plug_id +"\" name=\""+ parameter_plug_id +"\">"
|
|
"</div>"
|
|
"<div class=\"form-group\">"
|
|
"<label class=\"checkbox-inline\" for=\"on\">"
|
|
"<input type=\"radio\" id=\"on\" name=\""+ parameter_plug_status +"\" value=\"1\">"
|
|
"<i class=\"fas fa-toggle-on\"></i> on"
|
|
"</label>"
|
|
"<label class=\"checkbox-inline\" for=\"off\">"
|
|
"<input type=\"radio\" id=\"off\" name=\""+ parameter_plug_status +"\" value=\"0\">"
|
|
"<i class=\"fas fa-toggle-off\"></i> off"
|
|
"</label>"
|
|
"</div>"
|
|
"<input type=\"submit\" class=\"btn btn-secondary\">"
|
|
"</form>"
|
|
"<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>"
|
|
"<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>"
|
|
"<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>";
|
|
}
|