header.jade 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. +linkTo(route="Boards")
  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. +linkTo(route="Board" data=this)
  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
  32. if $.Session.get 'currentBoard'
  33. +headerBoard
  34. else
  35. +headerTitle
  36. template(name="headerTitle")
  37. h1 LibreBoard