The frontend/UI server, written in JS using the MarkoJS library
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.

22 lines
1.1 KiB

6 years ago
6 years ago
6 years ago
  1. import moment from "moment"
  2. <div class="story-chapter">
  3. <a class="anchor" id=input.chapter.id />
  4. <div class="metadata">
  5. <div class="options color-menu">
  6. <if-permitted user=input.user author=input.chapter.author permission="chapter.edit">
  7. <a on-click("open", "edit") >Edit</a>
  8. </if-permitted>
  9. <if-permitted user=input.user author=input.chapter.author permission="chapter.remove">
  10. <a on-click("open", "remove") >Remove</a>
  11. </if-permitted>
  12. </div>
  13. <chapter-meta kind="title" value=input.chapter.title />
  14. <chapter-meta kind="date" value=input.chapter.fictionalDate />
  15. <chapter-meta weak kind="date" value=input.chapter.createdDate />
  16. <chapter-meta weak kind="author" value=input.chapter.author />
  17. </div>
  18. <markdown class="chapter-content color-text" source=input.chapter.source />
  19. <edit-chapter-modal enabled=(state.modal === "edit") chapter=input.chapter on-close("close") on-edit("updateChapter") />
  20. <remove-chapter-modal enabled=(state.modal === "remove") chapter=input.chapter on-close("close") on-remove("removeChapter") />
  21. </div>