From 2a0e4f7ee22e8c133efeba8e199fd9a30b10f964 Mon Sep 17 00:00:00 2001 From: Andy Warburton Date: Thu, 28 Jul 2022 12:03:22 +0100 Subject: [PATCH] added css support to web workflow Added a bare minimum css implementation to web workflow to improve readability --- supervisor/shared/web_workflow/static/directory.html | 1 + supervisor/shared/web_workflow/static/serial.html | 1 + supervisor/shared/web_workflow/static/style.css | 7 +++++++ supervisor/shared/web_workflow/static/welcome.html | 1 + supervisor/shared/web_workflow/web_workflow.c | 3 +++ 5 files changed, 13 insertions(+) create mode 100644 supervisor/shared/web_workflow/static/style.css diff --git a/supervisor/shared/web_workflow/static/directory.html b/supervisor/shared/web_workflow/static/directory.html index d0ca1a3b32..0586cd0a54 100644 --- a/supervisor/shared/web_workflow/static/directory.html +++ b/supervisor/shared/web_workflow/static/directory.html @@ -4,6 +4,7 @@ +

 

diff --git a/supervisor/shared/web_workflow/static/serial.html b/supervisor/shared/web_workflow/static/serial.html index 0c13248904..5dfcb6cc7d 100644 --- a/supervisor/shared/web_workflow/static/serial.html +++ b/supervisor/shared/web_workflow/static/serial.html @@ -5,6 +5,7 @@ +
diff --git a/supervisor/shared/web_workflow/static/style.css b/supervisor/shared/web_workflow/static/style.css new file mode 100644 index 0000000000..7aa3eda00b --- /dev/null +++ b/supervisor/shared/web_workflow/static/style.css @@ -0,0 +1,7 @@ +body { + max-width: 960px; + margin: 20px auto; + font-size: 18px; + font-family: "Proxima Nova", Verdana, sans-serif; + line-height: 20.7px; +} \ No newline at end of file diff --git a/supervisor/shared/web_workflow/static/welcome.html b/supervisor/shared/web_workflow/static/welcome.html index 139e9eba39..d63b47584f 100644 --- a/supervisor/shared/web_workflow/static/welcome.html +++ b/supervisor/shared/web_workflow/static/welcome.html @@ -5,6 +5,7 @@ +

 Welcome!

diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index ff1c4060c3..a9435cc258 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -861,6 +861,7 @@ STATIC_FILE(directory_html); STATIC_FILE(directory_js); STATIC_FILE(welcome_html); STATIC_FILE(welcome_js); +STATIC_FILE(style_css); STATIC_FILE(serial_html); STATIC_FILE(serial_js); STATIC_FILE(blinka_16x16_ico); @@ -1070,6 +1071,8 @@ static bool _reply(socketpool_socket_obj_t *socket, _request *request) { _REPLY_STATIC(socket, request, welcome_js); } else if (strcmp(request->path, "/serial.js") == 0) { _REPLY_STATIC(socket, request, serial_js); + } else if (strcmp(request->path, "/style.css") == 0) { + _REPLY_STATIC(socket, request, style_css); } else if (strcmp(request->path, "/favicon.ico") == 0) { // TODO: Autogenerate this based on the blinka bitmap and change the // palette based on MAC address.