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.

43 lines
1.8 KiB

7 years ago
7 years ago
7 years ago
  1. {{ define "content" }}
  2. <article>
  3. <h1>{{$.Operation}}</h1>
  4. <form action="/page/edit/{{$.Page.ID}}", 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 (e.g. 'Oct 27, 2185')" 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="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>
  20. </div>
  21. </div>
  22. <!-- Future option -->
  23. <input type="hidden" name="type" value="Markdown" />
  24. <input type="hidden" name="published" value="True" />
  25. <button type="submit">{{$.Operation}}</button>
  26. </form>
  27. </article>
  28. {{ end }}
  29. {{ define "menu" }}
  30. <a href="/"><h1>Aite RP</h1></a>
  31. <ul>
  32. <li><a href="/"><div class="mg-icon">&lt;</div><div class="mg-label">Back</div></a></li>
  33. </ul>
  34. {{ end }}
  35. {{ define "head" }}
  36. <link rel="stylesheet" href="/ui/css/form.css" />
  37. <script type="text/javascript" src="/ui/js/form-page.js"></script>
  38. {{ end }}