diff --git a/src/MyWebLog/Handlers/Page.fs b/src/MyWebLog/Handlers/Page.fs index 5dee988..6ddeae8 100644 --- a/src/MyWebLog/Handlers/Page.fs +++ b/src/MyWebLog/Handlers/Page.fs @@ -12,9 +12,14 @@ let all pageNbr : HttpHandler = requireAccess Author >=> fun next ctx -> task { return! hashForPage "Pages" |> withAntiCsrf ctx - |> addToHash "pages" (pages |> List.map (DisplayPage.fromPageMinimal ctx.WebLog)) + |> addToHash "pages" (pages + |> Seq.ofList + |> Seq.truncate 25 + |> Seq.map (DisplayPage.fromPageMinimal ctx.WebLog) + |> List.ofSeq) |> addToHash "page_nbr" pageNbr |> addToHash "prev_page" (if pageNbr = 2 then "" else $"/page/{pageNbr - 1}") + |> addToHash "has_next" (List.length pages > 25) |> addToHash "next_page" $"/page/{pageNbr + 1}" |> adminView "page-list" next ctx } diff --git a/src/admin-theme/page-list.liquid b/src/admin-theme/page-list.liquid index 1a38b51..f22871f 100644 --- a/src/admin-theme/page-list.liquid +++ b/src/admin-theme/page-list.liquid @@ -6,7 +6,7 @@ {%- assign title_col = "col-12 col-md-5" -%} {%- assign link_col = "col-12 col-md-5" -%} {%- assign upd8_col = "col-12 col-md-2" -%} -