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.

49 lines
2.3 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. {{ define "content" }}
  2. <article>
  3. <h1>{{$.Operation}}</h1>
  4. <form action="/page/create", method="POST">
  5. <p class="danger">{{$.Error}}</p>
  6. <input class="big" placeholder="Page Name" name="name" type="text" value="{{$.Page.Name}}" />
  7. <textarea class="tall" placeholder="Content" name="source">{{$.Page.Source}}</textarea>
  8. <input placeholder="IC Date" name="fictionalDate" type="text" value="{{if $.Page.FictionalDate.IsZero}}{{else}}{{$.Page.FictionalDate}}{{end}}" />
  9. <div class="group">
  10. {{ range $.Categories }}
  11. <div class="radio-wrapper">
  12. <input name="category" type="radio" name="category" value="{{.Key}}" {{if eq $.Page.Category .Key}}checked{{end}}><b> {{.Key}}</b>: {{.Info}}</input>
  13. </div>
  14. {{ end }}
  15. </div>
  16. <textarea name="tags" placeholder="Tags, e.g. 'Location: Miner's Respite'. One per line, topmost is primary tag">{{$.TagInput}}</textarea>
  17. <div class="group">
  18. <div class="radio-wrapper">
  19. <input type="checkbox" name="dated" value="true" {{if $.Page.Dated}}checked{{end}}><b> Dated</b>: The IC date is shown on the page list. It will still be used for sorting if this option is disabled.</input>
  20. </div>
  21. <div class="radio-wrapper">
  22. <input type="checkbox" name="unlisted" value="true" {{if $.Page.Unlisted}}checked{{end}}><b> Unlisted</b>: This page will not show up on page lists, but anyone with a link can view it.</input>
  23. </div>
  24. <div class="radio-wrapper">
  25. <input type="checkbox" name="specific" value="true" {{if $.Page.Specific}}checked{{end}}><b> Specific</b>: This page will only show up on page lists when one of its tags is searched for.</input>
  26. </div>
  27. </div>
  28. <!-- Future option -->
  29. <input type="hidden" name="type" value="Markdown" />
  30. <input type="hidden" name="published" value="True" />
  31. <button type="submit">{{$.Operation}}</button>
  32. </form>
  33. </article>
  34. {{ end }}
  35. {{ define "menu" }}
  36. <a href="/"><h1>Aite RP</h1></a>
  37. <ul>
  38. <li><a href="/"><div class="mg-icon">&lt;</div><div class="mg-label">Back</div></a></li>
  39. </ul>
  40. {{ end }}
  41. {{ define "head" }}
  42. <link rel="stylesheet" href="/ui/css/form.css" />
  43. <script type="text/javascript" src="/ui/js/form-page.js"></script>
  44. {{ end }}