summaryrefslogtreecommitdiffstats
path: root/client/components/main/header.jade
blob: 0d178250f217b193ffbdc4da188e7f3d9b799d28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
template(name="header")
  #header(class=currentBoard.colorClass)
    //-
      If the user is connected we display a small "quick-access" top bar that
      list all starred boards with a link to go there. This is inspired by the
      Reddit "subreddit" bar.
      The first link goes to the boards page.
    unless isSandstorm
      if currentUser
        #header-quick-access
          ul
            li
              a(href="{{pathFor 'home'}}")
                span.fa.fa-home
                | {{_ 'all-boards'}}
            each currentUser.starredBoards
              li.separator -
              li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
                a(href="{{pathFor 'board' id=_id slug=slug}}")
                  = title
            else
              li.current {{_ 'quick-access-description'}}


          a#header-new-board-icon.js-create-board
            i.fa.fa-plus(title="Create a new board")

          +headerUserBar

    //-
      The main bar is a colorful bar that provide all the meta-data for the
      current page. This bar is contextual based.
      If the user is not connected we display "sign in" and "log in" buttons.
    #header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}")
      +Template.dynamic(template=headerBar)

      //-
        On sandstorm, the logo shouldn't be clickable, because we only have one
        page/document on it, and we don't want to see the home page containing
        the list of all boards.
      if isSandstorm
        .wekan-logo
          img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
      else
        a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
          img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")