header.jade 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. template(name="header")
  2. //-
  3. If the user is connected we display a small "quick-access" top bar that
  4. list all starred boards with a link to go there. This is inspired by the
  5. Reddit "subreddit" bar.
  6. The first link goes to the boards page.
  7. unless isSandstorm
  8. if currentUser
  9. #header-quick-access(class=currentBoard.colorClass)
  10. ul
  11. li
  12. a(href="{{pathFor 'home'}}")
  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. a(href="{{pathFor 'board' id=_id slug=slug}}")
  19. = title
  20. else
  21. li.current {{_ 'quick-access-description'}}
  22. a#header-new-board-icon.js-create-board
  23. i.fa.fa-plus(title="Create a new board")
  24. +headerUserBar
  25. #header(class=currentBoard.colorClass)
  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. unless hideLogo
  33. //-
  34. On sandstorm, the logo shouldn't be clickable, because we only have one
  35. page/document on it, and we don't want to see the home page containing
  36. the list of all boards.
  37. if isSandstorm
  38. .wekan-logo
  39. img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
  40. else
  41. a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
  42. img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
  43. if appIsOffline
  44. +offlineWarning
  45. template(name="offlineWarning")
  46. .offline-warning
  47. p
  48. i.fa.fa-warning
  49. | {{_ 'app-is-offline'}}