Allow header selection for pages

This commit is contained in:
Christoph Hagen
2022-09-04 20:36:43 +02:00
parent a7e7bc21fc
commit 1c13f4fc60
6 changed files with 65 additions and 20 deletions

View File

@ -93,6 +93,17 @@ final class ValidationLog {
return state
}
func headerType(_ raw: String?, source: String) -> HeaderType {
guard let raw = raw else {
return .left
}
guard let type = HeaderType(rawValue: raw) else {
add(warning: "Invalid 'headerType' '\(raw)', using 'left'", source: source)
return .left
}
return type
}
func thumbnailStyle(_ raw: String?, source: String) -> ThumbnailStyle {
guard let raw = raw else {
return .large