header.jade 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. +Template.dynamic(template=headerBar)
  32. //-
  33. On sandstorm, the logo shouldn't be clickable, because we only have one
  34. page/document on it, and we don't want to see the home page containing
  35. the list of all boards.
  36. if isSandstorm
  37. .wekan-logo
  38. img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
  39. else
  40. a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
  41. img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")