[main] Images images images
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 52s

This commit is contained in:
2024-12-30 23:20:54 +01:00
parent 15bda3d3d5
commit 57dde1df71
17 changed files with 11 additions and 9 deletions

View File

@@ -156,7 +156,7 @@ class ImageService:
return FileResponse( file_path )
def image_tag(self, category: str, image_type: str, filename: str, alt: str = "", width: int = None,
height: int = None) -> str:
height: int = None,css_class:str=None) -> str:
"""
Generate an HTML <img> tag with default sizes if dimensions are not provided.
"""
@@ -172,6 +172,9 @@ class ImageService:
tag += f' width="{width}"'
if height:
tag += f' height="{height}"'
if css_class:
tag += f' class="{css_class}"'
tag += ">"
return tag