header.jade 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. +headerUserBar
  36. #header(class=currentBoard.colorClass)
  37. //-
  38. The main bar is a colorful bar that provide all the meta-data for the
  39. current page. This bar is contextual based.
  40. If the user is not connected we display "sign in" and "log in" buttons.
  41. #header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}")
  42. +Template.dynamic(template=headerBar)
  43. //unless hideLogo
  44. //-
  45. On sandstorm, the logo shouldn't be clickable, because we only have one
  46. page/document on it, and we don't want to see the home page containing
  47. the list of all boards.
  48. // unless currentSetting.hideLogo
  49. // a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
  50. // img(src="{{pathFor '/logo-header.png'}}" alt="")
  51. if appIsOffline
  52. +offlineWarning
  53. if currentUser.isBoardMember
  54. if hasAnnouncement
  55. .announcement
  56. p
  57. i.fa.fa-bullhorn
  58. +viewer
  59. | #{announcement}
  60. i.fa.fa-times-circle.js-close-announcement
  61. template(name="offlineWarning")
  62. .offline-warning
  63. p
  64. i.fa.fa-warning
  65. | {{_ 'app-is-offline'}}