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.

8 lines
417 B

6 years ago
  1. <menu user=input.user>
  2. <if(input.story.chapters.length > 1)>
  3. <menu-header>${input.story.name}</menu-header>
  4. <for(chapter in input.story.chapters | status-var=loop)>
  5. <menu-link on-click("selectChapter", chapter.id) href=("#" + chapter.id) selected=(state.selectedChapter === chapter.id) icon=(loop.getIndex()+1)>${state.chapterTitles[chapter.id]}</menu-link>
  6. </for>
  7. <menu-gap />
  8. </if>
  9. </menu>