story: Added listing stories by month or author.

This commit is contained in:
2018-09-30 16:42:01 +02:00
parent a098051733
commit 640244faf4
5 changed files with 67 additions and 1 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
<story-menu categories=input.categories selected=(input.selected || {}) menuTags=input.menuTags user=input.user on-open("open") />
<story-menu categories=input.categories selected=(input.selected || {}) menuTags=input.menuTags menuAuthor=input.menuAuthor menuMonth=input.menuMonth user=input.user on-open("open") />
<main>
<story-list stories=state.stories />
<add-story-modal enabled=(state.modal === "story.add") stories=input.stories categories=input.categories on-close("close") />
@@ -6,6 +6,16 @@
<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>
<menu-gap />
<if(input.menuMonth != null)>
<menu-header>Month</menu-header>
<menu-link selected=(input.selected.special === "date") icon="M" href=("/story/by-month/"+input.menuMonth)>${input.menuMonth}</menu-link>
<menu-gap />
</if>
<if(input.menuAuthor != null)>
<menu-header>Author</menu-header>
<menu-link selected=(input.selected.special === "author") icon="A" href=("/story/by-author/"+input.menuAuthor)>${input.menuAuthor}</menu-link>
<menu-gap />
</if>
<menu-header>Tags</menu-header>
<menu-link for(tag in (input.menuTags||[])) key=(tag.kind+":"+tag.name) selected=(input.selected.tag === tag.kind+":"+tag.name) href=("/story/by-tag/"+tag.kind+"/"+tag.name) textClass=("color-tag-"+tag.kind.toLowerCase()) icon=tag.kind.charAt(0)>${tag.name}</menu-link>
<menu-link selected=input.selected.tags icon="T" href="/story/tag-list/">Tags</menu-link>