BigW Consortium Gitlab

header.scss 4.82 KB
Newer Older
Dmitriy Zaporozhets committed
1 2 3 4
/*
 *  Application Header
 *
 */
5

6
header {
7
  transition: padding $sidebar-transition-duration;
8

9
  &.navbar-empty {
10
    height: $header-height;
11
    background: $white-light;
12
    border-bottom: 1px solid $btn-gray-hover;
Dmitriy Zaporozhets committed
13 14

    .center-logo {
15
      margin: 8px 0;
Dmitriy Zaporozhets committed
16
      text-align: center;
17

18 19
      .tanuki-logo,
      img {
20
        height: 36px;
21
      }
Dmitriy Zaporozhets committed
22
    }
23 24
  }

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

34 35 36 37
    @media (max-width: $screen-xs-min) {
      padding: 0 16px;
    }

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

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

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

58 59 60 61
        &.header-user-dropdown-toggle {
          margin-left: 14px;
        }

62 63 64
        &:hover,
        &:focus,
        &:active {
65
          background-color: $background-color;
66 67 68 69 70
          color: darken($gl-icon-color, 30%);

          .todos-pending-count {
            background: darken($todo-alert-blue, 10%);
          }
Dmitriy Zaporozhets committed
71
        }
72 73

        .fa-caret-down {
74
          font-size: 14px;
75
        }
76 77
      }

78
      .navbar-toggle {
79
        color: $nav-toggle-gray;
80
        margin: 6px 0;
81
        border-radius: 0;
82
        position: absolute;
83 84
        right: -10px;
        padding: 6px 10px;
85 86

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

90
        &.active {
91
          color: $gl-icon-color;
92
        }
93 94
      }
    }
95 96 97 98

    .side-nav-toggle {
      position: absolute;
      left: -10px;
Clement Ho committed
99
      margin: 7px 0;
100
      font-size: 18px;
101 102 103 104 105 106 107 108
      padding: 6px 10px;
      border: none;
      background-color: $background-color;

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

111
  .header-content {
112
    position: relative;
113
    height: $header-height;
114
    padding-left: 30px;
115

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

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

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

131 132 133 134 135
      #logo {
        position: relative;
        left: -50%;
      }

136 137
      svg,
      img {
138 139 140
        height: 36px;
      }

141 142 143 144
      &:hover {
        cursor: pointer;
      }

145
      @media (max-width: $screen-xs-max) {
146
        right: 20px;
147
        left: auto;
148 149 150 151

        #logo {
          left: auto;
        }
152
      }
153 154
    }

155
    .title {
156 157
      position: relative;
      padding-right: 20px;
158
      margin: 0;
159
      font-size: 18px;
160
      max-width: 385px;
161
      display: inline-block;
162
      line-height: $header-height;
163
      font-weight: normal;
164
      color: $gl-text-color;
165
      overflow: hidden;
166 167 168
      text-overflow: ellipsis;
      vertical-align: top;
      white-space: nowrap;
169

170 171 172 173 174
      @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
        max-width: 300px;
      }

      @media (max-width: $screen-xs-max) {
175
        max-width: 190px;
176 177
      }

178
      a {
179
        color: $gl-text-color;
180

181 182 183 184
        &:hover {
          text-decoration: underline;
        }
      }
185 186

      .dropdown-toggle-caret {
187 188 189
        color: $gl-text-color;
        border: transparent;
        background: transparent;
190 191
        position: absolute;
        right: 3px;
192
        width: 12px;
193 194
        line-height: 19px;
        margin-top: (($header-height - 19) / 2);
195
        padding: 0;
196
        font-size: 10px;
197 198
        text-align: center;
        cursor: pointer;
199 200

        &:hover {
201
          color: darken($color: $gl-text-color, $amount: 30%);
202
        }
203 204 205 206 207
      }

      .project-item-select {
        right: auto;
        left: 0;
208
      }
209
    }
210 211 212

    .navbar-collapse {
      float: right;
213
      border-top: none;
214

215
      @media (max-width: $screen-xs-max) {
216 217
        float: none;
      }
218
    }
219 220
  }

221 222 223 224
  .project-item-select-holder {
    display: inline;
  }

225 226 227
  .impersonation i {
    color: $red-normal;
  }
Dmitriy Zaporozhets committed
228 229
}

230
.page-sidebar-pinned.right-sidebar-expanded {
231
  @media (max-width: $screen-md-max) {
232 233 234 235 236 237
    .header-content .title {
      width: 300px;
    }
  }
}

238
@media (max-width: $screen-xs-max) {
239
  header .container-fluid {
240 241 242
    font-size: 18px;

    .navbar-nav {
243
      margin: 0;
244
      float: none !important;
245

246
      .visible-xs,
247
      .visible-sm {
248 249 250 251
        display: table-cell !important;
      }
    }

252 253 254
    .navbar-collapse {
      padding-left: 5px;

255
      .nav > li {
256 257 258
        display: table-cell;
        width: 1%;
      }
259 260 261
    }
  }
}
262 263 264 265 266 267 268 269 270 271 272 273 274

.header-user {
  .dropdown-menu-nav {
    width: 140px;
    margin-top: -5px;
  }
}

.header-user-avatar {
  float: left;
  margin-right: 5px;
  border-radius: 50%;
}