-
Notifications
You must be signed in to change notification settings - Fork 4
/
html_fragments.cpp
48 lines (43 loc) · 1.23 KB
/
html_fragments.cpp
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
36
37
38
39
40
41
42
43
44
45
46
47
#include <Arduino.h>
// TODO don't redefine
#define WEBSOCKET_PORT 81
const String html_start = (
"<!DOCTYPE html>"
"<html>"
"<head>"
"<meta name=viewport content=\"width=device-width, initial-scale=1\">"
"<title>NMEA-Bridge</title>"
"<link rel=\"stylesheet\" href=\"/style.css\" />"
"</head>"
"<body>"
"<header><div class=\"wrap\">NMEA-Bridge</div></header>"
"<content>"
"<div class=\"wrap\">"
);
const String html_end = (
"</div>"
"</content>"
"<footer>"
"<div class=\"wrap\">"
"<a href=\"/\">Info</a>"
"<a href=\"/config\">Config</a>"
#ifdef ENABLE_WEBSOCKET_LOG
"<a href=\"/log\">Log</a>"
#endif
"</div>"
"</footer>"
"</body>"
"</html>"
);
const String html_log_content = (
"<h1>Log</h1>"
"<span id=\"indicator\">disconnected</span>"
"<div id=\"log\" data-port=\"" + String(WEBSOCKET_PORT) + "\">"
"<div id=\"empty\">nothing received yet</div>"
"</div>"
"<form class=\"line\">"
"<input id=\"in\" type=\"text\" placeholder=\"Send NMEA sentence\" />"
"<button id=\"send\" type=\"submit\" disabled>Send</button>"
"</form>"
"<script src=\"/log_script.js\"></script>"
);