header.jade 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. if currentUser
  9. #header-quick-access
  10. ul
  11. li
  12. +linkTo(route="Boards")
  13. span.fa.fa-home
  14. | All boards
  15. each currentUser.starredBoards
  16. li.separator -
  17. li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
  18. +linkTo(route="Board" data=this)
  19. = title
  20. else
  21. li.current Star a board to add a shortcut in this bar.
  22. li
  23. a.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
  31. if $.Session.get 'currentBoard'
  32. +headerBoard
  33. else
  34. +headerTitle
  35. template(name="headerTitle")
  36. h1 LibreBoard