header.jade 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. //-
  37. On sandstorm, the logo shouldn't be clickable, because we only have one
  38. page/document on it, and we don't want to see the home page containing
  39. the list of all boards.
  40. if isSandstorm
  41. .wekan-logo
  42. img(src="/wekan-logo-header.png" alt="Wekan")
  43. else
  44. a.wekan-logo(href="{{pathFor 'home'}}")
  45. img(src="/wekan-logo-header.png" alt="Wekan")
  46. template(name="headerTitle")
  47. h1 My Boards
  48. .board-header-btns.right
  49. a.board-header-btn.js-open-archived-board
  50. i.fa.fa-archive
  51. span Archives