Support GIFs

This commit is contained in:
Christoph Hagen
2025-01-05 21:32:25 +01:00
parent ac7fbdd638
commit c78c359819
9 changed files with 108 additions and 81 deletions

View File

@ -26,16 +26,3 @@ struct PartialSvgImage: HtmlProducer {
result += "</span>"
}
}
struct SvgImage: HtmlProducer {
let imagePath: String
let altText: String
func populate(_ result: inout String) {
result += "<div class='content-image svg-image'>"
result += "<img src='\(imagePath)' loading='lazy' alt='\(altText)'/>"
result += "</div>"
}
}

View File

@ -0,0 +1,14 @@
struct SimpleImage: HtmlProducer {
let imagePath: String
let altText: String
func populate(_ result: inout String) {
result += "<div class='content-image svg-image'>"
result += "<img src='\(imagePath)' loading='lazy' alt='\(altText)'/>"
result += "</div>"
}
}