header.jade 2.5 KB

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