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.
 
 
 
 

16 lines
820 B

<menu user=input.user>
<menu-header>${input.story.name}</menu-header>
<for(chapter in input.story.chapters | status-var=loop)>
<menu-link key=chapter.id on-click("select", "chapter", chapter.id) href=("#" + chapter.id) selected=(state.selectedChapter === chapter.id) icon=(loop.getIndex()+1)>${component.chapterTitle(chapter)}</menu-link>
</for>
<if(input.story.open)>
<if-permitted user=input.user permission=["member", "story.edit"]>
<menu-link dark key="_create" on-click("select", "add", null) icon="+">Add Chapter (Open)</menu-link>
</if-permitted>
</if>
<else>
<if-permitted user=input.user author=input.story.author permission="story.edit">
<menu-link dark key="_create" on-click("select", "add", null) icon="+">Add Chapter</menu-link>
</if-permitted>
</else>
</menu>