WIP on chapter flow (#6)

- WIP with Giraffe View Engine for admin views
- Added app context to DotLiquid hash; will remove individual fields in v3
This commit is contained in:
2024-03-09 22:58:55 -05:00
parent 6a5285ca54
commit 43a700eead
15 changed files with 698 additions and 312 deletions

View File

@@ -20,17 +20,14 @@ module Dashboard =
let! listed = getCount data.Page.CountListed
let! cats = getCount data.Category.CountAll
let! topCats = getCount data.Category.CountTopLevel
return!
hashForPage "Dashboard"
|> addToHash ViewContext.Model {
Posts = posts
Drafts = drafts
Pages = pages
ListedPages = listed
Categories = cats
TopLevelCategories = topCats
}
|> adminView "dashboard" next ctx
let model =
{ Posts = posts
Drafts = drafts
Pages = pages
ListedPages = listed
Categories = cats
TopLevelCategories = topCats }
return! adminPage "Dashboard" false (AdminViews.Admin.dashboard model) next ctx
}
// GET /admin/administration