header.jade 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. if isMiniScreen
  11. ul
  12. li
  13. a(href="{{pathFor 'home'}}")
  14. span.fa.fa-home
  15. if currentList
  16. each currentBoard.lists
  17. li(class="{{#if $.Session.equals 'currentList' _id}}current{{/if}}")
  18. a.js-select-list
  19. = title
  20. #header-new-board-icon
  21. else
  22. ul
  23. li
  24. a(href="{{pathFor 'home'}}")
  25. span.fa.fa-home
  26. | {{_ 'all-boards'}}
  27. each currentUser.starredBoards
  28. li.separator -
  29. li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
  30. a(href="{{pathFor 'board' id=_id slug=slug}}")
  31. = title
  32. else
  33. li.current {{_ 'quick-access-description'}}
  34. a#header-new-board-icon.js-create-board
  35. i.fa.fa-plus(title="Create a new board")
  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. if isSandstorm
  50. .wekan-logo
  51. img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
  52. else
  53. a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
  54. img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
  55. if appIsOffline
  56. +offlineWarning
  57. if currentUser.isBoardMember
  58. if hasAnnouncement
  59. .announcement
  60. p
  61. i.fa.fa-bullhorn
  62. | #{announcement}
  63. i.fa.fa-times-circle.js-close-announcement
  64. template(name="offlineWarning")
  65. .offline-warning
  66. p
  67. i.fa.fa-warning
  68. | {{_ 'app-is-offline'}}