Add tag overview, improve assets
This commit is contained in:
@ -1,15 +1,21 @@
|
||||
|
||||
struct PageSettingsFile {
|
||||
|
||||
let pageUrlPrefix: String
|
||||
|
||||
let contentWidth: Int
|
||||
|
||||
let largeImageWidth: Int
|
||||
|
||||
let pageLinkImageSize: Int
|
||||
|
||||
let javascriptFilesPath: String
|
||||
let defaultCssFile: String?
|
||||
|
||||
let codeHighlightingJsFile: String?
|
||||
|
||||
let audioPlayerJsFile: String?
|
||||
|
||||
let audioPlayerCssFile: String?
|
||||
|
||||
let modelViewerJsFile: String?
|
||||
}
|
||||
|
||||
extension PageSettingsFile: Codable {
|
||||
@ -19,10 +25,13 @@ extension PageSettingsFile: Codable {
|
||||
extension PageSettingsFile {
|
||||
|
||||
static var `default`: PageSettingsFile {
|
||||
.init(pageUrlPrefix: "page",
|
||||
contentWidth: 600,
|
||||
.init(contentWidth: 600,
|
||||
largeImageWidth: 1200,
|
||||
pageLinkImageSize: 180,
|
||||
javascriptFilesPath: "/assets/js")
|
||||
defaultCssFile: nil,
|
||||
codeHighlightingJsFile: nil,
|
||||
audioPlayerJsFile: nil,
|
||||
audioPlayerCssFile: nil,
|
||||
modelViewerJsFile: nil)
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ struct PathSettingsFile {
|
||||
|
||||
let outputDirectoryPath: String
|
||||
|
||||
let assetsOutputFolderPath: String
|
||||
|
||||
let pagesOutputFolderPath: String
|
||||
|
||||
let imagesOutputFolderPath: String
|
||||
@ -13,8 +15,15 @@ struct PathSettingsFile {
|
||||
|
||||
let tagsOutputFolderPath: String
|
||||
|
||||
init(outputDirectoryPath: String, pagesOutputFolderPath: String, imagesOutputFolderPath: String, filesOutputFolderPath: String, videosOutputFolderPath: String, tagsOutputFolderPath: String) {
|
||||
init(outputDirectoryPath: String,
|
||||
assetsOutputFolderPath: String,
|
||||
pagesOutputFolderPath: String,
|
||||
imagesOutputFolderPath: String,
|
||||
filesOutputFolderPath: String,
|
||||
videosOutputFolderPath: String,
|
||||
tagsOutputFolderPath: String) {
|
||||
self.outputDirectoryPath = outputDirectoryPath
|
||||
self.assetsOutputFolderPath = assetsOutputFolderPath
|
||||
self.pagesOutputFolderPath = pagesOutputFolderPath
|
||||
self.imagesOutputFolderPath = imagesOutputFolderPath
|
||||
self.filesOutputFolderPath = filesOutputFolderPath
|
||||
@ -32,6 +41,7 @@ extension PathSettingsFile {
|
||||
static var `default`: PathSettingsFile {
|
||||
PathSettingsFile(
|
||||
outputDirectoryPath: "build",
|
||||
assetsOutputFolderPath: "asset",
|
||||
pagesOutputFolderPath: "page",
|
||||
imagesOutputFolderPath: "image",
|
||||
filesOutputFolderPath: "file",
|
||||
|
@ -7,6 +7,12 @@ struct PostSettingsFile {
|
||||
|
||||
/// The maximum width of the main content
|
||||
let contentWidth: Int
|
||||
|
||||
let swiperCssFile: String?
|
||||
|
||||
let swiperJsFile: String?
|
||||
|
||||
let defaultCssFile: String?
|
||||
}
|
||||
|
||||
extension PostSettingsFile: Codable { }
|
||||
@ -15,6 +21,9 @@ extension PostSettingsFile {
|
||||
|
||||
static var `default`: PostSettingsFile {
|
||||
.init(postsPerPage: 25,
|
||||
contentWidth: 600)
|
||||
contentWidth: 600,
|
||||
swiperCssFile: nil,
|
||||
swiperJsFile: nil,
|
||||
defaultCssFile: nil)
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,18 @@
|
||||
import Foundation
|
||||
|
||||
struct NavigationItemReference: Codable {
|
||||
|
||||
let type: ItemType
|
||||
|
||||
let id: String
|
||||
}
|
||||
|
||||
struct SettingsFile {
|
||||
|
||||
let paths: PathSettingsFile
|
||||
|
||||
/// The tags to show in the navigation bar
|
||||
let navigationTags: [String]
|
||||
let navigationItems: [NavigationItemReference]
|
||||
|
||||
let posts: PostSettingsFile
|
||||
|
||||
@ -23,7 +30,7 @@ extension SettingsFile {
|
||||
static var `default`: SettingsFile {
|
||||
.init(
|
||||
paths: .default,
|
||||
navigationTags: [],
|
||||
navigationItems: [],
|
||||
posts: .default,
|
||||
pages: .default,
|
||||
german: .default,
|
||||
|
31
CHDataManagement/Storage/Model/TagOverviewFile.swift
Normal file
31
CHDataManagement/Storage/Model/TagOverviewFile.swift
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
struct TagOverviewFile {
|
||||
|
||||
let german: LocalizedTagOverviewFile
|
||||
|
||||
let english: LocalizedTagOverviewFile
|
||||
}
|
||||
|
||||
extension TagOverviewFile: Codable {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
The structure to store the metadata of a localized page
|
||||
*/
|
||||
struct LocalizedTagOverviewFile {
|
||||
|
||||
let url: String
|
||||
|
||||
let title: String
|
||||
|
||||
let linkPreviewImage: String?
|
||||
|
||||
let linkPreviewTitle: String?
|
||||
|
||||
let linkPreviewDescription: String?
|
||||
}
|
||||
|
||||
extension LocalizedTagOverviewFile: Codable {
|
||||
|
||||
}
|
Reference in New Issue
Block a user