Skip to content

Commit 2a0e4f7

Browse files
committed
added css support to web workflow
Added a bare minimum css implementation to web workflow to improve readability
1 parent 88102d1 commit 2a0e4f7

File tree

5 files changed

+13
-0
lines changed

5 files changed

+13
-0
lines changed

supervisor/shared/web_workflow/static/directory.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<title></title>
55
<meta charset="UTF-8">
66
<script src="/directory.js" defer=true></script>
7+
<link rel="stylesheet" href="/style.css">
78
</head>
89
<body>
910
<h1><a href="/"><img src="/favicon.ico"/></a>&nbsp;<span id="path"></span></h1>

supervisor/shared/web_workflow/static/serial.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<script src="/serial.js" defer=true></script>
8+
<link rel="stylesheet" href="/style.css">
89
</head>
910
<body style="flex-direction: column; display: flex; height: 100%; width: 100%; margin: 0; font-size: 1rem;">
1011
<div style="flex: auto; display: flex; overflow: auto; flex-direction: column;">
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
body {
2+
max-width: 960px;
3+
margin: 20px auto;
4+
font-size: 18px;
5+
font-family: "Proxima Nova", Verdana, sans-serif;
6+
line-height: 20.7px;
7+
}

supervisor/shared/web_workflow/static/welcome.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<script src="/welcome.js" defer=true></script>
8+
<link rel="stylesheet" href="/style.css">
89
</head>
910
<body>
1011
<h1><a href="/"><img src="/favicon.ico"/></a>&nbsp;Welcome!</h1>

supervisor/shared/web_workflow/web_workflow.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,7 @@ STATIC_FILE(directory_html);
861861
STATIC_FILE(directory_js);
862862
STATIC_FILE(welcome_html);
863863
STATIC_FILE(welcome_js);
864+
STATIC_FILE(style_css);
864865
STATIC_FILE(serial_html);
865866
STATIC_FILE(serial_js);
866867
STATIC_FILE(blinka_16x16_ico);
@@ -1070,6 +1071,8 @@ static bool _reply(socketpool_socket_obj_t *socket, _request *request) {
10701071
_REPLY_STATIC(socket, request, welcome_js);
10711072
} else if (strcmp(request->path, "/serial.js") == 0) {
10721073
_REPLY_STATIC(socket, request, serial_js);
1074+
} else if (strcmp(request->path, "/style.css") == 0) {
1075+
_REPLY_STATIC(socket, request, style_css);
10731076
} else if (strcmp(request->path, "/favicon.ico") == 0) {
10741077
// TODO: Autogenerate this based on the blinka bitmap and change the
10751078
// palette based on MAC address.

0 commit comments

Comments
 (0)