header.scss 2.9 KB
Newer Older
D
Dmitriy Zaporozhets 已提交
1 2 3 4
/*
 *  Application Header
 *
 */
5
header {
6 7
  transition-duration: .3s;

D
Dmitriy Zaporozhets 已提交
8
  &.navbar-empty {
9
    height: 58px;
10 11
    background: #fff;
    border-bottom: 1px solid #eee;
D
Dmitriy Zaporozhets 已提交
12 13

    .center-logo {
14
      margin: 11px 0;
D
Dmitriy Zaporozhets 已提交
15
      text-align: center;
16

17 18 19
      #tanuki-logo, img {
        width: 36px;
        height: 36px;
20
      }
D
Dmitriy Zaporozhets 已提交
21
    }
D
Dmitriy Zaporozhets 已提交
22 23
  }

24
  &.navbar-gitlab {
25
    padding: 0 20px;
26
    z-index: 100;
27
    margin-bottom: 0;
28
    min-height: $header-height;
29
    background-color: #fff;
30
    border: none;
31
    border-bottom: 1px solid #eee;
D
Dmitriy Zaporozhets 已提交
32

33
    .container-fluid {
34
      width: 100% !important;
35
      filter: none;
36
      padding: 0;
37 38

      .nav > li > a {
39 40
        color: #7f8fa4;
        font-size: 18px;
41
        padding: 0;
42
        margin: ($header-height - 28) / 2 0;
43
        margin-left: 10px;
44 45 46
        height: 28px;
        width: 28px;
        line-height: 28px;
47
        text-align: center;
D
Dmitriy Zaporozhets 已提交
48

D
Dmitriy Zaporozhets 已提交
49
        &:hover, &:focus, &:active {
50
          background-color: #fff;
D
Dmitriy Zaporozhets 已提交
51
        }
52 53
      }

54
      .navbar-toggle {
55
        color: #666;
56
        margin: 6px 0;
57
        border-radius: 0;
58 59
        position: absolute;
        right: 2px;
60 61

        &:hover {
62
          background-color: #eee;
63
        }
64 65 66
        &.active {
          color: #7f8fa4;
        }
67 68
      }
    }
69 70
  }

D
Dmitriy Zaporozhets 已提交
71 72
  .header-content {
    height: $header-height;
73 74 75 76 77
    padding-right: 20px;

    @media (min-width: $screen-sm-min) {
      padding-right: 0;
    }
D
Dmitriy Zaporozhets 已提交
78 79 80

    .title {
      margin: 0;
D
Dmitriy Zaporozhets 已提交
81
      font-size: 19px;
82
      line-height: $header-height;
83 84
      font-weight: normal;
      color: #4c4e54;
P
Phil Hughes 已提交
85
      overflow: hidden;
86 87 88
      text-overflow: ellipsis;
      vertical-align: top;
      white-space: nowrap;
D
Dmitriy Zaporozhets 已提交
89 90

      a {
91
        color: #4c4e54;
D
Dmitriy Zaporozhets 已提交
92 93 94 95
        &:hover {
          text-decoration: underline;
        }
      }
96 97

      .dropdown-toggle-caret {
P
Phil Hughes 已提交
98 99
        position: relative;
        top: -2px;
100 101
        width: 12px;
        line-height: 12px;
102
        margin-left: 5px;
P
Phil Hughes 已提交
103
        font-size: 10px;
104 105 106 107 108 109 110
        text-align: center;
        cursor: pointer;
      }

      .project-item-select {
        right: auto;
        left: 0;
111
      }
D
Dmitriy Zaporozhets 已提交
112
    }
113 114 115

    .navbar-collapse {
      float: right;
116
      border-top: none;
117
    }
D
Dmitriy Zaporozhets 已提交
118 119
  }

120 121 122
  .impersonation i {
    color: $red-normal;
  }
D
Dmitriy Zaporozhets 已提交
123 124
}

D
Dmitriy Zaporozhets 已提交
125
@mixin collapsed-header {
126
  margin-left: $sidebar_collapsed_width;
D
Dmitriy Zaporozhets 已提交
127 128
}

P
Phil Hughes 已提交
129 130
.header-collapsed {
  margin-left: $sidebar_collapsed_width;
131

P
Phil Hughes 已提交
132
  @media (min-width: $screen-md-min) {
P
Phil Hughes 已提交
133
    @include collapsed-header;
134
  }
D
Dmitriy Zaporozhets 已提交
135 136
}

P
Phil Hughes 已提交
137 138
.header-expanded {
  margin-left: $sidebar_collapsed_width;
D
Dmitriy Zaporozhets 已提交
139

P
Phil Hughes 已提交
140
  @media (min-width: $screen-md-min) {
141
    margin-left: $sidebar_width;
D
Dmitriy Zaporozhets 已提交
142 143
  }
}
D
Dmitriy Zaporozhets 已提交
144 145

@media (max-width: $screen-xs-max) {
146
  header .container-fluid {
D
Dmitriy Zaporozhets 已提交
147 148 149
    font-size: 18px;

    .navbar-nav {
150
      margin: 0;
151
      float: none !important;
D
Dmitriy Zaporozhets 已提交
152 153 154 155 156 157

      .visible-xs, .visable-sm {
        display: table-cell !important;
      }
    }

D
Dmitriy Zaporozhets 已提交
158 159 160 161 162 163 164 165 166 167 168
    .navbar-collapse {
      padding-left: 5px;

      li {
        display: table-cell;
        width: 1%;

        a {
          margin-left: 8px !important;
        }
      }
D
Dmitriy Zaporozhets 已提交
169 170 171
    }
  }
}