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.

21 lines
1.4 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. <menu user=input.user>
  2. <menu-header>Story</menu-header>
  3. <menu-link key="index" selected=input.selected.index icon="S" href="/story/">Stories</menu-link>
  4. <menu-link dark key="_create" on-click("open", "story.add") icon="+">Add Story</menu-link>
  5. <menu-gap />
  6. <menu-header>Categories</menu-header>
  7. <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>
  8. <menu-gap />
  9. <if(input.menuMonth != null)>
  10. <menu-header>Month</menu-header>
  11. <menu-link selected=(input.selected.special === "date") icon="M" href=("/story/by-month/"+input.menuMonth)>${input.menuMonth}</menu-link>
  12. <menu-gap />
  13. </if>
  14. <if(input.menuAuthor != null)>
  15. <menu-header>Author</menu-header>
  16. <menu-link selected=(input.selected.special === "author") icon="A" href=("/story/by-author/"+input.menuAuthor)>${input.menuAuthor}</menu-link>
  17. <menu-gap />
  18. </if>
  19. <menu-header>Tags</menu-header>
  20. <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>
  21. <menu-link selected=input.selected.tags icon="T" href="/story/tag-list/">Tags</menu-link>
  22. </menu>