mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-28 23:54:34 +00:00
Add the full school maturita reading list of 82 books.
Keep full quizzes for 1984 and Spalovač mrtvol; other titles get catalog metadata stubs across Swift, GTK, and content.json. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3612d60f42
commit
f813595bba
10 changed files with 949 additions and 45 deletions
|
|
@ -50,7 +50,10 @@ enum Route: Hashable {
|
|||
case .mluvnice: return "mluvnice"
|
||||
case .mluvEx(let n): return "mluve\(n)"
|
||||
case .readingList: return "readinglist"
|
||||
case .book(let id): return id == "1984" ? "cetba1984" : "cetbaFuks"
|
||||
case .book(let id):
|
||||
if id == "1984" { return "cetba1984" }
|
||||
if id == "fuks" { return "cetbaFuks" }
|
||||
return "cetba_" + id.replacingOccurrences(of: "-", with: "_")
|
||||
case .bookQuiz(let id): return id == "1984" ? "cetba1984quiz" : "cetbaFuksQuiz"
|
||||
case .bookPlot(let id): return id == "1984" ? "cetba1984dej" : "cetbaFuksDej"
|
||||
}
|
||||
|
|
@ -120,6 +123,10 @@ func routeFromPage(_ page: String) -> Route? {
|
|||
case "cetbaFuksQuiz": return .bookQuiz("fuks")
|
||||
case "cetbaFuksDej": return .bookPlot("fuks")
|
||||
default:
|
||||
if page.hasPrefix("cetba_") {
|
||||
let slug = String(page.dropFirst(6)).replacingOccurrences(of: "_", with: "-")
|
||||
return .book(slug)
|
||||
}
|
||||
if let m = page.wholeMatch(of: /unit(\d+)/), let n = Int(m.1) {
|
||||
return .unitMap(n - 1)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue