sidebar.scss 5.9 KB
Newer Older
P
Phil Hughes 已提交
1 2 3 4 5
#logo {
  z-index: 2;
  position: absolute;
  width: 58px;
  cursor: pointer;
A
Annabel Dunstone 已提交
6
  margin-top: 8px;
P
Phil Hughes 已提交
7 8
}

9
.page-with-sidebar {
10 11 12
  padding-top: $header-height;
  transition-duration: .3s;

13 14 15
  .sidebar-wrapper {
    position: fixed;
    top: 0;
16
    bottom: 0;
17 18
    overflow-y: auto;
    overflow-x: hidden;
19 20
    left: 0;
    height: 100%;
21
    transition-duration: .3s;
22
  }
23

24
  .gitlab-text-container-link {
A
Alfredo Sumaran 已提交
25 26
    z-index: 1;
    position: absolute;
27
    left: 0;
A
Alfredo Sumaran 已提交
28
  }
29 30 31
}

.sidebar-wrapper {
32
  z-index: 1000;
33
  background: $background-color;
34 35 36 37
}

.content-wrapper {
  width: 100%;
38 39

  .container-fluid {
40
    background: #fff;
41
    padding: 0 $gl-padding;
42 43 44 45 46 47

    &.container-blank {
      background: none;
      padding: 0;
      border: none;
    }
48
  }
49 50
}

51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
.sidebar-wrapper {
  .header-logo {
    border-bottom: 1px solid transparent;
    float: left;
    height: $header-height;
    width: $sidebar_width;
    position: fixed;
    z-index: 999;
    overflow: hidden;
    transition-duration: .3s;

    a {
      float: left;
      height: $header-height;
      width: 100%;
66
      padding-left: 22px;
67 68 69 70 71 72 73 74 75 76 77 78 79 80
      overflow: hidden;
      outline: none;
      transition-duration: .3s;

      img {
        width: 36px;
        height: 36px;
      }

      #tanuki-logo, img {
        float: left;
      }

      .gitlab-text-container {
81
        width: 230px;
82 83 84 85 86

        h3 {
          width: 158px;
          float: left;
          margin: 0;
A
Alfredo Sumaran 已提交
87
          margin-left: 50px;
88
          font-size: 19px;
A
Annabel Dunstone 已提交
89
          line-height: 50px;
90 91 92 93 94 95
          font-weight: normal;
        }
      }
    }

    &:hover {
96
      background-color: #eee;
97 98 99 100
    }
  }

  .sidebar-user {
101
    padding: 7px 22px;
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
    position: fixed;
    bottom: 40px;
    width: $sidebar_width;
    overflow: hidden;
    transition-duration: .3s;

    .username {
      margin-left: 10px;
      width: $sidebar_width - 2 * 10px;
      font-size: 16px;
      line-height: 34px;
    }
  }
}


.tanuki-shape {
  transition: all 0.8s;

121
  &:hover, &.highlight {
122 123 124 125 126 127
    fill: rgb(255, 255, 255);
    transition: all 0.1s;
  }
}


128
.nav-sidebar {
129
  margin-top: 14 + $header-height;
130
  margin-bottom: 100px;
131
  transition-duration: .3s;
132
  list-style: none;
133
  overflow: hidden;
134 135

  &.navbar-collapse {
136
    padding: 0 !important;
137
  }
138

139 140
  li {
    width: $sidebar_width;
141

142 143 144
    &.separate-item {
      padding-top: 10px;
      margin-top: 10px;
145 146
    }

147
    a {
148
      padding: 7px 15px;
D
Dmitriy Zaporozhets 已提交
149
      font-size: $gl-font-size;
150
      line-height: 24px;
151 152
      color: $gray;
      display: block;
153
      text-decoration: none;
154
      padding-left: 23px;
155
      font-weight: normal;
I
Iman Mohamadi 已提交
156
      outline: none;
157 158 159 160

      &:hover {
        text-decoration: none;
      }
D
Dmitriy Zaporozhets 已提交
161

162 163 164 165 166
      &:active, &:focus {
        text-decoration: none;
      }

      i {
167
        width: 16px;
168
        color: $gray-light;
169
        margin-right: 13px;
170 171 172
      }

      .count {
173 174 175 176
        float: right;
        background: #eee;
        padding: 0 8px;
        @include border-radius(6px);
177
      }
178 179 180 181

      &.back-link i {
        transition-duration: .3s;
      }
D
Dmitriy Zaporozhets 已提交
182
    }
183 184 185
  }
}

186
.sidebar-subnav {
187 188
  margin-left: 0;
  padding-left: 0;
189 190 191 192 193 194

  li {
    list-style: none;
  }
}

