BigW Consortium Gitlab

header.scss 4.47 KB
Newer Older
Dmitriy Zaporozhets committed
1 2 3 4
/*
 *  Application Header
 *
 */
5 6 7 8 9 10
@mixin tanuki-logo-colors($path-color) {
  fill: $path-color;
  transition: all 0.8s;

  &:hover,
  &.highlight {
11 12
    fill: lighten($path-color, 25%);
    transition: all 0.1s;
13 14 15
  }
}

16
header {
17
  transition: padding $sidebar-transition-duration;
18

19
  &.navbar-empty {
20
    height: $header-height;
21
    background: #fff;
22
    border-bottom: 1px solid $btn-gray-hover;
Dmitriy Zaporozhets committed
23 24

    .center-logo {
25
      margin: 8px 0;
Dmitriy Zaporozhets committed
26
      text-align: center;
27

28 29
      #tanuki-logo, img {
        height: 36px;
30
      }
Dmitriy Zaporozhets committed
31
    }
32 33
  }

34
  &.navbar-gitlab {
35
    padding: 0 16px;
36
    z-index: 100;
37
    margin-bottom: 0;
38
    height: $header-height;
39
    background-color: $background-color;
40
    border: none;
41
    border-bottom: 1px solid $border-color;
42

43 44 45 46
    @media (max-width: $screen-xs-min) {
      padding: 0 16px;
    }

47 48 49 50
    &.with-horizontal-nav {
      border-bottom: none;
    }

51
    .container-fluid {
52
      width: 100% !important;
53
      filter: none;
54
      padding: 0;
55 56

      .nav > li > a {
57
        color: $gl-icon-color;
58
        font-size: 18px;
59
        padding: 0;
60
        margin: ($header-height - 28) / 2 0;
61
        margin-left: 10px;
62
        height: 28px;
63
        min-width: 28px;
64
        line-height: 28px;
65
        text-align: center;
Dmitriy Zaporozhets committed
66

Dmitriy Zaporozhets committed
67
        &:hover, &:focus, &:active {
68
          background-color: $background-color;
Dmitriy Zaporozhets committed
69
        }
70 71
      }

72
      .navbar-toggle {
73
        color: #666;
74
        margin: 6px 0;
75
        border-radius: 0;
76
        position: absolute;
77 78
        right: -10px;
        padding: 6px 10px;
79 80

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

84
        &.active {
85
          color: $gl-icon-color;
86
        }
87 88
      }
    }
89 90 91 92 93 94 95 96

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

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

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

      &:focus {
        outline: none;
      }
    }
111 112
  }

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

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

122 123 124 125
    .dropdown-menu {
      margin-top: -5px;
    }

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

134 135 136 137
      svg, img {
        height: 36px;
      }

138 139 140 141
      &:hover {
        cursor: pointer;
      }

142
      @media (max-width: $screen-xs-max) {
143 144 145
        right: 25px;
        left: auto;
      }
146 147
    }

148 149
    .title {
      margin: 0;
150
      font-size: 19px;
151
      max-width: 400px;
152
      display: inline-block;
153
      line-height: $header-height;
154
      font-weight: normal;
155
      color: $gl-text-color;
156
      overflow: hidden;
157 158 159
      text-overflow: ellipsis;
      vertical-align: top;
      white-space: nowrap;
160

161 162
      @media (max-width: $screen-sm-max) {
        max-width: 190px;
163 164
      }

165
      a {
166
        color: $gl-text-color;
167 168 169 170
        &:hover {
          text-decoration: underline;
        }
      }
171 172

      .dropdown-toggle-caret {
173 174
        position: relative;
        top: -2px;
175 176
        width: 12px;
        line-height: 12px;
177
        margin-left: 5px;
178
        font-size: 10px;
179 180 181 182 183 184 185
        text-align: center;
        cursor: pointer;
      }

      .project-item-select {
        right: auto;
        left: 0;
186
      }
187
    }
188 189 190

    .navbar-collapse {
      float: right;
191
      border-top: none;
192

193
      @media (max-width: $screen-xs-max) {
194 195
        float: none;
      }
196
    }
197 198
  }

199 200 201 202
  .project-item-select-holder {
    display: inline;
  }

203 204 205
  .impersonation i {
    color: $red-normal;
  }
Dmitriy Zaporozhets committed
206 207
}

208
#tanuki-logo {
209

210 211 212 213
  #tanuki-left-ear,
  #tanuki-right-ear,
  #tanuki-nose {
    @include tanuki-logo-colors($tanuki-red);
214
  }
215 216 217 218 219 220 221 222 223 224 225

  #tanuki-left-eye,
  #tanuki-right-eye {
    @include tanuki-logo-colors($tanuki-orange);
  }

  #tanuki-left-cheek,
  #tanuki-right-cheek {
    @include tanuki-logo-colors($tanuki-yellow);
  }

226 227
}

228
@media (max-width: $screen-xs-max) {
229
  header .container-fluid {
230 231 232
    font-size: 18px;

    .navbar-nav {
233
      margin: 0;
234
      float: none !important;
235 236 237 238 239 240

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

241 242 243
    .navbar-collapse {
      padding-left: 5px;

244
      .nav > li {
245 246 247
        display: table-cell;
        width: 1%;
      }
248 249 250
    }
  }
}
251 252 253 254 255 256 257 258 259 260 261 262 263

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

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