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.

24 lines
1.4 KiB

6 years ago
6 years ago
6 years ago
  1. <div class="story-chapter">
  2. <a class="anchor" id=input.chapter.id />
  3. <h1 if(input.chapter.title) class="title color-primary">${input.chapter.title}</h1>
  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.move">
  10. <a on-click("open", "move") >Move</a>
  11. </if-permitted>
  12. <if-permitted user=input.user author=input.chapter.author permission="chapter.remove">
  13. <a on-click("open", "remove") >Remove</a>
  14. </if-permitted>
  15. </div>
  16. <chapter-meta kind="date" utc=true value=input.chapter.fictionalDate />
  17. <chapter-meta weak kind="date" value=input.chapter.createdDate />
  18. <chapter-meta weak kind="author" value=input.chapter.author />
  19. </div>
  20. <markdown class="chapter-content color-text" source=input.chapter.source />
  21. <edit-chapter-modal enabled=(state.modal === "edit") chapter=input.chapter on-close("close") on-edit("updateChapter") />
  22. <move-chapter-modal enabled=(state.modal === "move") chapter=input.chapter user=input.user on-close("close") on-move("moveChapter") />
  23. <remove-chapter-modal enabled=(state.modal === "remove") chapter=input.chapter on-close("close") on-remove("removeChapter") />
  24. </div>