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.

32 lines
1.4 KiB

  1. <modal class="modal color-text nolabel" key="modal2" enabled=(input.enabled) closable on-close("close") >
  2. <h1>Edit Story</h1>
  3. <p key="error" class="color-error">${state.error}</p>
  4. <h2>Meta</h2>
  5. <label>Title</label>
  6. <input key="name" placeholder="Name" class="big" on-change("change", "name") value=state.values.name />
  7. <label>IC Date</label>
  8. <input key="icdate" placeholder="IC Date" on-change("change", "fictionalDate") value=state.values.fictionalDate />
  9. <label>Category</label>
  10. <select key="category" placeholder="Kind" on-change("change", "category")>
  11. <option for(category in input.categories) value=category.name selected=(state.values.category === category.name)>${category.name}</option>
  12. </select>
  13. <h2>Tags</h2>
  14. <story-tag-options small tags=state.tags loading=state.loading on-remove("removeTag") on-add("addTag") />
  15. <h2>Options</h2>
  16. <toggle value=state.values.listed on="Listed" off="Unlisted"
  17. onDesc="The story will be visible on the front page."
  18. offDesc="A direct link is required to view this story."
  19. on-change("change", "listed") />
  20. <toggle value=state.values.open on="Open" off="Closed"
  21. onDesc="Other authors can add chapters to this story."
  22. offDesc="Only you can add chapters to this story."
  23. on-change("change", "open") />
  24. <h2></h2>
  25. <button disabled=state.loading on-click("save")>Add Story</button>
  26. </modal>