fix: Added missing HNS assets for Handypedia and other HNS sites
All checks were successful
Build Docker / BuildImage (push) Successful in 49s

This commit is contained in:
Nathan Woodburn 2024-06-20 17:22:42 +10:00
parent 005a306fc6
commit 9b81a0bf18
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
13 changed files with 16 additions and 0 deletions

View File

@ -46,6 +46,22 @@ def send_report(path):
if os.path.isfile('templates/assets/' + path): if os.path.isfile('templates/assets/' + path):
return send_from_directory('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 # Try looking in one of the directories
filename:str = path.split('/')[-1] filename:str = path.split('/')[-1]
if filename.endswith('.png') or filename.endswith('.jpg') \ if filename.endswith('.png') or filename.endswith('.jpg') \

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB