nav.scss 7.4 KB
Newer Older
A
Annabel Dunstone 已提交
1
@mixin fade($gradient-direction, $rgba, $gradient-color) {
2 3
  visibility: visible;
  opacity: 1;
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 19 20 21 22

  &.end-scroll {
    visibility: hidden;
    opacity: 0;
    transition-duration: .3s;
  }
}

A
Annabel Dunstone 已提交
23 24 25 26 27 28 29 30 31 32
@mixin scrolling-links() {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  &::-webkit-scrollbar {
    display: none;
  }
}

33 34 35 36
.nav-links {
  padding: 0;
  margin: 0;
  list-style: none;
37
  height: auto;
38 39 40 41 42 43 44
  border-bottom: 1px solid $border-color;

  li {
    display: inline-block;

    a {
      display: inline-block;
A
Annabel Dunstone 已提交
45
      padding: $gl-btn-padding;
46 47 48 49 50 51 52 53 54 55 56 57 58 59
      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 {
60 61
      border-bottom: 2px solid $link-underline-blue;
      color: $black;
62 63 64 65 66 67 68 69
    }

    .badge {
      font-weight: normal;
      background-color: #eee;
      color: #78a;
    }
  }
A
Annabel Dunstone 已提交
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

  &.sub-nav {
    background-color: $background-color;

    .container-fluid {
      background-color: $background-color;
    }

    li {

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

      &.active a {
        border-bottom: none;
        color: $link-underline-blue;
      }
    }
  }
91
}
92 93

.top-area {
94 95
  @include clearfix;

96
  border-bottom: 1px solid #eee;
97 98 99 100 101 102 103

  .nav-text {
    padding-top: 16px;
    padding-bottom: 11px;
    display: inline-block;
    width: 50%;
    line-height: 28px;
104

105 106 107 108
    &.wiki-page {
      padding: 16px 10px 11px;
    }

109 110 111 112
    /* Small devices (phones, tablets, 768px and lower) */
    @media (max-width: $screen-sm-min) {
      width: 100%;
    }
113 114
  }

115 116
  .nav-search {
    display: inline-block;
117
    width: 100%;
118 119 120
    padding: 11px 0;

    /* Small devices (phones, tablets, 768px and lower) */
121 122
    @media (min-width: $screen-sm-min) {
      width: 50%;
123 124 125
    }
  }

126 127 128
  .nav-links {
    display: inline-block;
    width: 50%;
129
    margin-bottom: 0;
130
    border-bottom: none;
131

A
Annabel Dunstone 已提交
132 133 134 135
    li a {
      padding: 16px 10px 11px;
    }

136
    /* Small devices (phones, tablets, 768px and lower) */
137
    @media (max-width: $screen-sm-max) {
138 139
      width: 100%;
    }
140 141 142 143 144 145 146 147
  }

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
148
    margin-bottom: 0;
149 150

    > .dropdown {
151
      margin-right: $gl-padding-top;
152
      display: inline-block;
153 154 155 156

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

159
    > .btn {
160
      margin-right: $gl-padding-top;
161
      display: inline-block;
162 163 164 165 166 167 168 169

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

    > .btn-grouped {
      float: none;
170
    }
171

172 173
    > form {
      display: inline-block;
174
      margin-top: -1px;
175 176
    }

A
Alfredo Sumaran 已提交
177 178 179 180
    .icon-label {
      display: none;
    }

181
    input {
P
Phil Hughes 已提交
182
      height: 35px;
183
      display: inline-block;
184
      position: relative;
185
      top: 2px;
186
      margin-right: $gl-padding-top;
187 188 189 190 191

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

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

194 195 196 197 198 199 200
      &.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; }
      }
201 202
    }

203 204 205 206 207 208
    .project-filter-form {
      input {
        background-color: $background-color;
      }
    }

209 210
    @media (max-width: $screen-xs-max) {
      padding-bottom: 0;
211
      width: 100%;
212
      .btn, form, .dropdown, .dropdown-menu-toggle, .form-control {
213
        margin: 0 0 10px;
A
Alfredo Sumaran 已提交
214
        display: block;
215
        width: 100%;
A
Alfredo Sumaran 已提交
216 217 218 219 220
      }

      form {
        display: block;
        height: auto;
221 222 223

        input {
          width: 100%;
A
Alfredo Sumaran 已提交
224
          margin: 0 0 10px;
225
        }
A
Alfredo Sumaran 已提交
226 227
      }

A
Alfredo Sumaran 已提交
228
      .input-short {
A
Alfredo Sumaran 已提交
229 230 231 232 233 234
        width: 100%;
      }

      .icon-label {
        display: inline-block;
      }
235 236 237 238 239 240

      // Applies on /dashboard/issues
      .project-item-select-holder {
        display: block;
        margin: 0;
      }
241
    }
242 243
  }
}
244 245

.layout-nav {
246
  position: fixed;
A
Annabel Dunstone 已提交
247
  top: $header-height;
248
  width: 100%;
P
Phil Hughes 已提交
249
  z-index: 11;
D
Dmitriy Zaporozhets 已提交
250
  background: $background-color;
251
  border-bottom: 1px solid $border-color;
252
  transition-duration: .3s;
253

254 255 256 257
  .container-fluid {
    position: relative;
  }

258 259
  .controls {
    float: right;
260
    padding: 7px 0 0;
261

262
    @media (max-width: $screen-xs-max) {
263
      display: none;
A
Annabel Dunstone 已提交
264 265
    }

266 267 268 269 270 271 272 273 274 275 276 277 278
    i {
      color: $layout-link-gray;
    }

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

    .fa-caret-down {
      margin-left: 5px;
      color: $gl-icon-color;
    }
279 280 281

    .dropdown {
      margin-left: 7px;
A
Annabel Dunstone 已提交
282 283 284 285

      @media (max-width: $screen-xs-min) {
        margin-left: 0;
      }
286 287 288 289

      li.active {
        font-weight: bold;
      }
290
    }
291 292
  }

293
  .nav-links {
A
Annabel Dunstone 已提交
294
    @include scrolling-links();
295
    border-bottom: none;
296
    height: 51px;
297

298 299 300 301 302 303 304 305 306 307 308 309 310
    svg {
      position: relative;
      top: 2px;
      margin-right: 2px;
      height: 15px;
      width: auto;

      path,
      polygon {
        fill: $layout-link-gray;
      }
    }

311
    .fade-right {
A
Annabel Dunstone 已提交
312
      @include fade(left, rgba(250, 250, 250, 0.4), $background-color);
313
      right: 0;
A
Annabel Dunstone 已提交
314 315
    }

316
    .fade-left {
A
Annabel Dunstone 已提交
317
      @include fade(right, rgba(250, 250, 250, 0.4), $background-color);
318
      left: 0;
A
Annabel Dunstone 已提交
319 320
    }

321 322
    li {

323 324 325 326 327 328 329 330 331
      a {
        padding-top: 10px;
      }

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

      &.active {
332

333 334 335
        a, i {
          color: $black;
        }
336 337 338 339 340 341 342

        svg {
          path,
          polygon {
            fill: $black;
          }
        }
343 344
      }

345 346 347 348
      .badge {
        color: $gl-icon-color;
      }
    }
349
  }
350 351 352

  .nav-control {

A
Annabel Dunstone 已提交
353
    .fade-right {
354
      @media (min-width: $screen-xs-max) {
355
        right: 68px;
356 357 358 359 360 361
      }
      @media (max-width: $screen-xs-min) {
        right: 0;
      }
    }
  }
362 363
}

364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
.scrolling-tabs-container {
  position: relative;

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

    .fade-right {
      @include fade(left, rgba(255, 255, 255, 0.4), $background-color);
      right: 0;
    }

    .fade-left {
      @include fade(right, rgba(255, 255, 255, 0.4), $background-color);
      left: 0;
    }
  }
}

A
Annabel Dunstone 已提交
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396
.nav-block {
  position: relative;

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

    .fade-right {
      @include fade(left, rgba(255, 255, 255, 0.4), $white-light);
      right: 0;
    }

    .fade-left {
      @include fade(right, rgba(255, 255, 255, 0.4), $white-light);
      left: 0;
    }
397 398 399 400 401 402 403 404 405 406

    &.event-filter {
      .fade-right {
        visibility: hidden;

        @media (max-width: $screen-xs-max) {
          visibility: visible;
        }
      }
    }
A
Annabel Dunstone 已提交
407 408 409
  }
}

410
.page-with-layout-nav {
411
  margin-top: $header-height + 2;
A
Annabel Dunstone 已提交
412

A
Annabel Dunstone 已提交
413
  .right-sidebar {
414
    top: ($header-height * 2) + 2;
A
Annabel Dunstone 已提交
415
  }
416
}
417 418 419 420 421 422 423 424 425 426 427

.activities {

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

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