57 lines
1.2 KiB
Swift
57 lines
1.2 KiB
Swift
import Foundation
|
|
|
|
extension Settings {
|
|
|
|
static let mock: Settings = .init(
|
|
outputDirectoryPath: "/some/path",
|
|
navigationBar: .init(iconPath: "/some/other/path", tags: []),
|
|
posts: .mock,
|
|
pages: .mock,
|
|
german: .german,
|
|
english: .english)
|
|
}
|
|
|
|
extension PostSettings {
|
|
|
|
static var mock: PostSettings {
|
|
.init(postsPerPage: 20, contentWidth: 600)
|
|
}
|
|
}
|
|
|
|
extension PageSettings {
|
|
|
|
static var mock: PageSettings {
|
|
.init(pageUrlPrefix: "pages", contentWidth: 600)
|
|
}
|
|
}
|
|
|
|
extension LocalizedSettings {
|
|
|
|
static var german: LocalizedSettings {
|
|
.init(navigationBarIconDescription: "Ein Symbol",
|
|
posts: .german)
|
|
}
|
|
|
|
static var english: LocalizedSettings {
|
|
.init(navigationBarIconDescription: "An icon",
|
|
posts: .english)
|
|
}
|
|
}
|
|
|
|
extension LocalizedPostSettings {
|
|
|
|
static var german: LocalizedPostSettings {
|
|
.init(
|
|
title: "Titel",
|
|
description: "Beschreibung",
|
|
feedUrlPrefix: "blog")
|
|
}
|
|
|
|
static var english: LocalizedPostSettings {
|
|
.init(
|
|
title: "A Title",
|
|
description: "Description",
|
|
feedUrlPrefix: "feed")
|
|
}
|
|
}
|