Skip to content

Commit

Permalink
feckin' hell
Browse files Browse the repository at this point in the history
  • Loading branch information
TangentFoxy committed Jul 22, 2016
1 parent 458e792 commit e02d39d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ksp.moon
Expand Up @@ -84,20 +84,19 @@ class extends lapis.Application
[craft_list: "/crafts(/:page[%d])"]: =>
page = @params.page or 1

Paginator = Crafts\paginated "ORDER BY id ASC", per_page: 2 --NOTE temporary super low page number for testing!
Paginator = Crafts\paginated "ORDER BY id ASC", per_page: 13
crafts = Paginator\get_page page
@html ->
ul ->
for craft in *crafts
li ->
a href: @url_for("ksp_craft", @params, craft.id), craft.craft_name
--a href: @url_for("ksp_craft", 2), "testing"
--li ->
-- if page > 1
-- a href: @url_for("ksp_craft_list", page - 1), "<<"
-- text " | "
-- if page < Paginator\num_pages!
-- a href: @url_for("ksp_craft_list", page + 1), ">>"
li ->
if page > 1
a href: @url_for("ksp_craft_list", page - 1), "<<"
text " | "
if page < Paginator\num_pages!
a href: @url_for("ksp_craft_list", page + 1), ">>"

[craft: "/craft/:id[%d]"]: =>
@html ->
Expand Down

0 comments on commit e02d39d

Please sign in to comment.