header.scss 4.23 KB
Newer Older
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
1 2 3 4
/*
 *  Application Header
 *
 */
5
header {
6 7
  transition-duration: .3s;

8
  &.navbar-empty {
9
    height: $header-height;
10
    background: #fff;
Annabel Dunstone's avatar
Annabel Dunstone committed
11
    border-bottom: 1px solid $btn-gray-hover;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
12 13

    .center-logo {
14
      margin: 8px 0;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
15
      text-align: center;
16

17 18 19
      #tanuki-logo, img {
        width: 36px;
        height: 36px;
20
      }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
21
    }
22 23
  }

24
  &.navbar-gitlab {
25
    padding: 0 16px;
26
    z-index: 100;
27
    margin-bottom: 0;
28
    height: $header-height;
29
    background-color: $background-color;
30
    border: none;
31
    border-bottom: 1px solid $border-color;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
32

Annabel Dunstone's avatar
Annabel Dunstone committed
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;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
56

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
57
        &:hover, &:focus, &:active {
58
          background-color: $background-color;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
59
        }
60 61
      }

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

        &:hover {
Annabel Dunstone's avatar
Annabel Dunstone committed
71
          background-color: $btn-gray-hover;
72
        }
Annabel Dunstone's avatar
Annabel Dunstone committed
73

74
        &.active {
75
          color: $gl-icon-color;
76
        }
77 78
      }
    }
Annabel Dunstone's avatar
Annabel Dunstone committed
79 80 81

    &.header-collapsed {
      padding: 0 16px;
82 83 84 85

      .side-nav-toggle {
        display: block;
      }
Annabel Dunstone's avatar
Annabel Dunstone committed
86 87 88 89 90 91
    }

    .side-nav-toggle {
      display: none;
      position: absolute;
      left: -10px;
92 93
      margin: 6px 0;
      font-size: 18px;
Annabel Dunstone's avatar
Annabel Dunstone committed
94 95 96 97 98 99 100 101 102 103 104 105
      padding: 6px 10px;
      border: none;
      background-color: $background-color;

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

      &:focus {
        outline: none;
      }
    }
106 107
  }

108
  .header-content {
109
    position: relative;
110
    height: $header-height;
111
    padding-right: 40px;
112 113
    padding-left: 30px;
    transition-duration: .3s;
Annabel Dunstone's avatar
Annabel Dunstone committed
114

115 116 117
    @media (min-width: $screen-sm-min) {
      padding-right: 0;
    }
118

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

123 124 125 126 127
    .header-logo {
      position: absolute;
      left: 50%;
      margin-left: -18px;
      top: 7px;
128 129 130
      transition-duration: .3s;
      z-index: 999;

131 132 133 134
      &:hover {
        cursor: pointer;
      }

Annabel Dunstone's avatar
Annabel Dunstone committed
135
      @media (max-width: $screen-xs-max) {
136 137 138
        right: 25px;
        left: auto;
      }
139 140
    }

141 142
    .title {
      margin: 0;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
143
      font-size: 19px;
144
      max-width: 400px;
145
      display: inline-block;
146
      line-height: $header-height;
147
      font-weight: normal;
148
      color: $gl-text-color;
149
      overflow: hidden;
150 151 152
      text-overflow: ellipsis;
      vertical-align: top;
      white-space: nowrap;
153

154 155
      @media (max-width: $screen-sm-max) {
        max-width: 190px;
156 157
      }

158
      a {
159
        color: $gl-text-color;
160 161 162 163
        &:hover {
          text-decoration: underline;
        }
      }
164 165

      .dropdown-toggle-caret {
Phil Hughes's avatar
Phil Hughes committed
166 167
        position: relative;
        top: -2px;
168 169
        width: 12px;
        line-height: 12px;
170
        margin-left: 5px;
Phil Hughes's avatar
Phil Hughes committed
171
        font-size: 10px;
172 173 174 175 176 177 178
        text-align: center;
        cursor: pointer;
      }

      .project-item-select {
        right: auto;
        left: 0;
179
      }
180
    }
181 182 183

    .navbar-collapse {
      float: right;
184
      border-top: none;
185

Annabel Dunstone's avatar
Annabel Dunstone committed
186
      @media (max-width: $screen-xs-max) {
187 188
        float: none;
      }
189
    }
190 191
  }

192 193 194 195
  .project-item-select-holder {
    display: inline;
  }

196 197 198
  .impersonation i {
    color: $red-normal;
  }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
199 200
}

201
.header-collapsed {
202
  margin-left: 0;
Annabel Dunstone's avatar
Annabel Dunstone committed
203

204
  .header-content {
205

206 207 208 209
    @media (min-width: $screen-sm-max) {
      padding-left: 30px;
      transition-duration: .3s;
    }
Annabel Dunstone's avatar
Annabel Dunstone committed
210
  }
211
}
212

213 214 215 216 217 218 219 220 221
.tanuki-shape {
  transition: all 0.8s;

  &:hover, &.highlight {
    fill: rgb(255, 255, 255);
    transition: all 0.1s;
  }
}

222
@media (max-width: $screen-xs-max) {
223
  header .container-fluid {
224 225 226
    font-size: 18px;

    .navbar-nav {
227
      margin: 0;
228
      float: none !important;
229 230 231 232 233 234

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

235 236 237 238 239 240 241 242 243 244 245
    .navbar-collapse {
      padding-left: 5px;

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

        a {
          margin-left: 8px !important;
        }
      }
246 247 248
    }
  }
}