story: Added add story modal, reorganized story page to allow modals and live updates.

This commit is contained in:
2018-09-23 15:57:53 +02:00
parent a2d949edaf
commit ae31accd81
13 changed files with 201 additions and 8 deletions
@@ -0,0 +1,5 @@
module.exports = class {
open(modalName) {
this.emit("open", modalName)
}
}
@@ -1,6 +1,7 @@
<menu user=input.user>
<menu-header>Story</menu-header>
<menu-link key="index" selected=input.selected.index icon="S" href="/story/">Stories</menu-link>
<menu-link dark key="_create" on-click("open", "story.add") icon="+">Add Story</menu-link>
<menu-gap />
<menu-header>Categories</menu-header>
<menu-link for(category in (input.categories||[])) key=(category.name) selected=(input.selected.category == category.name) href=`/story/by-category/${category.name}` icon=category.name.charAt(0)>${category.name}</menu-link>