-
Notifications
You must be signed in to change notification settings - Fork 4
/
Webcontent.h
36 lines (34 loc) · 8.96 KB
/
Webcontent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Diese Datei nutzt das ISO8859.1 Encoding
// Die Arduino IDE konvertiert seit Version 1.6.6 automatisch nach UTF-8
// Sobald diese Datei in der Arduino-IDE editiert wird, wird der Inhalt nach UTF-8 konvertiert!
// Daher bitte in externem Editor öffnen.
const char HTML_HEAD[] PROGMEM = "<html><head><title>{title}</title></head>";
const char HTML_BASIC_STYLES[] PROGMEM = "<style>.table{display: table;border: 1px solid blue;padding: 4px;} .cell{display: table-cell;border:none;padding:3px;} .SSID{width:20em;} .QUALITY{width:3em;} .SECURITY{width:7em;} .CHANNEL{width:2em;} .MAC{align:left;} .row{display: table-row;border:none;padding:1px;}</style>";
const char HTML_BODYSTART[] PROGMEM = "<body>";
const char HTML_BODYEND[] PROGMEM = "</body></html>";
const char HTML_SELECTSCRIPT[] PROGMEM = "<script>function c(l){document.getElementById('s').value=l.innerText||l.textContent;document.getElementById('p').focus();}</script>";
const char HTML_ACCESSPOINT_INFO[] PROGMEM = "<div class=\"cell SSID\"><a href='#p' onclick='c(this)'>{wlan}</a></div><div class=\"cell QUALITY\">{quality}</div><div class=\"cell SECURITY\">{security}</div><div class=\"cell CHANNEL\">{ch}</div><div class=\"cell MAC\">{mac}</div>";
const char HTML_DIVTABLESTART[] PROGMEM = "<div class=\"table\">";
const char HTML_ROWTABLESTART[] PROGMEM = "<div class=\"row\">";
const char HTML_DIVEND[] PROGMEM = "</div>";
const char HTML_FORM_SSID_PWD[] PROGMEM = "<br/><form method='post' action='/wifiRestartAP'><input id='s' name='s' length=32 placeholder='SSID'><br/><input id='p' name='p' length=64 type='password' placeholder='password'><br/><br/><br/><button type='submit'>Speichern</button></form><br/>";
const char HTML_LINK_SCAN_CONFIG[] PROGMEM = "<a href=\"/wificonnectAP\">Suche und Verbinde zu WLANs</a>";
const char HTML_LINK_AP_CONFIG[] PROGMEM = "<a href=\"/wifiRestartSTA\">Konfiguriere als Accesspoint</a>";
const char HTML_LINK_WPS[] PROGMEM = "<a href=\"/wpsconfig\">Verbinde per WPS (Pushbutton)</a>";
const char HTML_NO_WLAN_FOUND[] PROGMEM = "<b>Es wurden keine WLANs gefunden. Reload, um nochmal zu suchen!</b>";
const char HTML_MSG_RESTART_STA[] PROGMEM = "<h1>Versuche zu WLAN zu verbinden!</h1><br/><b> Wenn keine Verbindung m?glich ist, startet das System wieder als Accesspoint.</b><br/> IP <b>192.168.4.1</b> SSID: <b>{SSID}</b> Passwort:<b>{PWD}</b><br/><hr/>";
const char HTML_MSG_RESTART_AP[] PROGMEM = "<h1>Restart erfolgt als Access-Point!</h1><br/>IP: <b>192.168.4.1</b> SSID: <b>{SSID}</b> Passwort: <b>{PWD}</b><br/><hr/>";
const char HTML_CONTENT_HEAD[] PROGMEM = "<html><head><title>Matrix Texteinstellung</title><script>function sysl(elem, val){ document.getElementById(elem).value=val;}</script><style>.table{display: table;border: 1px solid blue;padding: 4px;} .cell{display: table-cell;border:none;padding:3px;} .SSID{width:20em;} .QUALITY{width:4em;} .SECURITY{width:7em;} .CHANNEL{width:2em;} .MAC{text-align:left;} .row{display: table-row;border:none;padding:1px;} input[type=\"number\"] { width:4em;}</style>";
const char HTML_CONTENT_HEADEND[] PROGMEM = "</head><body>";
const char HTML_CONTENT_BODY[] PROGMEM = "<h1>Auswahl des Textes</h1><form method='post' action='/contentsave'><div class=\"table\"><div class=\"row\"><div class=\"cell\"><input type=\"radio\" id=\"ltext\" name=\"content\" value=\"0\" checked></div><div class=\"cell\"><input type=\"text\" id=\"text\" name=\"text\" size=\"60\" maxlength=\"90\" placeholder=\'Beispieltext\' oninput=\'document.getElementById(\"ltext\").checked=true\' ></div></div><div class=\"row\"> <div class=\"cell\"> <input type=\"radio\" id=\"ldate\" name=\"content\" value=\"1\"></div><div class=\"cell\">z.B.: \"Sonntag, 22. Januar 2017 11:22:33\"</div></div><div class=\"row\"><div class=\"cell\"><input type=\"radio\" id=\"sdate\" name=\"content\" value=\"2\"></div><div class=\"cell\">z.B.: \"22-01-2017 11:22:33\"</div></div><div class=\"row\"><div class=\"cell\"><input type=\"radio\" id=\"stime\" name=\"content\" value=\"3\"></div><div class=\"cell\">z.B.: \"11:22\"</div></div><div class=\"row\"><div class=\"cell\"><input type=\"radio\" id=\"ipAddr\" name=\"content\" value=\"4\"></div><div class=\"cell\">lokale IP-Adresse</div></div><div class=\"row\"><div class=\"cell\"><input type=\"radio\" id=\"graphic\" name=\"content\" value=\"5\"></div><div class=\"cell\">Grafik verwenden: <select name=\"graphics\" id=\"graphics\" size=1 oninput=\'document.getElementById(\"graphic\").checked=true\'><option value=\"empty \"></option></select></div></div><div class=\"row\"><div class=\"cell\"> </div><div class=\"cell\"><b>Helligkeit</b></div></div><div class=\"row\"><div class=\"cell\"> </div><div class=\"cell\"><input type=\"number\" id=\"brightval\" name=\"brightval\" size=\"3\" value=\"5\" min=\"0\" max=\"15\" oninput=\'sysl(\"brightness\", this.value)\'><input type=\"range\" id=\"brightness\" name=\"brightness\" value=\"5\" min=\"0\" max=\"15\" oninput='sysl(\"brightval\", this.value)\'></div></div><div class=\"row\"><div class=\"cell\"> </div><div class=\"cell\"><b>Geschwindigkeit</b></div></div><div class=\"row\"><div class=\"cell\"> </div><div class=\"cell\"><input type=\"number\" id=\"speedval\" name=\"speedval\" size=\"3\" value=\"100\" min=\"0\" max=\"200\" oninput=\'sysl(\"speed\", this.value)\'><input type=\"range\" id=\"speed\" name=\"speed\" value=\"100\" min=\"0\" max=\"200\" oninput=\'sysl(\"speedval\", this.value)\'></div></div></div><br><button type=\'submit\'>Speichern</button></form></body></html>";
const char HTML_GLOBAL_CONF[] PROGMEM = "<form method=\'post\' action=\'/wificonfigAP\'><fieldset class=\"table\"><legend>WiFi Accesspoint Konfiguration</legend><div class=\"row\"><div class=\"cell\">SSID: </div> <div class=\"cell\"><input name=\"SSID\" id=\"SSID\" value=\"{SSID}\" size=30></div></div><div class=\"row\"><div class=\"cell\">Passwort: </div><div class=\"cell\"><input name=\"WLANPWD\" id=\"WLANPWD\" value=\"{WLANPWD}\" size=30></div></div><div class=\"row\"><div class=\"cell\">Kanal (1-13) </div> <div class=\"cell\"><input type=\"number\" min=\"1\" max=\"13\" name=\"Kanal\" id=\"Kanal\" value=\"{CH}\" size=5></div></div></fieldset> <br><fieldset class=\"table\"><legend>Sonstige Konfiguration</legend><div class=\"row\"><div class=\"cell\">Administrator-Passwort: </div><div class=\"cell\"><input name=\"ADMPWD\" id=\"ADMPWD\" value=\"{ADMPWD}\" size=20> Wiederholung: <input name=\"ADMPWD2\" id=\"ADMPWD2\" value=\"{ADMPWD}\" size=20><br> (Benutzer: <i><b>admin</b></i>)</div></div></fieldset><br><button type=\'submit\'>Speichern</button></form>";
const char HTML_REDIRECT_CONTENT[] PROGMEM = "<html><head><meta http-equiv=\"refresh\" content=\"1;url=/content\"/></head><body><h1>Konfiguration gespeichert</h1></body></html>";
const char HTML_TITLE_CONFIG[] PROGMEM = "Allgemeine Konfiguration";
const char HTML_TITLE_APCONNECT[] PROGMEM = "Suche und Verbinde zu WLANs";
const char HTML_PWD_WARN[] PROGMEM = "<h1 style=\"color: red;\">Die beiden Administrationspassw?rter sind nicht gleich oder leer!</h1>";
const char HTML_MENU_STYLE[] PROGMEM = "<style>ul.topnav {list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333;}ul.topnav li {float: left;}ul.topnav li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none;}ul.topnav li a:hover:not(.active) {background-color: #111;}ul.topnav li a.active {background-color: #4CAF50;}ul.topnav li.right {float: right;}@media screen and (max-width: 600px){ ul.topnav li.right, ul.topnav li {float: none;}}</style>";
const char HTML_MENU[] PROGMEM = "<ul class=\"topnav\"> <li><a class=\"active\">MATRIX</a></li> <li><a href=\"./wificonnectAP\">Wlan</a></li> <li><a href=\"./content\">Inhalte</a></li> <li><a href=\"./edit\">HTML-Editor</a></li></ul>";
const char JS_SORT_BY_KEY[] PROGMEM = "function sbk(array, key) {return array.sort(function(a, b) {var x = a[key]; var y = b[key]; return ((x < y) ? -1 : ((x > y) ? 1 : 0)); });}";
const char JS_DO_GET_REQUEST[] PROGMEM = "function dgr(_url, _func_onReady ) {xhr = new XMLHttpRequest();xhr.open(\"GET\", _url, true, \"admin\", \"admin\");xhr.onreadystatechange = function() {if(xhr.readyState == 4 && xhr.status == 200) {_func_onReady(xhr.responseText);}};xhr.send(null);}";
const char JS_POPULATE_SELECTION[] PROGMEM = "function pGS(_rT) {var pics=JSON.parse(_rT); pics=sbk(pics, \'name\');selectList=document.getElementById(\"graphics\");selectList.innerHTML=\"\";for(var i = 0; i < pics.length; i++){if(pics[i].type === \"file\") {var node = document.createElement(\"option\");var picname = (/(.*)\\.[^.]+$/.exec(pics[i].name)[1]).split(\'/\').pop();node.value=pics[i].name;var textNode = document.createTextNode(picname);node.appendChild(textNode);document.getElementById(\"graphics\").appendChild(node);}}}";
const char JS_INIT_AFTER_LOAD[] PROGMEM = "function stInit(){dgr( \"/edit?list=/pix\", pGS);} document.addEventListener(\"DOMContentLoaded\", stInit, false);";