Support GIFs
This commit is contained in:
@ -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>"
|
||||
}
|
||||
}
|
@ -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>"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user