Full page content, fixes, cleaner settings
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
|
||||
struct RelatedPageLink {
|
||||
|
||||
struct Image {
|
||||
|
||||
let url: String
|
||||
|
||||
let description: String
|
||||
|
||||
let size: Int
|
||||
}
|
||||
|
||||
let title: String
|
||||
|
||||
let description: String
|
||||
|
||||
let url: String
|
||||
|
||||
let image: Image?
|
||||
|
||||
var content: String {
|
||||
var result = ""
|
||||
result += "<a href='\(url)' class='related-box-wrapper'>"
|
||||
result += "<div class='related-box'>"
|
||||
if let image {
|
||||
result += WebsiteImage(
|
||||
rawImagePath: image.url,
|
||||
width: image.size,
|
||||
height: image.size,
|
||||
altText: image.description)
|
||||
.content
|
||||
}
|
||||
result += "<div class='related-content'>"
|
||||
result += "<h3>\(title)</h3>"
|
||||
result += "<p>\(description)</p>"
|
||||
result += "</div></div></a>" // Close related-box-wrapper, related-box
|
||||
return result
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user