P
Phil Hughes 已提交
195 196 197 198 199 200 201 202 203 204 205 206
.collapse-nav a {
  width: $sidebar_width;
  position: fixed;
  bottom: 0;
  left: 0;
  font-size: 13px;
  background: transparent;
  height: 40px;
  text-align: center;
  line-height: 40px;
  transition-duration: .3s;
  outline: none;
207

208 209 210
  &:hover {
    text-decoration: none;
  }
211
}
212

A
Annabel Dunstone 已提交
213 214 215 216 217 218
.sidebar-wrapper {
  &.hidden-nav {
    width: 0;
  }
}

P
Phil Hughes 已提交
219
.page-sidebar-collapsed {
220 221
  padding-left: $sidebar_collapsed_width;

A
Annabel Dunstone 已提交
222 223 224 225
  @media (max-width: $screen-xs-min) {
    padding-left: 0;
  }

226
  .sidebar-wrapper {
227 228
    width: $sidebar_collapsed_width;

A
Annabel Dunstone 已提交
229 230 231 232
    @media (max-width: $screen-xs-min) {
      width: 0;
    }

233 234 235
    .header-logo {
      width: $sidebar_collapsed_width;

A
Annabel Dunstone 已提交
236 237 238 239
      @media (max-width: $screen-xs-min) {
        width: 0;
      }

240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
      a {
        padding-left: ($sidebar_collapsed_width - 36) / 2;

        .gitlab-text-container {
          display: none;
        }
      }
    }

    .nav-sidebar {
      width: $sidebar_collapsed_width;

      li {
        width: auto;

        a {
          span {
            display: none;
          }
        }
      }
    }

    .collapse-nav a {
      width: $sidebar_collapsed_width;
A
Annabel Dunstone 已提交
265 266 267 268

      @media (max-width: $screen-xs-min) {
        width: 0;
      }
269 270 271 272 273 274
    }

    .sidebar-user {
      padding-left: ($sidebar_collapsed_width - 36) / 2;
      width: $sidebar_collapsed_width;

A
Annabel Dunstone 已提交
275 276 277 278 279 280
      @media (max-width: $screen-xs-min) {
        width: 0;
        padding-left: 0;
        padding-right: 0;
      }

281 282 283 284
      .username {
        display: none;
      }
    }
285
  }
286 287 288

  .layout-nav {
    padding-right: $sidebar_collapsed_width;
A
Annabel Dunstone 已提交
289 290 291 292

    @media (max-width: $screen-xs-min) {
      padding-right: 0;;
    }
293
  }
294
}
295

P
Phil Hughes 已提交
296
.page-sidebar-expanded {
297 298
  padding-left: $sidebar_collapsed_width;

P
Phil Hughes 已提交
299 300 301 302
  @media (min-width: $screen-md-min) {
    padding-left: $sidebar_width;
  }

A
Annabel Dunstone 已提交
303 304 305 306
  @media (max-width: $screen-xs-min) {
    padding-left: 0;
  }

P
Phil Hughes 已提交
307 308 309 310 311 312 313 314
  .sidebar-wrapper {
    width: $sidebar_width;

    .nav-sidebar {
      width: $sidebar_width;
    }

    .nav-sidebar li a {
315
      width: $sidebar_width;
P
Phil Hughes 已提交
316 317 318 319 320 321 322 323

      &.back-link {
        i {
          opacity: 0;
        }
      }
    }
  }
324 325

  .layout-nav {
A
Annabel Dunstone 已提交
326
    @media (max-width: $screen-xs-min) {
327
      padding-right: 0;
A
Annabel Dunstone 已提交
328
    }
329 330 331 332 333 334 335 336

    @media (min-width: $screen-xs-min) and (max-width: $screen-md-min) {
      padding-right: 62px;
    }

    @media (min-width: $screen-md-min) {
      padding-right: $sidebar_width;
    }
337
  }
338 339
}

P
Phil Hughes 已提交
340
.right-sidebar-collapsed {
341
  padding-right: 0;
P
Phil Hughes 已提交
342

J
Jacob Schatz 已提交
343
  @media (min-width: $screen-sm-min) {
P
Phil Hughes 已提交
344
    padding-right: $sidebar_collapsed_width;
J
Jacob Schatz 已提交
345
  }
J
Jacob Schatz 已提交
346 347 348 349

  .sidebar-collapsed-icon {
    cursor: pointer;
  }
350 351
}

P
Phil Hughes 已提交
352 353 354 355 356 357 358 359 360 361
.right-sidebar-expanded {
  padding-right: 0;

  @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
    padding-right: $sidebar_collapsed_width;
  }

  @media (min-width: $screen-md-min) {
    padding-right: $gutter_width;
  }
362 363 364 365

  &.with-overlay {
    padding-right: $sidebar_collapsed_width;
  }
366
}