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.

27 lines
1.3 KiB

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