nav.scss 6.8 KB
Newer Older
A
Annabel Dunstone 已提交
1
@mixin fade($gradient-direction, $rgba, $gradient-color) {
2 3 4
  visibility: visible;
  opacity: 1;
  position: absolute;
5
  bottom: 12px;
6 7 8 9
  width: 43px;
  height: 30px;
  transition-duration: .3s;
  -webkit-transform: translateZ(0);
A
Annabel Dunstone 已提交
10 11 12 13
  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%);
14 15 16 17 18 19 20 21

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

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

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

  li {
    display: inline-block;

    a {
      display: inline-block;
44
      padding: 14px;
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
      padding-top: $gl-padding;
      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

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

111 112
  .nav-search {
    display: inline-block;
113
    width: 100%;
114 115 116
    padding: 11px 0;

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

122 123 124
  .nav-links {
    display: inline-block;
    width: 50%;
125
    margin-bottom: 0;
126
    border-bottom: none;
127 128

    /* Small devices (phones, tablets, 768px and lower) */
129
    @media (max-width: $screen-sm-max) {
130 131
      width: 100%;
    }
132 133 134 135 136 137 138 139
  }

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
140
    margin-bottom: 0;
141 142

    > .dropdown {
143
      margin-right: $gl-padding-top;
144
      display: inline-block;
145 146 147 148

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

151
    > .btn {
152
      margin-right: $gl-padding-top;
153
      display: inline-block;
154 155 156 157 158 159 160 161

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

    > .btn-grouped {
      float: none;
162
    }
163

164 165
    > form {
      display: inline-block;
166
      margin-top: -1px;
167 168
    }

A
Alfredo Sumaran 已提交
169 170 171 172
    .icon-label {
      display: none;
    }

173
    input {
P
Phil Hughes 已提交
174
      height: 35px;
175
      display: inline-block;
176
      position: relative;
177
      top: 2px;
178
      margin-right: $gl-padding-top;
179 180 181 182 183

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

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

186 187 188 189 190 191 192
      &.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; }
      }
193 194
    }

195 196 197 198 199 200
    .project-filter-form {
      input {
        background-color: $background-color;
      }
    }

201 202 203 204
    @media (max-width: $screen-xs-max) {
      padding-bottom: 0;

      .btn, form, .dropdown, .dropdown-menu-toggle, .form-control {
205
        margin: 0 0 10px;
A
Alfredo Sumaran 已提交
206
        display: block;
207
        width: 100%;
A
Alfredo Sumaran 已提交
208 209 210 211 212
      }

      form {
        display: block;
        height: auto;
213 214 215

        input {
          width: 100%;
A
Alfredo Sumaran 已提交
216
          margin: 0 0 10px;
217
        }
A
Alfredo Sumaran 已提交
218 219
      }

A
Alfredo Sumaran 已提交
220
      .input-short {
A
Alfredo Sumaran 已提交
221 222 223 224 225 226
        width: 100%;
      }

      .icon-label {
        display: inline-block;
      }
227 228 229 230 231 232

      // Applies on /dashboard/issues
      .project-item-select-holder {
        display: block;
        margin: 0;
      }
233 234 235 236 237 238 239 240 241 242
    }

    /* Small devices (tablets, 768px and lower) */
    @media (max-width: $screen-sm-max) {
      width: 100%;
      text-align: left;

      input {
        width: 300px;
      }
243 244 245
    }
  }
}
246 247

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

256 257 258 259
  .container-fluid {
    position: relative;
  }

260 261
  .controls {
    float: right;
262
    padding: 7px 0 0;
263

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

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

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

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

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

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

      li.active {
        font-weight: bold;
      }
292
    }
293 294
  }

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

300
    .fade-right {
A
Annabel Dunstone 已提交
301
      @include fade(left, rgba(250, 250, 250, 0.4), $background-color);
302
      right: 0;
A
Annabel Dunstone 已提交
303 304
    }

305
    .fade-left {
A
Annabel Dunstone 已提交
306
      @include fade(right, rgba(250, 250, 250, 0.4), $background-color);
307
      left: 0;
A
Annabel Dunstone 已提交
308 309
    }

310 311
    li {

312 313 314 315 316 317 318 319 320 321 322 323 324 325
      a {
        padding-top: 10px;
      }

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

      &.active {
        a, i {
          color: $black;
        }
      }

326 327 328 329
      .badge {
        color: $gl-icon-color;
      }
    }
330
  }
331 332 333 334 335 336 337 338 339 340 341 342

  .nav-control {
    .fade-right {

      @media (min-width: $screen-xs-max) {
        right: 67px;
      }
      @media (max-width: $screen-xs-min) {
        right: 0;
      }
    }
  }
343 344
}

A
Annabel Dunstone 已提交
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
.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;
    }
360 361 362 363 364 365 366 367 368 369

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

        @media (max-width: $screen-xs-max) {
          visibility: visible;
        }
      }
    }
A
Annabel Dunstone 已提交
370 371 372
  }
}

373
.page-with-layout-nav {
374
  margin-top: $header-height + 2;
A
Annabel Dunstone 已提交
375

A
Annabel Dunstone 已提交
376
  .right-sidebar {
377
    top: ($header-height * 2) + 2;
A
Annabel Dunstone 已提交
378
  }
379
}
380 381 382 383 384 385 386 387 388 389 390

.activities {

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

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