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.

63 lines
2.0 KiB

  1. extends base/master
  2. block append css
  3. link[rel="stylesheet"][href="/ui/css/form.css"]
  4. block append js
  5. script[type="text/javascript"][src="/ui/js/form-page.js"]
  6. block menu
  7. import menu
  8. block main
  9. $page = $.Page
  10. article
  11. h1 Create
  12. form[action="/page/create"][method="POST"]
  13. p.danger #{$.Error}
  14. input.big
  15. [placeholder="Page Name"]
  16. [value=$page.Name]
  17. [type="text"]
  18. [name="name"]
  19. textarea.tall
  20. [placeholder="Content"]
  21. [name="source"]
  22. | #{$page.Source}
  23. input
  24. [placeholder="IC Date (e.g. 'Oct 27, 2185')"]
  25. [name="fictionalDate"]
  26. [type="text"]
  27. [value=$page.FictionalDate] ? !$page.FictionalDate.IsZero
  28. h2 Category
  29. div.group[title="Category"]
  30. each $category in $.Categories
  31. div.radio-wrapper
  32. $radioid = printf("radio-%s", $category.Key)
  33. if $category.Key == $page.Category
  34. input[id=$radioid][name="category"][type="radio"][name="category"][value=$category.Key][checked]
  35. else
  36. input[id=$radioid][name="category"][type="radio"][name="category"][value=$category.Key]
  37. label[for=$radioid]
  38. b #{$category.Key}:
  39. span #{$category.Info}
  40. h2 Tags
  41. textarea
  42. [name="tags"]
  43. [placeholder="Location: Miner's Respite\nOrganization: Redrock Agency\nCharacter: Renala T'Iavay\nEvent: Skipping Work\nSeries: Just Another Tuesday"]
  44. | #{$.TagInput}
  45. h2 Options
  46. div.group
  47. +formoption("unlisted", $page.Unlisted, "Unlisted", "The page will not show up in any page list. Meant for omni-tool messages, quick copypastes and so on.")
  48. +formoption("indexed", $page.Unlisted, "Indexable", "Third-party search engines (that play by the rules) are permitted to crawl this page.")
  49. // Future options (maybe)
  50. input[type="hidden"][name="type"][value="Markdown"]
  51. input[type="hidden"][name="published"][value="True"]
  52. button[type="submit"] Create