header.scss 3.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: $header-height;
10
    background: #fff;
A
Annabel Dunstone 已提交
11
    border-bottom: 1px solid $btn-gray-hover;
D
Dmitriy Zaporozhets 已提交
12 13

    .center-logo {
14
      margin: 8px 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 16px;
26
    z-index: 100;
27
    margin-bottom: 0;
28
    height: $header-height;
D
Dmitriy Zaporozhets 已提交
29
    background-color: $background-color;
30
    border: none;
D
Dmitriy Zaporozhets 已提交
31
    border-bottom: 1px solid $border-color;
D
Dmitriy Zaporozhets 已提交
32

A
Annabel Dunstone 已提交
33 34 35 36
    @media (max-width: $screen-xs-min) {
      padding: 0 16px;
    }

37 38 39 40
    &.with-horizontal-nav {
      border-bottom: none;
    }

41
    .container-fluid {
42
      width: 100% !important;
43
      filter: none;
44
      padding: 0;
45 46

      .nav > li > a {
47
        color: $gl-icon-color;
48
        font-size: 18px;
49
        padding: 0;
50
        margin: ($header-height - 28) / 2 0;
51
        margin-left: 10px;
52 53 54
        height: 28px;
        width: 28px;
        line-height: 28px;
55
        text-align: center;
D
Dmitriy Zaporozhets 已提交
56

D
Dmitriy Zaporozhets 已提交
57
        &:hover, &:focus, &:active {
D
Dmitriy Zaporozhets 已提交
58
          background-color: $background-color;
D
Dmitriy Zaporozhets 已提交
59
        }
60 61
      }

62
      .navbar-toggle {
63
        color: #666;
64
        margin: 6px 0;
65
        border-radius: 0;
66
        position: absolute;
A
Annabel Dunstone 已提交
67 68
        right: -10px;
        padding: 6px 10px;
69 70

        &:hover {
A
Annabel Dunstone 已提交
71
          background-color: $btn-gray-hover;
72
        }
A
Annabel Dunstone 已提交
73

74
        &.active {
75
          color: $gl-icon-color;
76
        }
77 78
      }
    }
A
Annabel Dunstone 已提交
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104

    &.header-collapsed {
      padding: 0 16px;
    }

    .side-nav-toggle {
      display: none;
      position: absolute;
      left: -10px;
      margin: 6px 0;
      padding: 6px 10px;
      border: none;
      background-color: $background-color;

      &:hover {
        background-color: $btn-gray-hover;
      }

      &:focus {
        outline: none;
      }

      @media (max-width: $screen-xs-min) {
        display: block;
      }
    }
105 106
  }

D
Dmitriy Zaporozhets 已提交
107
  .header-content {
108
    position: relative;
D
Dmitriy Zaporozhets 已提交
109
    height: $header-height;
P
Phil Hughes 已提交
110
    padding-right: 40px;
111

A
Annabel Dunstone 已提交
112 113 114 115
    @media (max-width: $screen-xs-min) {
      padding-left: 40px;
    }

116 117 118
    @media (min-width: $screen-sm-min) {
      padding-right: 0;
    }
D
Dmitriy Zaporozhets 已提交
119

120 121 122 123
    .dropdown-menu {
      margin-top: -5px;
    }

D
Dmitriy Zaporozhets 已提交
124 125
    .title {
      margin: 0;
D
Dmitriy Zaporozhets 已提交
126
      font-size: 19px;
127
      line-height: $header-height;
128
      font-weight: normal;
129
      color: $gl-text-color;
P
Phil Hughes 已提交
130
      overflow: hidden;
131 132 133
      text-overflow: ellipsis;
      vertical-align: top;
      white-space: nowrap;
D
Dmitriy Zaporozhets 已提交
134 135

      a {
136
        color: $gl-text-color;
D
Dmitriy Zaporozhets 已提交
137 138 139 140
        &:hover {
          text-decoration: underline;
        }
      }
141 142

      .dropdown-toggle-caret {
P
Phil Hughes 已提交
143 144
        position: relative;
        top: -2px;
145 146
        width: 12px;
        line-height: 12px;
147
        margin-left: 5px;
P
Phil Hughes 已提交
148
        font-size: 10px;
149 150 151 152 153 154 155
        text-align: center;
        cursor: pointer;
      }

      .project-item-select {
        right: auto;
        left: 0;
156
      }
D
Dmitriy Zaporozhets 已提交
157
    }
158 159 160

    .navbar-collapse {
      float: right;
161
      border-top: none;
162
    }
D
Dmitriy Zaporozhets 已提交
163 164
  }

P
Phil Hughes 已提交
165 166 167 168
  .project-item-select-holder {
    display: inline;
  }

169 170 171
  .impersonation i {
    color: $red-normal;
  }
D
Dmitriy Zaporozhets 已提交
172 173
}

D
Dmitriy Zaporozhets 已提交
174
@mixin collapsed-header {
175
  margin-left: $sidebar_collapsed_width;
D
Dmitriy Zaporozhets 已提交
176 177
}

P
Phil Hughes 已提交
178
.header-collapsed {
179
  margin-left: $sidebar_collapsed_width;
180

P
Phil Hughes 已提交
181
  @media (min-width: $screen-md-min) {
P
Phil Hughes 已提交
182
    @include collapsed-header;
183
  }
A
Annabel Dunstone 已提交
184 185 186 187

  @media (max-width: $screen-xs-min) {
    margin-left: 0;
  }
D
Dmitriy Zaporozhets 已提交
188 189
}

P
Phil Hughes 已提交
190 191
.header-expanded {
  margin-left: $sidebar_collapsed_width;
D
Dmitriy Zaporozhets 已提交
192

P
Phil Hughes 已提交
193
  @media (min-width: $screen-md-min) {
194
    margin-left: $sidebar_width;
D
Dmitriy Zaporozhets 已提交
195
  }
A
Annabel Dunstone 已提交
196 197 198 199

  @media (max-width: $screen-xs-min) {
    margin-left: 0;
  }
D
Dmitriy Zaporozhets 已提交
200
}
D
Dmitriy Zaporozhets 已提交
201 202

@media (max-width: $screen-xs-max) {
203
  header .container-fluid {
D
Dmitriy Zaporozhets 已提交
204 205 206
    font-size: 18px;

    .navbar-nav {
207
      margin: 0;
208
      float: none !important;
D
Dmitriy Zaporozhets 已提交
209 210 211 212 213 214

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

D
Dmitriy Zaporozhets 已提交
215 216 217 218 219 220 221 222 223 224 225
    .navbar-collapse {
      padding-left: 5px;

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

        a {
          margin-left: 8px !important;
        }
      }
D
Dmitriy Zaporozhets 已提交
226 227 228
    }
  }
}