Improve tag and images view, save website settings
This commit is contained in:
@ -2,9 +2,9 @@ import Foundation
|
||||
|
||||
struct FeedNavigationLink {
|
||||
|
||||
let text: LocalizedText
|
||||
let text: String
|
||||
|
||||
let url: LocalizedText
|
||||
let url: String
|
||||
}
|
||||
|
||||
struct Feed {
|
||||
@ -13,11 +13,11 @@ struct Feed {
|
||||
|
||||
let language: ContentLanguage
|
||||
|
||||
let title: LocalizedText
|
||||
let title: String
|
||||
|
||||
let description: LocalizedText
|
||||
let description: String
|
||||
|
||||
let iconDescription: LocalizedText
|
||||
let iconDescription: String
|
||||
|
||||
let navigationItems: [FeedNavigationLink]
|
||||
|
||||
@ -28,8 +28,8 @@ struct Feed {
|
||||
var result = ""
|
||||
result += "<!DOCTYPE html><html lang=\"\(language.rawValue)\">"
|
||||
let head = PageHead(
|
||||
title: title.getText(for: language),
|
||||
description: description.getText(for: language))
|
||||
title: title,
|
||||
description: description)
|
||||
result += head.content
|
||||
result += "<body>"
|
||||
addNavbar(to: &result)
|
||||
@ -52,14 +52,14 @@ struct Feed {
|
||||
let rightNavigationItems = navigationItems[middleIndex...]
|
||||
|
||||
for item in leftNavigationItems {
|
||||
result += "<a class=\"nav-animate\" href=\"\(item.url.getText(for: language))\">\(item.text.getText(for: language))</a>"
|
||||
result += "<a class=\"nav-animate\" href=\"\(item.url)\">\(item.text)</a>"
|
||||
}
|
||||
|
||||
result += "<a id=\"nav-image\" href=\"/\">"
|
||||
result += "<img class=\"navbar-icon\" src=\"\(navigationIconPath)\" alt=\"\(iconDescription.getText(for: language))\">"
|
||||
result += "<img class=\"navbar-icon\" src=\"\(navigationIconPath)\" alt=\"\(iconDescription)\">"
|
||||
|
||||
for item in rightNavigationItems {
|
||||
result += "<a class=\"nav-animate\" href=\"\(item.url.getText(for: language))\">\(item.text.getText(for: language))</a>"
|
||||
result += "<a class=\"nav-animate\" href=\"\(item.url)\">\(item.text)</a>"
|
||||
}
|
||||
result += "</div></nav>" // Close nav-center, navbar
|
||||
}
|
||||
|
Reference in New Issue
Block a user