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.

18 lines
864 B

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. <a on-click("open", "edit") >Edit</a>
  7. <a on-click("open", "remove") >Remove</a>
  8. </div>
  9. <chapter-meta kind="title" value=input.chapter.title />
  10. <chapter-meta kind="date" value=input.chapter.fictionalDate />
  11. <chapter-meta weak kind="date" value=input.chapter.createdDate />
  12. <chapter-meta weak kind="author" value=input.chapter.author />
  13. </div>
  14. <markdown class="chapter-content" source=input.chapter.source />
  15. <edit-chapter-modal enabled=(state.modal === "edit") chapter=input.chapter on-close("close") on-edit("updateChapter") />
  16. <remove-chapter-modal enabled=(state.modal === "remove") chapter=input.chapter on-close("close") on-remove("removeChapter") />
  17. </div>