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

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

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

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

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

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

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

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

50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
.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%;
      padding: 11px 0 11px 22px;
      overflow: hidden;
      outline: none;
      transition-duration: .3s;

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

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

      .gitlab-text-container {
        width: 230px;

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

    &:hover {
95
      background-color: #eee;
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
    }
  }

  .sidebar-user {
    padding: 9px 22px;
    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;

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


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

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

138 139
  li {
    width: $sidebar_width;
140

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

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

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

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

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

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

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

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

  li {
    list-style: none;
  }
}

P
Phil Hughes 已提交
194 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

P
Phil Hughes 已提交
208 209 210
.collapse-nav a:hover {
  text-decoration: none;
  background: #f2f6f7;
211
}
212

P
Phil Hughes 已提交
213
.page-sidebar-collapsed {
214
  padding-left: $sidebar_collapsed_width;
215 216

  .sidebar-wrapper {
D
Dmitriy Zaporozhets 已提交
217
    width: $sidebar_collapsed_width;
218

219 220 221 222
    .header-logo {
      width: $sidebar_collapsed_width;

      a {
223
        padding-left: ($sidebar_collapsed_width - 36) / 2;
224 225 226 227 228

        .gitlab-text-container {
          display: none;
        }
      }
D
Dmitriy Zaporozhets 已提交
229 230
    }

231
    .nav-sidebar {
D
Dmitriy Zaporozhets 已提交
232
      width: $sidebar_collapsed_width;
233

234 235 236 237 238 239 240
      li {
        width: auto;

        a {
          span {
            display: none;
          }
241
        }
242 243
      }
    }
S
Sabba Petri 已提交
244 245

    .collapse-nav a {
D
Dmitriy Zaporozhets 已提交
246
      width: $sidebar_collapsed_width;
S
Sabba Petri 已提交
247
    }
248 249

    .sidebar-user {
250
      padding-left: ($sidebar_collapsed_width - 36) / 2;
251
      width: $sidebar_collapsed_width;
252 253 254 255

      .username {
        display: none;
      }
256
    }
257 258
  }
}
259

P
Phil Hughes 已提交
260 261
.page-sidebar-expanded {
  padding-left: $sidebar_collapsed_width;
S
Sabba Petri 已提交
262

P
Phil Hughes 已提交
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
  @media (min-width: $screen-md-min) {
    padding-left: $sidebar_width;
  }

  .sidebar-wrapper {
    width: $sidebar_width;

    .nav-sidebar {
      width: $sidebar_width;
    }

    .nav-sidebar li a {
      width: 230px;

      &.back-link {
        i {
          opacity: 0;
        }
      }
    }
  }
284 285
}

P
Phil Hughes 已提交
286
.right-sidebar-collapsed {
287
  padding-right: 0;
P
Phil Hughes 已提交
288

J
Jacob Schatz 已提交
289
  @media (min-width: $screen-sm-min) {
P
Phil Hughes 已提交
290
    padding-right: $sidebar_collapsed_width;
J
Jacob Schatz 已提交
291
  }
292 293
}

P
Phil Hughes 已提交
294 295 296 297 298 299 300 301 302 303
.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;
  }
304
}