nav.scss 7.3 KB
Newer Older
A
Annabel Dunstone 已提交
1
@mixin fade($gradient-direction, $rgba, $gradient-color) {
2 3
  visibility: hidden;
  opacity: 0;
4
  z-index: 2;
5
  position: absolute;
6
  bottom: 12px;
7 8 9 10
  width: 43px;
  height: 30px;
  transition-duration: .3s;
  -webkit-transform: translateZ(0);
A
Annabel Dunstone 已提交
11 12 13 14
  background: -webkit-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
  background: -o-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
  background: -moz-linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
  background: linear-gradient($gradient-direction, $rgba, $gradient-color 45%);
15

16 17 18
  &.scrolling {
    visibility: visible;
    opacity: 1;
19 20
    transition-duration: .3s;
  }
21 22 23

  .fa {
    position: relative;
24 25
    top: 5px;
    font-size: 18px;
26
  }
27 28
}

A
Annabel Dunstone 已提交
29 30 31 32 33
@mixin scrolling-links() {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
34

A
Annabel Dunstone 已提交
35 36 37 38 39
  &::-webkit-scrollbar {
    display: none;
  }
}

40 41 42 43
.nav-links {
  padding: 0;
  margin: 0;
  list-style: none;
44
  height: auto;
45 46 47 48 49 50 51
  border-bottom: 1px solid $border-color;

  li {
    display: inline-block;

    a {
      display: inline-block;
A
Annabel Dunstone 已提交
52
      padding: $gl-btn-padding;
53 54 55 56 57 58 59 60 61 62 63 64 65 66
      padding-bottom: 11px;
      margin-bottom: -1px;
      font-size: 15px;
      line-height: 28px;
      color: #959494;
      border-bottom: 2px solid transparent;

      &:hover, &:active, &:focus {
        text-decoration: none;
        outline: none;
      }
    }

    &.active a {
67 68
      border-bottom: 2px solid $link-underline-blue;
      color: $black;
69 70 71 72 73 74
    }

    .badge {
      font-weight: normal;
      background-color: #eee;
      color: #78a;
C
Clement Ho 已提交
75
      vertical-align: baseline;
76 77
    }
  }
A
Annabel Dunstone 已提交
78 79

  &.sub-nav {
80
    text-align: center;
81
    background-color: $dark-background-color;
A
Annabel Dunstone 已提交
82 83

    .container-fluid {
84
      background-color: $dark-background-color;
A
Annabel Dunstone 已提交
85
      margin-bottom: 0;
A
Annabel Dunstone 已提交
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
    }

    li {

      a {
        margin: 0;
        padding: 11px 10px 9px;
      }

      &.active a {
        border-bottom: none;
        color: $link-underline-blue;
      }
    }
  }
101
}
102 103

.top-area {
104 105
  @include clearfix;

106
  border-bottom: 1px solid #eee;
107 108 109 110 111 112 113

  .nav-text {
    padding-top: 16px;
    padding-bottom: 11px;
    display: inline-block;
    width: 50%;
    line-height: 28px;
114 115 116 117 118

    /* Small devices (phones, tablets, 768px and lower) */
    @media (max-width: $screen-sm-min) {
      width: 100%;
    }
119 120
  }

121 122
  .nav-search {
    display: inline-block;
123
    width: 100%;
124 125 126
    padding: 11px 0;

    /* Small devices (phones, tablets, 768px and lower) */
127 128
    @media (min-width: $screen-sm-min) {
      width: 50%;
129 130 131
    }
  }

132 133 134
  .nav-links {
    display: inline-block;
    width: 50%;
135
    margin-bottom: 0;
136
    border-bottom: none;
137

138 139 140 141 142
    &.wide {
      width: 100%;
      display: block;
    }

A
Annabel Dunstone 已提交
143 144 145 146
    li a {
      padding: 16px 10px 11px;
    }

147
    /* Small devices (phones, tablets, 768px and lower) */
148
    @media (max-width: $screen-xs-max) {
149 150
      width: 100%;
    }
151 152 153 154 155 156 157 158
  }

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
159
    margin-bottom: 0;
160 161

    > .dropdown {
162
      margin-right: $gl-padding-top;
163
      display: inline-block;
164 165 166 167

      &:last-child {
        margin-right: 0;
      }
168 169
    }

170
    > .btn {
171
      margin-right: $gl-padding-top;
172
      display: inline-block;
173
      vertical-align: top;
174 175 176 177 178 179 180 181

      &:last-child {
        margin-right: 0;
      }
    }

    > .btn-grouped {
      float: none;
182
    }
183

184 185 186 187
    > form {
      display: inline-block;
    }

A
Alfredo Sumaran 已提交
188 189 190 191
    .icon-label {
      display: none;
    }

192
    input {
P
Phil Hughes 已提交
193
      height: 35px;
194
      display: inline-block;
195
      position: relative;
196
      margin-right: $gl-padding-top;
197 198 199 200 201

      /* Medium devices (desktops, 992px and up) */
      @media (min-width: $screen-md-min) { width: 200px; }

      /* Large devices (large desktops, 1200px and up) */
202
      @media (min-width: $screen-lg-min) { width: 250px; }
203

204 205 206 207 208 209 210
      &.input-short {
        /* Medium devices (desktops, 992px and up) */
        @media (min-width: $screen-md-min) { width: 170px; }

        /* Large devices (large desktops, 1200px and up) */
        @media (min-width: $screen-lg-min) { width: 210px; }
      }
211 212
    }

213 214 215 216 217 218
    .project-filter-form {
      input {
        background-color: $background-color;
      }
    }

219 220
    @media (max-width: $screen-xs-max) {
      padding-bottom: 0;
221
      width: 100%;
222
      .btn, form, .dropdown, .dropdown-menu-toggle, .form-control {
223
        margin: 0 0 10px;
A
Alfredo Sumaran 已提交
224
        display: block;
225
        width: 100%;
A
Alfredo Sumaran 已提交
226 227 228 229 230
      }

      form {
        display: block;
        height: auto;
231
        margin-bottom: 14px;
232 233 234

        input {
          width: 100%;
A
Alfredo Sumaran 已提交
235
          margin: 0 0 10px;
236
        }
A
Alfredo Sumaran 已提交
237 238
      }

A
Alfredo Sumaran 已提交
239
      .input-short {
A
Alfredo Sumaran 已提交
240 241 242 243 244 245
        width: 100%;
      }

      .icon-label {
        display: inline-block;
      }
246 247 248 249 250 251

      // Applies on /dashboard/issues
      .project-item-select-holder {
        display: block;
        margin: 0;
      }
252
    }
253
  }
