Clean up theme compiler and thumbnail generation

Fix signup not clearning blanks - Thanks to Fennec
This commit is contained in:
Michał Gdula 2023-04-01 16:59:17 +00:00
parent 0e24004c0b
commit 95e5f3938f
7 changed files with 55 additions and 73 deletions

View file

@ -34,10 +34,12 @@ def generate_thumbnail(file_name, resolution, ext=None):
ext = "jpeg"
# Set resolution based on preset resolutions
if resolution in ['thumb', 'thumbnail']:
res_x, res_y = (400, 400)
elif resolution in ['prev', 'preview']:
if resolution in ['prev', 'preview']:
res_x, res_y = (1920, 1080)
elif resolution in ['thumb', 'thumbnail']:
res_x, res_y = (400, 400)
elif resolution in ['icon', 'favicon']:
res_x, res_y = (10, 10)
elif len(resolution.split('x')) == 2:
res_x, res_y = resolution.split('x')
else: