header.jade 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. if currentUser
  8. #header-quick-access(class=currentBoard.colorClass)
  9. if isMiniScreen
  10. ul
  11. li
  12. a(href="{{pathFor 'home'}}")
  13. span.fa.fa-home
  14. if currentList
  15. each currentBoard.lists
  16. li(class="{{#if $.Session.equals 'currentList' _id}}current{{/if}}")
  17. a.js-select-list
  18. = title
  19. #header-new-board-icon
  20. else
  21. ul
  22. li
  23. a(href="{{pathFor 'home'}}")
  24. span.fa.fa-home
  25. | {{_ 'all-boards'}}
  26. each currentUser.starredBoards
  27. li.separator -
  28. li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
  29. a(href="{{pathFor 'board' id=_id slug=slug}}")
  30. = title
  31. else
  32. li.current {{_ 'quick-access-description'}}
  33. a#header-new-board-icon.js-create-board
  34. i.fa.fa-plus(title="Create a new board")
  35. +notifications
  36. +headerUserBar
  37. #header(class=currentBoard.colorClass)
  38. //-
  39. The main bar is a colorful bar that provide all the meta-data for the
  40. current page. This bar is contextual based.
  41. If the user is not connected we display "sign in" and "log in" buttons.
  42. #header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}")
  43. +Template.dynamic(template=headerBar)
  44. //unless hideLogo
  45. //-
  46. On sandstorm, the logo shouldn't be clickable, because we only have one
  47. page/document on it, and we don't want to see the home page containing
  48. the list of all boards.
  49. // unless currentSetting.hideLogo
  50. // a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
  51. // img(src="{{pathFor '/logo-header.png'}}" alt="")
  52. if appIsOffline
  53. +offlineWarning
  54. if currentUser.isBoardMember
  55. if hasAnnouncement
  56. .announcement
  57. p
  58. i.fa.fa-bullhorn
  59. +viewer
  60. | #{announcement}
  61. i.fa.fa-times-circle.js-close-announcement
  62. template(name="offlineWarning")
  63. .offline-warning
  64. p
  65. i.fa.fa-warning
  66. | {{_ 'app-is-offline'}}