254 255 256 257 258 259

  &.adjust {
    .nav-text, .nav-controls {
      width: auto;
    }
  }
260
}
261 262

.layout-nav {
263
  position: fixed;
A
Annabel Dunstone 已提交
264
  top: $header-height;
265
  width: 100%;
P
Phil Hughes 已提交
266
  z-index: 11;
D
Dmitriy Zaporozhets 已提交
267
  background: $background-color;
268
  border-bottom: 1px solid $border-color;
269
  transition: padding $sidebar-transition-duration;
270
  text-align: center;
271

272 273 274 275
  .container-fluid {
    position: relative;
  }

276 277
  .controls {
    float: right;
278
    padding: 7px 0 0;
279

280
    @media (max-width: $screen-sm-max) {
281
      display: none;
A
Annabel Dunstone 已提交
282 283
    }

284 285 286 287 288 289 290 291 292 293 294 295 296
    i {
      color: $layout-link-gray;
    }

    .fa-rss,
    .fa-cog {
      font-size: 16px;
    }

    .fa-caret-down {
      margin-left: 5px;
      color: $gl-icon-color;
    }
297 298

    .dropdown {
P
Phil Hughes 已提交
299 300 301
      position: absolute;
      top: 7px;
      right: 15px;
302
      z-index: 2;
303 304 305 306

      li.active {
        font-weight: bold;
      }
307
    }
308 309
  }

310 311
  .nav-links {
    border-bottom: none;
312
    height: 51px;
313

314 315
    li {

316 317 318 319 320 321 322 323 324
      a {
        padding-top: 10px;
      }

      a, i {
        color: $layout-link-gray;
      }

      &.active {
325

326 327 328
        a, i {
          color: $black;
        }
329 330 331 332 333 334 335

        svg {
          path,
          polygon {
            fill: $black;
          }
        }
336 337
      }

338 339 340
      .badge {
        color: $gl-icon-color;
      }
341 342 343 344 345 346

      &:hover {
        a, i {
          color: $black;
        }
      }
347
    }
348
  }
349 350
}

351 352 353 354 355
.scrolling-tabs-container {
  position: relative;

  .nav-links {
    @include scrolling-links();
356
  }
357

358 359 360 361 362 363
  .fade-right {
    @include fade(left, rgba(255, 255, 255, 0.4), $background-color);
    right: -5px;

    .fa {
      right: -7px;
364
    }
365
  }
366

367 368 369 370 371 372
  .fade-left {
    @include fade(right, rgba(255, 255, 255, 0.4), $background-color);
    left: -5px;

    .fa {
      left: -7px;
373 374
    }
  }
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393

  &.sub-nav-scroll {

    .fade-right {
      right: 0;

      .fa {
        right: -23px;
      }
    }

    .fade-left {
      left: 0;

      .fa {
        left: 10px;
      }
    }
  }
394 395
}

A
Annabel Dunstone 已提交
396 397 398 399 400 401 402 403
.nav-block {
  position: relative;

  .nav-links {
    @include scrolling-links();

    .fade-right {
      @include fade(left, rgba(255, 255, 255, 0.4), $white-light);
404 405 406 407 408
      right: -5px;

      .fa {
        right: -7px;
      }
A
Annabel Dunstone 已提交
409 410 411 412
    }

    .fade-left {
      @include fade(right, rgba(255, 255, 255, 0.4), $white-light);
413 414 415 416 417
      left: -5px;

      .fa {
        left: -7px;
      }
A
Annabel Dunstone 已提交
418 419 420 421
    }
  }
}

422
.page-with-layout-nav {
423
  margin-top: $header-height + 2;
A
Annabel Dunstone 已提交
424

A
Annabel Dunstone 已提交
425
  .right-sidebar {
426
    top: ($header-height * 2) + 2;
A
Annabel Dunstone 已提交
427
  }
428
}
429 430 431 432 433 434 435 436 437 438 439

.activities {

  .nav-block {
    border-bottom: 1px solid $border-color;

    .nav-links {
      border-bottom: none;
    }
  }
}