mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-09 00:28:53 +01:00
Add figure to gallery images so that they separate when viewed
This commit is contained in:
parent
46226f963e
commit
8656bffe18
@ -147,11 +147,11 @@ final class RedditLinkData: Codable {
|
|||||||
var html = ""
|
var html = ""
|
||||||
for item in galleryDataItems {
|
for item in galleryDataItems {
|
||||||
if let mediaID = item.mediaID, let itemMetadata = mediaMetadata[mediaID], let imageURL = itemMetadata.image?.url {
|
if let mediaID = item.mediaID, let itemMetadata = mediaMetadata[mediaID], let imageURL = itemMetadata.image?.url {
|
||||||
html += "<img src=\"\(imageURL)\" "
|
html += "<figure><img src=\"\(imageURL)\" "
|
||||||
if let width = itemMetadata.image?.width, let height = itemMetadata.image?.height {
|
if let width = itemMetadata.image?.width, let height = itemMetadata.image?.height {
|
||||||
html += "width=\"\(width)\" height=\"\(height)\" "
|
html += "width=\"\(width)\" height=\"\(height)\" "
|
||||||
}
|
}
|
||||||
html += ">"
|
html += "></figure>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
html += linkURL(url, linkOutOnly: false)
|
html += linkURL(url, linkOutOnly: false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user