header.jade 2.0 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 {{_ 'quick-access-description'}}
  23. a#header-new-board-icon.js-create-board
  24. i.fa.fa-plus(title="Create a new board")
  25. +headerUserBar
  26. //-
  27. The main bar is a colorful bar that provide all the meta-data for the
  28. current page. This bar is contextual based.
  29. If the user is not connected we display "sign in" and "log in" buttons.
  30. #header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}")
  31. if $.Session.get 'currentBoard'
  32. +headerBoard
  33. else if($eq currentRouteName 'home')
  34. +headerTitle
  35. //-
  36. On sandstorm, the logo shouldn't be clickable, because we only have one
  37. page/document on it, and we don't want to see the home page containing
  38. the list of all boards.
  39. if isSandstorm
  40. .wekan-logo
  41. img(src="/wekan-logo-header.png" alt="Wekan")
  42. else
  43. a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
  44. img(src="/wekan-logo-header.png" alt="Wekan")
  45. template(name="headerTitle")
  46. h1 {{_ 'my-boards'}}
  47. .board-header-btns.right
  48. a.board-header-btn.js-open-archived-board
  49. i.fa.fa-archive
  50. span {{_ 'archives'}}