fix: Added missing HNS assets for Handypedia and other HNS sites
All checks were successful
Build Docker / BuildImage (push) Successful in 49s
16
server.py
@ -46,6 +46,22 @@ def send_report(path):
|
||||
if os.path.isfile('templates/assets/' + path):
|
||||
return send_from_directory('templates/assets', path)
|
||||
|
||||
# Custom matching for images
|
||||
pathMap = {
|
||||
"img/hns/w": "img/external/HNS/white",
|
||||
"img/hns/b": "img/external/HNS/black",
|
||||
"img/hns": "img/external/HNS/black",
|
||||
}
|
||||
|
||||
for key in pathMap:
|
||||
print(path, key)
|
||||
if path.startswith(key):
|
||||
tmpPath = path.replace(key, pathMap[key])
|
||||
print(tmpPath)
|
||||
if os.path.isfile('templates/assets/' + tmpPath):
|
||||
return send_from_directory('templates/assets', tmpPath)
|
||||
|
||||
|
||||
# Try looking in one of the directories
|
||||
filename:str = path.split('/')[-1]
|
||||
if filename.endswith('.png') or filename.endswith('.jpg') \
|
||||
|
BIN
templates/assets/img/external/HNS/black/android-chrome-192x192.png
vendored
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
templates/assets/img/external/HNS/black/apple-touch-icon.png
vendored
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
templates/assets/img/external/HNS/black/favicon-16x16.png
vendored
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
templates/assets/img/external/HNS/black/favicon-32x32.png
vendored
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
templates/assets/img/external/HNS/black/favicon.ico
vendored
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
templates/assets/img/external/HNS/black/favicon.png
vendored
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
templates/assets/img/external/HNS/white/android-chrome-192x192.png
vendored
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
templates/assets/img/external/HNS/white/apple-touch-icon.png
vendored
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
templates/assets/img/external/HNS/white/favicon-16x16.png
vendored
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
templates/assets/img/external/HNS/white/favicon-32x32.png
vendored
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
templates/assets/img/external/HNS/white/favicon.ico
vendored
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
templates/assets/img/external/HNS/white/favicon.png
vendored
Normal file
After Width: | Height: | Size: 29 KiB |