The backend for the AiteStory website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
832 B

  1. import ../base/mixins
  2. $pagePath = printf("/page/%s", $.Page.ID)
  3. $pageEditPath = printf("/page/edit/%s", $.Page.ID)
  4. $pageDeletePath = printf("/page/delete/%s", $.Page.ID)
  5. $pageSourcePath = printf("/page/source/%s", $.Page.ID)
  6. $datePath = printf("/month/%s", $.Page.FictionalDate.UTC.Format("2006-01"))
  7. $authorPath = printf("/author/%s", $.Page.Author)
  8. a[href="/"]
  9. h1 Page
  10. if !$.HideMenu
  11. ul
  12. +menuitem($pagePath, "V", "View")
  13. if $.Page.Author == $.User.ID
  14. +menuitem($pageEditPath, "E", "Edit")
  15. +menuitem($pageDeletePath, "X", "Delete")
  16. else
  17. +menuitem($pageSourcePath, "#", "Source")
  18. ul
  19. each $tag in $.Page.Tags
  20. +tagmenuitem($tag)
  21. ul
  22. if $.Page.Dated
  23. +menuitem($datePath, "D", formatDate($.Page.FictionalDate))
  24. +menuitem($authorPath, "A", formatUserID($.Page.Author))