Add image gallery block
This commit is contained in:
@ -84,14 +84,7 @@ final class FeedPageGenerator {
|
||||
}
|
||||
|
||||
func swiperInitScript(posts: [FeedEntryData]) -> String {
|
||||
var result = "<script> window.onload = () => { "
|
||||
for post in posts {
|
||||
guard post.requiresSwiper else {
|
||||
continue
|
||||
}
|
||||
result += ImageGallery.swiperInit(id: post.entryId)
|
||||
}
|
||||
result += "}; </script>"
|
||||
return result
|
||||
let ids = posts.filter { $0.requiresSwiper }.map { $0.entryId }
|
||||
return ImageGallery.combinedFootor(ids: ids)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user