sidebar.scss 4.2 KB
Newer Older
1
.page-with-sidebar {
2 3 4
  .sidebar-wrapper {
    position: fixed;
    top: 0;
5
    bottom: 0;
6 7
    overflow-y: auto;
    overflow-x: hidden;
8 9
    left: 0;
    height: 100%;
10
    transition-duration: .3s;
11
  }
12 13 14
}

.sidebar-wrapper {
15
  z-index: 99;
16
  background: $background-color;
17
  transition-duration: .3s;
18 19 20
}

.content-wrapper {
21
  min-height: 100vh;
22
  width: 100%;
23
  padding: 20px;
A
Andrey 已提交
24
  background: #EAEBEC;
25 26 27

  .container-fluid {
    background: #FFF;
D
Dmitriy Zaporozhets 已提交
28
    padding: $gl-padding;
29
    min-height: 90vh;
30 31 32 33 34 35

    &.container-blank {
      background: none;
      padding: 0;
      border: none;
    }
36
  }
37 38 39
}

.nav-sidebar {
40
  margin-top: 14 + $header-height;
41
  margin-bottom: 100px;
42
  transition-duration: .3s;
43
  list-style: none;
44
  overflow: hidden;
45 46 47 48

  &.navbar-collapse {
    padding: 0px !important;
  }
49

50 51
  li {
    width: $sidebar_width;
52

53 54 55
    &.separate-item {
      padding-top: 10px;
      margin-top: 10px;
56 57
    }

58
    a {
D
Dmitriy Zaporozhets 已提交
59 60
      padding: 7px 15px;
      font-size: $gl-font-size;
61
      line-height: 24px;
62 63
      color: $gray;
      display: block;
64
      text-decoration: none;
65 66
      padding-left: 22px;
      font-weight: normal;
67 68 69 70

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

72 73 74 75 76
      &:active, &:focus {
        text-decoration: none;
      }

      i {
77
        width: 16px;
78
        color: $gray-light;
79
        margin-right: 13px;
80 81 82 83 84 85 86 87
      }

      .count {
        float: right;
        background: #eee;
        padding: 0px 8px;
        @include border-radius(6px);
      }
D
Dmitriy Zaporozhets 已提交
88
    }
89 90 91
  }
}

92
.sidebar-subnav {
93 94 95 96 97 98 99 100
  margin-left: 0px;
  padding-left: 0px;

  li {
    list-style: none;
  }
}

101
@mixin expanded-sidebar {
D
Dmitriy Zaporozhets 已提交
102
  padding-left: $sidebar_width;
103
  transition-duration: .3s;
104 105

  .sidebar-wrapper {
106
    width: $sidebar_width;
107 108

    .nav-sidebar {
109
      width: $sidebar_width;
110
    }
111 112 113

    .nav-sidebar li a{
      width: 230px;
114 115 116 117 118 119

      &.back-link {
        i {
          visibility: hidden;
        }
      }
120
    }
121 122
  }
}
123

124
@mixin folded-sidebar {
125
  padding-left: 60px;
126
  transition-duration: .3s;
127 128

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

131 132 133 134
    .header-logo {
      width: $sidebar_collapsed_width;

      a {
135
        padding-left: 12px;
136 137 138 139 140

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

143
    .nav-sidebar {
D
Dmitriy Zaporozhets 已提交
144
      width: $sidebar_collapsed_width;
145

146 147 148 149
      li a {
        span {
          display: none;
        }
150 151
      }
    }
S
Sabba Petri 已提交
152 153

    .collapse-nav a {
D
Dmitriy Zaporozhets 已提交
154
      width: $sidebar_collapsed_width;
S
Sabba Petri 已提交
155
    }
156 157

    .sidebar-user {
158
      padding-left: 12px;
159
      width: $sidebar_collapsed_width;
160 161 162 163

      .username {
        display: none;
      }
164
    }
165 166
  }
}
167

D
Dmitriy Zaporozhets 已提交
168
.collapse-nav a {
169
  width: $sidebar_width;
D
Dmitriy Zaporozhets 已提交
170
  position: fixed;
171
  bottom: 0;
172
  left: 0;
173
  font-size: 13px;
174
  background: transparent;
175
  height: 40px;
176
  text-align: center;
177
  line-height: 40px;
178
  transition-duration: .3s;
S
Sabba Petri 已提交
179 180 181 182
}

.collapse-nav a:hover {
  text-decoration: none;
183
  background: #f2f6f7;
184 185
}

D
Dmitriy Zaporozhets 已提交
186 187 188
@media (max-width: $screen-md-max) {
  .page-sidebar-collapsed {
    @include folded-sidebar;
189 190
  }

D
Dmitriy Zaporozhets 已提交
191 192
  .page-sidebar-expanded {
    @include folded-sidebar;
193 194
  }

D
Dmitriy Zaporozhets 已提交
195 196 197
  .collapse-nav {
    display: none;
  }
198 199
}

200
@media(min-width: $screen-md-max) {
D
Dmitriy Zaporozhets 已提交
201 202 203
  .page-sidebar-collapsed {
    @include folded-sidebar;
  }
204

D
Dmitriy Zaporozhets 已提交
205 206
  .page-sidebar-expanded {
    @include expanded-sidebar;
207 208
  }
}
209 210

.sidebar-user {
D
Dmitriy Zaporozhets 已提交
211
  padding: 9px 22px;
212
  position: fixed;
213
  bottom: 40px;
214
  width: $sidebar_width;
215
  overflow: hidden;
216
  transition-duration: .3s;
217

218
  .username {
219
    margin-left: 10px;
220
    width: $sidebar_width - 2 * 10px;
221
    font-size: 16px;
222
    line-height: 34px;
223 224
  }
}
225 226 227 228 229 230 231 232 233 234 235 236 237 238

.sidebar-wrapper {
  .header-logo {
    border-bottom: 1px solid transparent;
    float: left;
    height: $header-height;
    width: $sidebar_width;
    overflow: hidden;
    transition-duration: .3s;

    a {
      float: left;
      height: $header-height;
      width: 100%;
D
Dmitriy Zaporozhets 已提交
239
      padding: 10px 22px;
240 241 242
      overflow: hidden;

      img {
243 244
        width: 36px;
        height: 36px;
245 246 247 248 249 250 251 252 253 254 255
        float: left;
      }

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

        h3 {
          width: 158px;
          float: left;
          margin: 0;
          margin-left: 14px;
D
Dmitriy Zaporozhets 已提交
256
          font-size: 19px;
257
          line-height: 41px;
258 259 260 261 262 263 264 265 266 267
          font-weight: normal;
        }
      }
    }

    &:hover {
      background-color: #EEE;
    }
  }
}