Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

favicon improvements #664

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BSB_LAN/BSB_LAN.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5063,7 +5063,7 @@ void loop() {
if (!strcmp(cLineBuffer, "/favicon.ico")) {
printHTTPheader(HTTP_OK, MIME_TYPE_IMAGE_ICON, HTTP_DO_NOT_ADD_CHARSET_TO_HEADER, HTTP_FILE_NOT_GZIPPED, HTTP_NO_DOWNLOAD, HTTP_AUTO_CACHE_AGE);
printToWebClient("\r\n");
printPStr(favicon, sizeof(favicon));
printPStr(favicon, 1+sizeof(favicon));
flushToWebClient();
break;
}
Expand Down
60 changes: 24 additions & 36 deletions BSB_LAN/html_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
// *INDENT-OFF*

const char svg_favicon[] =
"<svg class='logo' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'>"
"<svg class='logo' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'"
" style='background-color:#fff'>" // instead of transparent, for visibility in dark themes
"<path id='b' d='m98 47-63 1c-6 0-12 4-11 11v88c1 5 3 10 10 11l79-1c25-1"
" 24-53 4-61 11-5 18-49-19-49zM48 72h52c1 10-2 18-11 19l-38 1v22l43-1c14"
" 0 14 11 14 20H48Z'/>"
Expand All @@ -18,40 +19,26 @@ const char svg_favicon[] =
"</svg>";

const char favicon[] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,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 0x07, 0x46, 0xA3, 0x91, 0xB7, 0x20, 0x97, 0xCB, 0x11, 0x0A, 0x85, 0x28, 0x95, 0x4A, 0x3C,
0x3D, 0x3D, 0x21, 0x84, 0xA0, 0x5A, 0xAD, 0xF2, 0xF8, 0xF8, 0xC8, 0xDD, 0xDD, 0x1D, 0xAF, 0xAF,
0xAF, 0xDF, 0x05, 0x8E, 0xE3, 0xB8, 0x53, 0x28, 0x14, 0xC8, 0x64, 0x32, 0x94, 0x4A, 0x25, 0x8A,
0xC5, 0x22, 0x81, 0x40, 0x80, 0x66, 0xB3, 0x49, 0x36, 0x9B, 0x65, 0x3E, 0x9F, 0xA3, 0xAA, 0x2A,
0xC1, 0x60, 0xF0, 0x2C, 0x58, 0xAD, 0x56, 0xF8, 0xFD, 0x7E, 0x84, 0x10, 0xEE, 0x9F, 0x2D, 0xCB,
0xA2, 0x52, 0xA9, 0x00, 0x30, 0x99, 0x4C, 0x30, 0x0C, 0x83, 0x6E, 0xB7, 0x4B, 0x36, 0x9B, 0x05,
0x60, 0x3C, 0x1E, 0x13, 0x8D, 0x46, 0x59, 0x2C, 0x16, 0xE7, 0x16, 0xA4, 0x94, 0x17, 0x03, 0xE0,
0x38, 0x0E, 0x00, 0xA7, 0xD3, 0x89, 0xDF, 0x99, 0x5F, 0x39, 0x1E, 0x8F, 0x3F, 0xD7, 0xF8, 0xAF,
0xF9, 0x02, 0x05, 0xC4, 0x09, 0xEE, 0x49, 0x43, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45,
0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x10, 0x10, 0x10, 0x00, 0x01, 0x00, 0x04, 0x00, 0x28, 0x01,
0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00,
0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x42, 0x40, 0x00, 0x80, 0x83, 0x81, 0x00, 0x93, 0x96, 0x94, 0x00, 0xa7, 0xaa,
0xa8, 0x00, 0xb0, 0xb3, 0xb1, 0x00, 0xbe, 0xc1, 0xbe, 0x00, 0xc3, 0xc7, 0xc4, 0x00, 0xcb, 0xcf,
0xcc, 0x00, 0xd2, 0xd6, 0xd3, 0x00, 0xe2, 0xe5, 0xe3, 0x00, 0xea, 0xed, 0xeb, 0x00, 0xf0, 0xf4,
0xf1, 0x00, 0xf4, 0xf8, 0xf5, 0x00, 0xf9, 0xfc, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0xee,
0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xb0, 0x00,
0x0a, 0x0e, 0x0a, 0xc0, 0xed, 0x0d, 0xa0, 0xbc, 0xc4, 0x05, 0x02, 0xc0, 0xd7, 0x0d, 0xa0, 0xee,
0xe3, 0x00, 0x01, 0xb0, 0x80, 0x0d, 0xa0, 0xee, 0xe4, 0x04, 0x03, 0xc0, 0x0e, 0x0c, 0xc0, 0xee,
0xea, 0x00, 0x0a, 0xe0, 0xee, 0x0e, 0xee, 0xee, 0xee, 0x81, 0x8e, 0xee, 0xee, 0xee, 0xee, 0xee,
0xee, 0xe7, 0xce, 0xee, 0xee, 0xee, 0xec, 0xbb, 0xce, 0xbb, 0xbd, 0xec, 0xbb, 0xce, 0xd0, 0x00,
0x6b, 0x00, 0x05, 0xc0, 0x00, 0x6c, 0xd0, 0x99, 0x0c, 0xb9, 0x90, 0xb0, 0x99, 0x0c, 0xd0, 0x00,
0x6d, 0x40, 0x0b, 0xd0, 0x00, 0x6e, 0xd0, 0x77, 0x0d, 0x07, 0x79, 0xd0, 0x77, 0x0e, 0xe0, 0x00,
0xee, 0xe0, 0x00, 0xe0, 0x00, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

const char graph_html[] =
Expand Down Expand Up @@ -426,7 +413,8 @@ const char header_html[] =
"<html><head>" NEWLINE
"<meta http-equiv=\"content-type\" content=\"text/html;charset=UTF-8\">" NEWLINE
"<meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,minimum-scale=1.0\">" NEWLINE
"<link rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon.svg\">" NEWLINE
"<link rel=\"icon\" href=\"/favicon.svg\">" NEWLINE // without this, most browsers will try to load /favicon.ico
// "<link rel=\"icon\" sizes=\"16x16\" href=\"/favicon.ico\">" NEWLINE // not used by svg capable browser, anyway (?)
"<title>BSB-LAN</title>" NEWLINE
"<style>A{text-decoration:none}A:visited,active{color:blue}A:hover{color:red;background-color:yellow}A:focus{color:red}" NEWLINE
"a.logo:hover{background-color:initial;text-decoration:initial}" NEWLINE
Expand Down