Improve settings, sidebars

This commit is contained in:
Christoph Hagen
2024-12-04 22:54:05 +01:00
parent b3cc4a57db
commit c3309197c0
36 changed files with 968 additions and 426 deletions

View File

@ -0,0 +1,14 @@
struct LocalizedPostSettingsFile {
/// The page title for the post feed
let feedTitle: String
/// The page description for the post feed
let feedDescription: String
/// The path to the feed in the final website, appended with the page number
let feedUrlPrefix: String
}
extension LocalizedPostSettingsFile: Codable { }

View File

@ -0,0 +1,12 @@
struct LocalizedSettingsFile {
let navigationBarIconDescription: String
let posts: LocalizedPostSettingsFile
}
extension LocalizedSettingsFile: Codable {
}

View File

@ -0,0 +1,12 @@
struct NavigationBarSettingsFile {
/// The path to the main icon in the navigation bar
let navigationIconPath: String
/// The tags to show in the navigation bar
let navigationTags: [String]
}
extension NavigationBarSettingsFile: Codable { }

View File

@ -0,0 +1,12 @@
import Foundation
struct PostSettingsFile {
/// The number of posts to show in a single page of the news feed
let postsPerPage: Int
/// The maximum width of the main content
let contentWidth: CGFloat
}
extension PostSettingsFile: Codable { }

View File

@ -0,0 +1,17 @@
import Foundation
struct SettingsFile {
/// The file path to the output directory
let outputDirectoryPath: String
let navigationBar: NavigationBarSettingsFile
let posts: PostSettingsFile
let german: LocalizedSettingsFile
let english: LocalizedSettingsFile
}
extension SettingsFile: Codable { }

View File

@ -1,28 +0,0 @@
import Foundation
struct WebsiteDataFile {
let navigationTags: [String]
let german: LocalizedWebsiteDataFile
let english: LocalizedWebsiteDataFile
}
extension WebsiteDataFile: Codable {
}
struct LocalizedWebsiteDataFile {
let title: String
let description: String
let iconDescription: String
}
extension LocalizedWebsiteDataFile: Codable {
}