header.jade 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. template(name="header")
  2. #header(class=currentBoard.colorClass)
  3. //-
  4. If the user is connected we display a small "quick-access" top bar that
  5. list all starred boards with a link to go there. This is inspired by the
  6. Reddit "subreddit" bar.
  7. The first link goes to the boards page.
  8. unless isSandstorm
  9. if currentUser
  10. #header-quick-access
  11. ul
  12. li
  13. a(href="{{pathFor 'home'}}")
  14. span.fa.fa-home
  15. | All boards
  16. each currentUser.starredBoards
  17. li.separator -
  18. li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
  19. a(href="{{pathFor 'board' id=_id slug=slug}}")
  20. = title
  21. else
  22. li.current Star a board to add a shortcut in this bar.
  23. li
  24. a.js-create-board
  25. i.fa.fa-plus(title="Create a new board")
  26. +headerUserBar
  27. //-
  28. The main bar is a colorful bar that provide all the meta-data for the
  29. current page. This bar is contextual based.
  30. If the user is not connected we display "sign in" and "log in" buttons.
  31. #header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}")
  32. if $.Session.get 'currentBoard'
  33. +headerBoard
  34. else if($eq currentRouteName 'home')
  35. +headerTitle
  36. a.wekan-logo(href="{{pathFor 'home'}}")
  37. img(src="/wekan-logo-header.png" alt="Wekan")
  38. template(name="headerTitle")
  39. h1 My Boards
  40. .board-header-btns.right
  41. a.board-header-btn.js-open-archived-board
  42. i.fa.fa-archive
  43. span Archives