mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-11 23:21:38 +02:00
auto create favicon ico header
This commit is contained in:
parent
6cb0b99de3
commit
d0e7ee393c
4 changed files with 28 additions and 139 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -5,7 +5,7 @@
|
||||||
.vscode/ipch
|
.vscode/ipch
|
||||||
.vscode/extensions.json
|
.vscode/extensions.json
|
||||||
src/config/config_override.h
|
src/config/config_override.h
|
||||||
src/html/h/*
|
src/web/html/h/*
|
||||||
/**/Debug
|
/**/Debug
|
||||||
/**/v16/*
|
/**/v16/*
|
||||||
*.db
|
*.db
|
||||||
|
|
|
@ -5,12 +5,11 @@ import glob
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
def convert2Header(inFile, compress):
|
def convert2Header(inFile):
|
||||||
fileType = inFile.split(".")[1]
|
fileType = inFile.split(".")[1]
|
||||||
define = inFile.split(".")[0].upper()
|
define = inFile.split(".")[0].upper()
|
||||||
define2 = inFile.split(".")[1].upper()
|
define2 = inFile.split(".")[1].upper()
|
||||||
inFileVarName = inFile.replace(".", "_")
|
inFileVarName = inFile.replace(".", "_")
|
||||||
print(inFile + ", compress: " + str(compress))
|
|
||||||
|
|
||||||
if os.getcwd()[-4:] != "html":
|
if os.getcwd()[-4:] != "html":
|
||||||
outName = "html/" + "h/" + inFileVarName + ".h"
|
outName = "html/" + "h/" + inFileVarName + ".h"
|
||||||
|
@ -20,46 +19,36 @@ def convert2Header(inFile, compress):
|
||||||
outName = "h/" + inFileVarName + ".h"
|
outName = "h/" + inFileVarName + ".h"
|
||||||
Path("h").mkdir(exist_ok=True)
|
Path("h").mkdir(exist_ok=True)
|
||||||
|
|
||||||
f = open(inFile, "r")
|
if fileType == "ico":
|
||||||
|
f = open(inFile, "rb")
|
||||||
|
else:
|
||||||
|
f = open(inFile, "r")
|
||||||
data = f.read()
|
data = f.read()
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
if fileType == "html":
|
if fileType == "css":
|
||||||
if False == compress:
|
|
||||||
data = data.replace('\n', '')
|
|
||||||
data = re.sub(r"\>\s+\<", '><', data) # whitespaces between xml tags
|
|
||||||
data = re.sub(r"(\r\n|\r|\n)(\s+|\s?)", '', data) # whitespaces inner javascript
|
|
||||||
length = len(data) # get unescaped length
|
|
||||||
if False == compress:
|
|
||||||
data = re.sub(r"\"", '\\\"', data) # escape quotation marks
|
|
||||||
elif fileType == "js":
|
|
||||||
#data = re.sub(r"(\r\n|\r|\n)(\s+|\s?)", '', data) # whitespaces inner javascript
|
|
||||||
#data = re.sub(r"\s?(\=|\!\=|\{|,)+\s?", r'\1', data) # whitespaces inner javascript
|
|
||||||
length = len(data) # get unescaped length
|
|
||||||
if False == compress:
|
|
||||||
data = re.sub(r"\"", '\\\"', data) # escape quotation marks
|
|
||||||
else:
|
|
||||||
data = data.replace('\n', '')
|
data = data.replace('\n', '')
|
||||||
data = re.sub(r"(\;|\}|\:|\{)\s+", r'\1', data) # whitespaces inner css
|
data = re.sub(r"(\;|\}|\:|\{)\s+", r'\1', data) # whitespaces inner css
|
||||||
length = len(data) # get unescaped length # get unescaped length
|
|
||||||
|
length = len(data)
|
||||||
|
|
||||||
f = open(outName, "w")
|
f = open(outName, "w")
|
||||||
f.write("#ifndef __{}_{}_H__\n".format(define, define2))
|
f.write("#ifndef __{}_{}_H__\n".format(define, define2))
|
||||||
f.write("#define __{}_{}_H__\n".format(define, define2))
|
f.write("#define __{}_{}_H__\n".format(define, define2))
|
||||||
if compress:
|
|
||||||
zipped = gzip.compress(bytes(data, 'utf-8'))
|
if fileType == "ico":
|
||||||
zippedStr = ""
|
zipped = gzip.compress(bytes(data))
|
||||||
for i in range(len(zipped)):
|
|
||||||
zippedStr += "0x{:02x}".format(zipped[i]) #hex(zipped[i])
|
|
||||||
if (i + 1) != len(zipped):
|
|
||||||
zippedStr += ", "
|
|
||||||
if (i + 1) % 16 == 0 and i != 0:
|
|
||||||
zippedStr += "\n"
|
|
||||||
f.write("#define {}_len {}\n".format(inFileVarName, len(zipped)))
|
|
||||||
f.write("const uint8_t {}[] PROGMEM = {{\n{}}};\n".format(inFileVarName, zippedStr))
|
|
||||||
else:
|
else:
|
||||||
f.write("const char {}[] PROGMEM = \"{}\";\n".format(inFileVarName, data))
|
zipped = gzip.compress(bytes(data, 'utf-8'))
|
||||||
f.write("const uint32_t {}_len = {};\n".format(inFileVarName, length))
|
zippedStr = ""
|
||||||
|
for i in range(len(zipped)):
|
||||||
|
zippedStr += "0x{:02x}".format(zipped[i]) #hex(zipped[i])
|
||||||
|
if (i + 1) != len(zipped):
|
||||||
|
zippedStr += ", "
|
||||||
|
if (i + 1) % 16 == 0 and i != 0:
|
||||||
|
zippedStr += "\n"
|
||||||
|
f.write("#define {}_len {}\n".format(inFileVarName, len(zipped)))
|
||||||
|
f.write("const uint8_t {}[] PROGMEM = {{\n{}}};\n".format(inFileVarName, zippedStr))
|
||||||
f.write("#endif /*__{}_{}_H__*/\n".format(define, define2))
|
f.write("#endif /*__{}_{}_H__*/\n".format(define, define2))
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
@ -69,17 +58,17 @@ if os.getcwd()[-4:] != "html":
|
||||||
dir = "web/html/" + dir
|
dir = "web/html/" + dir
|
||||||
|
|
||||||
for f in os.listdir(dir):
|
for f in os.listdir(dir):
|
||||||
if not f.startswith('favicon_ico_gz'):
|
#if not f.startswith('favicon_ico_gz'):
|
||||||
os.remove(os.path.join(dir, f))
|
os.remove(os.path.join(dir, f))
|
||||||
|
|
||||||
# grab all files with following extensions
|
# grab all files with following extensions
|
||||||
if os.getcwd()[-4:] != "html":
|
if os.getcwd()[-4:] != "html":
|
||||||
os.chdir('./web/html')
|
os.chdir('./web/html')
|
||||||
types = ('*.html', '*.css', '*.js') # the tuple of file types
|
types = ('*.html', '*.css', '*.js', '*.ico') # the tuple of file types
|
||||||
files_grabbed = []
|
files_grabbed = []
|
||||||
for files in types:
|
for files in types:
|
||||||
files_grabbed.extend(glob.glob(files))
|
files_grabbed.extend(glob.glob(files))
|
||||||
|
|
||||||
# go throw the array
|
# go throw the array
|
||||||
for val in files_grabbed:
|
for val in files_grabbed:
|
||||||
convert2Header(val, True)
|
convert2Header(val)
|
||||||
|
|
|
@ -1,100 +0,0 @@
|
||||||
#ifndef __FAVICON_ICO_GZ_H__
|
|
||||||
#define __FAVICON_ICO_GZ_H__
|
|
||||||
#define favicon_ico_gz_len 1533
|
|
||||||
const uint8_t favicon_ico_gz[] PROGMEM = {0x1f, 0x8b, 0x08, 0x08, 0xf2, 0xc5, 0xd5, 0x62, 0x04, 0x00, 0x66, 0x61, 0x76, 0x69, 0x63, 0x6f,
|
|
||||||
0x6e, 0x2e, 0x69, 0x63, 0x6f, 0x00, 0xed, 0x5c, 0x49, 0x68, 0x13, 0x51, 0x18, 0xfe, 0x62, 0xa3,
|
|
||||||
0x51, 0x28, 0xd6, 0x83, 0x82, 0xa0, 0x98, 0xb8, 0x1c, 0xbc, 0x59, 0x11, 0x5c, 0x50, 0xac, 0x88,
|
|
||||||
0x8a, 0xb8, 0xdd, 0x3c, 0x89, 0xd0, 0x93, 0x7a, 0x53, 0x51, 0x9b, 0x80, 0x4b, 0x46, 0xad, 0xfb,
|
|
||||||
0xd2, 0xb4, 0x2e, 0xb8, 0xa3, 0xc6, 0xba, 0xe1, 0x02, 0xae, 0xad, 0x0a, 0x26, 0x3d, 0xe8, 0xc5,
|
|
||||||
0x83, 0x57, 0x31, 0x2d, 0xc1, 0x8b, 0xb7, 0x92, 0x63, 0x0e, 0xa1, 0xcf, 0xff, 0xcf, 0xbc, 0xc9,
|
|
||||||
0x32, 0xa4, 0x66, 0xcf, 0x4b, 0xf3, 0xfa, 0xc3, 0xc7, 0x97, 0xcc, 0xcc, 0xcb, 0xf7, 0xbe, 0x6f,
|
|
||||||
0x26, 0x6f, 0x26, 0xf3, 0x92, 0x00, 0x0e, 0x34, 0x61, 0xda, 0x34, 0x66, 0x0f, 0xf6, 0x38, 0x81,
|
|
||||||
0xa5, 0x00, 0x3c, 0x1e, 0xf3, 0xf9, 0x53, 0x5a, 0x7e, 0x8f, 0x96, 0xad, 0x59, 0x63, 0x3e, 0x5f,
|
|
||||||
0xb8, 0x16, 0xd8, 0x30, 0x03, 0x58, 0x48, 0xdb, 0xd0, 0x2a, 0x5a, 0x62, 0x2e, 0x1f, 0xad, 0x06,
|
|
||||||
0xc3, 0x5d, 0xc6, 0x60, 0x38, 0x20, 0x08, 0x5e, 0xf1, 0x08, 0x77, 0x09, 0x42, 0xf4, 0xe2, 0xd7,
|
|
||||||
0x67, 0x2f, 0x56, 0xf5, 0x7b, 0x21, 0x18, 0xfc, 0xb8, 0x63, 0x0b, 0x7e, 0x11, 0x84, 0x77, 0x0b,
|
|
||||||
0xee, 0x2e, 0x9a, 0x03, 0x6f, 0xab, 0x1b, 0x82, 0x31, 0x38, 0x10, 0x38, 0xce, 0xaf, 0x51, 0x72,
|
|
||||||
0x7b, 0xd2, 0xe6, 0xf6, 0xbf, 0xbf, 0xf6, 0xcc, 0x2e, 0xbd, 0x7d, 0xf2, 0x35, 0x76, 0x88, 0x20,
|
|
||||||
0xf6, 0x96, 0xde, 0x3e, 0xe0, 0xa5, 0x76, 0xad, 0xd4, 0xfe, 0x64, 0xc9, 0xed, 0xa9, 0xff, 0xd4,
|
|
||||||
0xd6, 0x4f, 0x68, 0x2f, 0xb9, 0x3d, 0xf5, 0x9f, 0x70, 0xb8, 0xaf, 0x03, 0x4b, 0x4b, 0x6e, 0x4f,
|
|
||||||
0xfd, 0xe7, 0x7d, 0x4b, 0x6d, 0x4f, 0x96, 0xd3, 0xde, 0x7a, 0x8d, 0x72, 0xda, 0x73, 0x7d, 0xdb,
|
|
||||||
0x8f, 0x29, 0x45, 0xb5, 0x7f, 0x84, 0x4e, 0xfb, 0x71, 0xda, 0xb1, 0x19, 0x9d, 0x05, 0xb5, 0xef,
|
|
||||||
0xc5, 0xa5, 0xd1, 0x8e, 0x75, 0xef, 0x56, 0x9c, 0xfa, 0x6f, 0xfb, 0x87, 0x58, 0x86, 0x3c, 0x75,
|
|
||||||
0x70, 0x13, 0x96, 0xe5, 0x6a, 0x1f, 0x19, 0xe8, 0x6a, 0x47, 0x81, 0xd5, 0xea, 0x41, 0x7b, 0x56,
|
|
||||||
0xfb, 0x50, 0xe0, 0x72, 0xae, 0xed, 0xbe, 0x1a, 0x98, 0xcc, 0xc8, 0xf9, 0x1a, 0x73, 0x70, 0x9a,
|
|
||||||
0xda, 0x8f, 0xda, 0xf6, 0xb9, 0x81, 0x49, 0xfd, 0x3e, 0xbc, 0xa5, 0xfd, 0xd7, 0xcf, 0xf9, 0x8f,
|
|
||||||
0xf6, 0x1a, 0xff, 0xeb, 0xe7, 0x04, 0x42, 0x13, 0xc3, 0x20, 0x84, 0x00, 0x57, 0x14, 0x68, 0x89,
|
|
||||||
0x01, 0xee, 0x38, 0xb0, 0xfa, 0x08, 0x70, 0x64, 0xb5, 0x39, 0xce, 0x78, 0x08, 0x6b, 0x0a, 0x1f,
|
|
||||||
0x67, 0x2c, 0x0c, 0xf3, 0x72, 0xf1, 0x18, 0xab, 0xe4, 0x3e, 0x4f, 0x23, 0x88, 0x37, 0xbc, 0xae,
|
|
||||||
0xcf, 0x07, 0xaf, 0xf9, 0x1e, 0x48, 0x83, 0x97, 0xf1, 0xba, 0x43, 0x5b, 0xf0, 0x86, 0x8f, 0x87,
|
|
||||||
0x4c, 0xd0, 0xfe, 0x5d, 0xc5, 0xeb, 0x28, 0x97, 0x61, 0x33, 0xdf, 0x34, 0x78, 0x39, 0x8f, 0x55,
|
|
||||||
0xaa, 0xf4, 0x23, 0x03, 0x81, 0x53, 0x56, 0x1f, 0x54, 0xe8, 0xb3, 0xe6, 0x50, 0x28, 0x70, 0xde,
|
|
||||||
0xea, 0x83, 0x0a, 0xfd, 0x64, 0x1f, 0xc2, 0x81, 0x93, 0xbc, 0x0d, 0xf1, 0x01, 0x15, 0xfa, 0x49,
|
|
||||||
0x0c, 0x74, 0x9d,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0x15, 0x54, 0xa9, 0x16, 0xbb,
|
|
||||||
0x71, 0xe5, 0x7f, 0xfa, 0x91, 0x50, 0xf7, 0x6d, 0x21, 0x8c, 0x09, 0xa8, 0x5e, 0x39, 0x48, 0xf3,
|
|
||||||
0x6a, 0x86, 0x7e, 0x59, 0xda, 0xfd, 0x07, 0x31, 0x97, 0x81, 0xe2, 0x2a, 0xdd, 0x87, 0xb4, 0xfe,
|
|
||||||
0x9d, 0x62, 0xb5, 0xe9, 0xde, 0xcb, 0x1c, 0x3a, 0xef, 0x0c, 0xf5, 0x77, 0xe0, 0xcf, 0x17, 0x1f,
|
|
||||||
0xe6, 0xa1, 0xb8, 0xe2, 0x3e, 0x5c, 0x23, 0x94, 0xa4, 0xfd, 0xd1, 0x07, 0x0f, 0x5d, 0x03, 0x45,
|
|
||||||
0xad, 0x73, 0x3f, 0x3f, 0xe6, 0x65, 0x28, 0xae, 0x92, 0x7d, 0x70, 0x4e, 0x9e, 0xe6, 0xe9, 0x24,
|
|
||||||
0xac, 0x23, 0x2c, 0x20, 0x4c, 0x27, 0x34, 0x13, 0x78, 0xf9, 0x24, 0xc2, 0x44, 0x7e, 0x7c, 0x96,
|
|
||||||
0xb0, 0x91, 0xb0, 0x90, 0x30, 0xd3, 0x5c, 0xe7, 0x6c, 0x26, 0x4c, 0x25, 0xb4, 0x30, 0x02, 0x84,
|
|
||||||
0x9f, 0x84, 0x58, 0x1a, 0xee, 0xb8, 0xc7, 0xd9, 0x96, 0xf0, 0x38, 0xfd, 0x23, 0x1e, 0xa7, 0x10,
|
|
||||||
0x1e, 0x97, 0x10, 0x51, 0x0b, 0x2d, 0x23, 0xfe, 0x98, 0x3b, 0xd1, 0x16, 0x6f, 0x8b, 0xbb, 0x13,
|
|
||||||
0x0b, 0xe5, 0x3d, 0x0a, 0xa3, 0xf8, 0xfb, 0x14, 0xb9, 0x3e, 0xbb, 0x45, 0xac, 0xed, 0xe5, 0x67,
|
|
||||||
0x38, 0x2f, 0x8f, 0x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, 0x03, 0xcd, 0xfc,
|
|
||||||
0x67, 0x65, 0xc0, 0xf3, 0x0a, 0xf4, 0xbc, 0x5b, 0x33, 0xff, 0x3c, 0x97, 0x74, 0xd4, 0x9e, 0x81,
|
|
||||||
0x56, 0xfe, 0x73, 0x67, 0xd0, 0xa3, 0x95, 0x7f, 0x13, 0x87, 0x6d, 0x19, 0xcc, 0xd6, 0xcc, 0x3f,
|
|
||||||
0x1f, 0xf3, 0x47, 0x32, 0xb7, 0xd5, 0xce, 0xbf, 0x3c, 0x0e, 0x34, 0xf7, 0x9f, 0xcc, 0x40, 0x73,
|
|
||||||
0xff, 0x3c, 0x26, 0x6e, 0xb3, 0xda, 0xc8, 0xef, 0x57, 0x5d, 0xd1, 0xca, 0xbf, 0x6d, 0xfc, 0x17,
|
|
||||||
0x34, 0x15, 0xd9, 0xe7, 0xc5, 0x55, 0x5d, 0xfd, 0x17, 0x98, 0x41, 0x43, 0xfb, 0xb7, 0x32, 0xa0,
|
|
||||||
0xef, 0xd8, 0x5d, 0xd3, 0xd5, 0x7f, 0x66, 0x06, 0xba, 0xfa, 0xcf, 0xcc, 0x40, 0x57, 0xff, 0x56,
|
|
||||||
0x06, 0xe4, 0xf9, 0xba, 0xae, 0xfe, 0x33, 0x33, 0xd0, 0xd5, 0x7f, 0x66, 0x06, 0xba, 0xfa, 0xcf,
|
|
||||||
0x18, 0x0f, 0x4e, 0xeb, 0xea, 0xdf, 0xaa, 0x71, 0xff, 0xe3, 0xfe, 0x1b, 0xc4, 0xff, 0x4e, 0x94,
|
|
||||||
0x59, 0x1d, 0x5b, 0xb1, 0x33, 0xaf, 0xf7, 0x7a, 0xf4, 0x1f, 0xc4, 0x13, 0xf1, 0x9c, 0x7e, 0x4e,
|
|
||||||
0x5a, 0x66, 0x19, 0x06, 0x26, 0x50, 0x06, 0xf7, 0xc7, 0x94, 0xff, 0x0a, 0x79, 0x2f, 0x2a, 0x83,
|
|
||||||
0xfa, 0xf1, 0xff, 0x54, 0x7c, 0x85, 0x13, 0x15, 0x2e, 0xce, 0x80, 0x7e, 0x83, 0xf2, 0xa0, 0xce,
|
|
||||||
0xfd, 0x57, 0xc5, 0xbb, 0x55, 0xdb, 0xb7, 0xa3, 0x89, 0x33, 0xa8, 0x53, 0xff, 0xcf, 0xaa, 0xe9,
|
|
||||||
0x3d, 0x33, 0x03, 0xf2, 0xfb, 0xb0, 0xce, 0xfc, 0xd7, 0xc4, 0xbb, 0x3d, 0x83, 0x3a, 0xf1, 0x5f,
|
|
||||||
0x53, 0xef, 0x59, 0xef, 0x85, 0xad, 0x08, 0x2a, 0xf6, 0xff, 0x5c, 0x85, 0x77, 0x7b, 0x06, 0x8a,
|
|
||||||
0xfc, 0x2b, 0xf5, 0x6e, 0xcf, 0xa0, 0xa6, 0xfe, 0x83, 0x58, 0x54, 0xc9, 0xf3, 0x7b, 0xb9, 0xc5,
|
|
||||||
0x19, 0xd0, 0xff, 0x9c, 0x2c, 0xaa, 0x95, 0xff, 0xb1, 0x50, 0xe3, 0xfe, 0xc7, 0xfd, 0xb7, 0x56,
|
|
||||||
0xc8, 0xff, 0x50, 0xb8, 0xeb, 0x3e, 0xc6, 0x58, 0xd1, 0x7f, 0xfd, 0xdc, 0x6f, 0xad, 0x8c, 0xff,
|
|
||||||
0x17, 0x3f, 0x7e, 0xdc, 0x9c, 0x88, 0x31, 0x56, 0xdb, 0xe9, 0x2f, 0x8c, 0xc8, 0x5f, 0x6f, 0x99,
|
|
||||||
0xfe, 0xc7, 0xa4, 0xf7, 0x62, 0x32, 0x68, 0x54, 0xef, 0xb6, 0x0c, 0x1e, 0x17, 0xe9, 0xff, 0x65,
|
|
||||||
0x23, 0x78, 0x2f, 0x24, 0x03, 0x95, 0xde, 0x69, 0x1e, 0xf8, 0x14, 0x03, 0x35, 0x28, 0xce, 0x60,
|
|
||||||
0x91, 0x1b, 0x4f, 0x6c, 0xfe, 0xd5, 0x79, 0xf7, 0xe1, 0x44, 0x6a, 0xce, 0xab, 0x03, 0xe7, 0x51,
|
|
||||||
0x83, 0xca, 0x91, 0x41, 0xe6, 0x77, 0xfc, 0xdf, 0xfd, 0xfe, 0xd0, 0xe3, 0x42, 0x0d, 0xea, 0x93,
|
|
||||||
0x17, 0xc7, 0xed, 0xf3, 0xbe, 0x74, 0x1c, 0x9c, 0x43, 0x0d, 0x6a, 0xc9, 0x12, 0x4c, 0x24, 0xdf,
|
|
||||||
0xaf, 0x6c, 0xfe, 0xdf, 0xab, 0xf4, 0xae, 0x28, 0x83, 0xd7, 0x84, 0xba, 0xf1, 0x6e, 0x81, 0xb7,
|
|
||||||
0x41, 0x0d, 0xca, 0xca, 0x00, 0xcb, 0x11, 0x75, 0xd1, 0xd7, 0x14, 0x0d, 0xc9, 0x21, 0xc9, 0x51,
|
|
||||||
0xc9, 0xfb, 0x24, 0x2f, 0x97, 0x3c, 0x5b, 0xf2, 0x54, 0xc9, 0x2e, 0xc9, 0x4d, 0x7d, 0x26, 0x3b,
|
|
||||||
0xe2, 0x26, 0xc3, 0x62, 0x9f, 0xe4, 0xe5, 0x92, 0x57, 0x49, 0x5e, 0x2d, 0xb9, 0x4d, 0xf2, 0x4a,
|
|
||||||
0xc3, 0xe4, 0x15, 0x21, 0xb9, 0x7d, 0x54, 0x72, 0xbb, 0xe4, 0x56, 0xc9, 0x33, 0x25, 0x37, 0x4b,
|
|
||||||
0x76, 0x49, 0x6e, 0x92, 0xec, 0xb0, 0xf4, 0xec, 0x1c, 0x93, 0x1c, 0x97, 0x9c, 0x90, 0x3c, 0x22,
|
|
||||||
0x59, 0x58, 0x7c, 0x46, 0xf2, 0x77, 0xc9, 0x7f, 0x25, 0x8b, 0x82, 0xd8, 0x41, 0x7f, 0x3b, 0x91,
|
|
||||||
0xec, 0x8f, 0x10, 0x21, 0x66, 0xfe, 0x67, 0x06, 0xe6, 0x16, 0x21, 0x62, 0xcc, 0x6e, 0x21, 0xe2,
|
|
||||||
0xcc, 0x6d, 0x42, 0x24, 0x98, 0xfd, 0x42, 0x8c, 0x30, 0x0b, 0x2a, 0xf6, 0xcf, 0x7c, 0x87, 0x72,
|
|
||||||
0x61, 0x4e, 0xe4, 0x67, 0x3f, 0xf3, 0x08, 0x7d, 0x28, 0x4f, 0x16, 0x1c, 0x26, 0x1b, 0x4d, 0xb4,
|
|
||||||
0x90, 0x56, 0x85, 0x5c, 0xb4, 0x11, 0x6d, 0x1a, 0x6d, 0x21, 0x55, 0x52, 0x8e, 0x31, 0xf8, 0x31,
|
|
||||||
0x2f, 0xe3, 0x75, 0xff, 0x00, 0xd3, 0x39, 0x74, 0x2c, 0x6e, 0x57, 0x00, 0x00};
|
|
||||||
#endif /*__FAVICON_ICO_GZ_H__*/
|
|
|
@ -14,7 +14,7 @@
|
||||||
#include "html/h/login_html.h"
|
#include "html/h/login_html.h"
|
||||||
#include "html/h/style_css.h"
|
#include "html/h/style_css.h"
|
||||||
#include "html/h/api_js.h"
|
#include "html/h/api_js.h"
|
||||||
#include "html/h/favicon_ico_gz.h"
|
#include "html/h/favicon_ico.h"
|
||||||
#include "html/h/setup_html.h"
|
#include "html/h/setup_html.h"
|
||||||
#include "html/h/visualization_html.h"
|
#include "html/h/visualization_html.h"
|
||||||
#include "html/h/update_html.h"
|
#include "html/h/update_html.h"
|
||||||
|
@ -178,7 +178,7 @@ void web::onApiJs(AsyncWebServerRequest *request) {
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void web::onFavicon(AsyncWebServerRequest *request) {
|
void web::onFavicon(AsyncWebServerRequest *request) {
|
||||||
static const char favicon_type[] PROGMEM = "image/x-icon";
|
static const char favicon_type[] PROGMEM = "image/x-icon";
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, favicon_type, favicon_ico_gz, favicon_ico_gz_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, favicon_type, favicon_ico, favicon_ico_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue