nav.scss 6.3 KB
Newer Older
A
Annabel Dunstone 已提交
1
@mixin fade($gradient-direction, $rgba, $gradient-color) {
2 3 4 5 6 7 8 9
  visibility: visible;
  opacity: 1;
  position: absolute;
  bottom: 16px;
  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 70
    }

    .badge {
      font-weight: normal;
      background-color: #eee;
      color: #78a;
    }
  }
}
71 72

.top-area {
73 74
  @include clearfix;

75
  border-bottom: 1px solid #eee;
76 77 78 79 80 81 82

  .nav-text {
    padding-top: 16px;
    padding-bottom: 11px;
    display: inline-block;
    width: 50%;
    line-height: 28px;
83 84 85 86 87

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

90 91
  .nav-search {
    display: inline-block;
92
    width: 100%;
93 94 95
    padding: 11px 0;

    /* Small devices (phones, tablets, 768px and lower) */
96 97
    @media (min-width: $screen-sm-min) {
      width: 50%;
98 99 100
    }
  }

101 102 103
  .nav-links {
    display: inline-block;
    width: 50%;
104
    margin-bottom: 0;
105
    border-bottom: none;
106 107

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

  .nav-controls {
    width: 50%;
    display: inline-block;
    float: right;
    text-align: right;
    padding: 11px 0;
119
    margin-bottom: 0;
120 121

    > .dropdown {
122
      margin-right: $gl-padding-top;
123
      display: inline-block;
124 125 126 127

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

130
    > .btn {
131
      margin-right: $gl-padding-top;
132
      display: inline-block;
133 134 135 136 137 138 139 140

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

    > .btn-grouped {
      float: none;
141
    }
142

143 144
    > form {
      display: inline-block;
145
      margin-top: -1px;
146 147
    }

A
Alfredo Sumaran 已提交
148 149 150 151
    .icon-label {
      display: none;
    }

152
    input {
P
Phil Hughes 已提交
153
      height: 35px;
154
      display: inline-block;
155
      position: relative;
156
      top: 2px;
157
      margin-right: $gl-padding-top;
158 159 160 161 162

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

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

165 166 167 168 169 170 171
      &.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; }
      }
172 173
    }

174 175 176 177 178 179
    .project-filter-form {
      input {
        background-color: $background-color;
      }
    }

180 181 182 183
    @media (max-width: $screen-xs-max) {
      padding-bottom: 0;

      .btn, form, .dropdown, .dropdown-menu-toggle, .form-control {
184
        margin: 0 0 10px;
A
Alfredo Sumaran 已提交
185
        display: block;
186
        width: 100%;
A
Alfredo Sumaran 已提交
187 188 189 190 191
      }

      form {
        display: block;
        height: auto;
192 193 194

        input {
          width: 100%;
A
Alfredo Sumaran 已提交
195
          margin: 0 0 10px;
196
        }
A
Alfredo Sumaran 已提交
197 198
      }

A
Alfredo Sumaran 已提交
199
      .input-short {
A
Alfredo Sumaran 已提交
200 201 202 203 204 205
        width: 100%;
      }

      .icon-label {
        display: inline-block;
      }
206 207 208 209 210 211

      // Applies on /dashboard/issues
      .project-item-select-holder {
        display: block;
        margin: 0;
      }
212 213 214 215 216 217 218 219 220 221
    }

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

      input {
        width: 300px;
      }
222 223 224
    }
  }
}
225 226

.layout-nav {
227
  position: fixed;
A
Annabel Dunstone 已提交
228
  top: $header-height;
229
  width: 100%;
P
Phil Hughes 已提交
230
  z-index: 11;
D
Dmitriy Zaporozhets 已提交
231
  background: $background-color;
232
  border-bottom: 1px solid $border-color;
233
  transition-duration: .3s;
234

235 236 237 238
  .container-fluid {
    position: relative;
  }

239 240
  .controls {
    float: right;
241
    padding: 7px 0 0;
242

A
Annabel Dunstone 已提交
243
    @media (max-width: $screen-xs-min) {
244
      display: none;
A
Annabel Dunstone 已提交
245 246
    }

247 248 249 250 251 252 253 254 255 256 257 258 259
    i {
      color: $layout-link-gray;
    }

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

    .fa-caret-down {
      margin-left: 5px;
      color: $gl-icon-color;
    }
260 261 262

    .dropdown {
      margin-left: 7px;
A
Annabel Dunstone 已提交
263 264 265 266

      @media (max-width: $screen-xs-min) {
        margin-left: 0;
      }
267 268 269 270

      li.active {
        font-weight: bold;
      }
271
    }
272 273
  }

274
  .nav-links {
A
Annabel Dunstone 已提交
275
    @include scrolling-links();
276
    border-bottom: none;
277
    height: 51px;
278

279
    .fade-right {
A
Annabel Dunstone 已提交
280
      @include fade(left, rgba(250, 250, 250, 0.4), $background-color);
281
      right: 0;
A
Annabel Dunstone 已提交
282 283
    }

284
    .fade-left {
A
Annabel Dunstone 已提交
285
      @include fade(right, rgba(250, 250, 250, 0.4), $background-color);
286
      left: 0;
A
Annabel Dunstone 已提交
287 288
    }

289 290
    li {

291 292 293 294 295 296 297 298 299 300 301 302 303 304
      a {
        padding-top: 10px;
      }

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

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

305 306 307 308
      .badge {
        color: $gl-icon-color;
      }
    }
309
  }
310 311 312 313 314 315 316 317 318 319 320 321 322

  .nav-control {
    .fade-right {
      right: 58px;

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

A
Annabel Dunstone 已提交
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
.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;
    }
  }
}

343
.page-with-layout-nav {
344
  margin-top: $header-height + 2;
A
Annabel Dunstone 已提交
345

A
Annabel Dunstone 已提交
346
  .right-sidebar {
347
    top: ($header-height * 2) + 2;
A
Annabel Dunstone 已提交
348
  }
349
}