|
| 1 | +// 布局最小宽度 |
| 2 | +@-main-content-min-width: 1280px; |
| 3 | + |
| 4 | +// 左侧内容宽度 |
| 5 | +@-main-left-content-width: 15.62%; // 200/1280 |
| 6 | +@-main-left-content-min-width: 200px; |
| 7 | +@-main-left-content-max-width: 310px; |
| 8 | + |
| 9 | +// 左侧内容 padding |
| 10 | +@-main-left-content-padding: 25px; |
| 11 | + |
| 12 | +// 右侧内容宽度 |
| 13 | +@-main-right-content-width: 70%; |
| 14 | +@-main-right-content-min-width: 900px; |
| 15 | +@-main-right-content-max-width: 3400px; |
| 16 | + |
| 17 | +@-header-height: 60px; |
| 18 | +@-footer-height: 60px; |
| 19 | +@-header-index: 9999999; |
| 20 | +@-left-menu-index: 2; |
| 21 | +@-right-content-index: 1; |
| 22 | + |
| 23 | +.main { |
| 24 | + width: 100%; |
| 25 | + margin: 0 auto; |
| 26 | + height: auto; |
| 27 | + background-color: #fff; |
| 28 | + min-width: @-main-content-min-width; |
| 29 | + |
| 30 | + /* 头部导航 */ |
| 31 | + .main-banner { |
| 32 | + width: 100%; |
| 33 | + position: fixed; |
| 34 | + top: 2px; |
| 35 | + height: 60px; |
| 36 | + background-color: #fff; |
| 37 | + z-index: @-header-index; |
| 38 | + background: #fff; |
| 39 | + -webkit-box-shadow: 0 2px 8px #f0f1f2; |
| 40 | + box-shadow: 0 2px 8px #f0f1f2; |
| 41 | + |
| 42 | + .main-banner-warpper { |
| 43 | + width: 100%; |
| 44 | + height: 100%; |
| 45 | + line-height: 60px; |
| 46 | + font-size: 20px; |
| 47 | + font-weight: bold; |
| 48 | + color: #0092dd; |
| 49 | + |
| 50 | + .main-banner-logo { |
| 51 | + position: fixed; |
| 52 | + width: @-main-left-content-width; |
| 53 | + min-width: @-main-left-content-min-width; |
| 54 | + max-width: @-main-left-content-max-width; |
| 55 | + padding-left: @-main-left-content-padding; |
| 56 | + top: 0px; |
| 57 | + display: inline-block; |
| 58 | + } |
| 59 | + |
| 60 | + .main-banner-menus-container { |
| 61 | + width: @-main-right-content-width; |
| 62 | + min-width: @-main-right-content-min-width; |
| 63 | + max-width: @-main-right-content-max-width; |
| 64 | + height: 100%; |
| 65 | + margin: 0 auto; |
| 66 | + |
| 67 | + .main-banner-menus { |
| 68 | + display: block; |
| 69 | + float: right; |
| 70 | + font-weight: normal; |
| 71 | + font-size: 14px; |
| 72 | + .main-banner-menu-item { |
| 73 | + position: relative; |
| 74 | + display: inline-block; |
| 75 | + min-width: 100px; |
| 76 | + text-align: center; |
| 77 | + padding: 0 8px; |
| 78 | + height: 60px; |
| 79 | + line-height: 60px; |
| 80 | + font-size: 16px; |
| 81 | + |
| 82 | + .switch-lang-container, |
| 83 | + .switch-version-container { |
| 84 | + position: relative; |
| 85 | + line-height: 1; |
| 86 | + |
| 87 | + .switch-lang-dropdown-pannel, |
| 88 | + .switch-version-dropdown-pannel { |
| 89 | + position: absolute; |
| 90 | + display: none; |
| 91 | + margin-top: 10px; |
| 92 | + padding: 8px 0; |
| 93 | + border: 1px solid #d1dbe5; |
| 94 | + background-color: #fff; |
| 95 | + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), |
| 96 | + 0 0 6px rgba(0, 0, 0, 0.04); |
| 97 | + |
| 98 | + &.dropdown-pannel-show { |
| 99 | + display: block; |
| 100 | + } |
| 101 | + |
| 102 | + .dropdown-item { |
| 103 | + display: inline-block; |
| 104 | + width: 100%; |
| 105 | + height: 32px; |
| 106 | + line-height: 32px; |
| 107 | + text-align: left; |
| 108 | + font-size: 14px; |
| 109 | + color: #000000d9; |
| 110 | + padding: 0 8px; |
| 111 | + margin-bottom: 3px; |
| 112 | + cursor: pointer; |
| 113 | + &:hover { |
| 114 | + background-color: #eee; |
| 115 | + } |
| 116 | + &.active { |
| 117 | + background-color: #e6f7ff; |
| 118 | + color: #108ee9; |
| 119 | + } |
| 120 | + } |
| 121 | + } |
| 122 | + } |
| 123 | + |
| 124 | + .main-banner-menu-link { |
| 125 | + color: #666; |
| 126 | + |
| 127 | + .icon { |
| 128 | + font-size: 22px; |
| 129 | + } |
| 130 | + } |
| 131 | + |
| 132 | + .switch-lang, |
| 133 | + .switch-version { |
| 134 | + color: #666; |
| 135 | + cursor: pointer; |
| 136 | + &:hover { |
| 137 | + color: #409eff; |
| 138 | + } |
| 139 | + } |
| 140 | + |
| 141 | + &.link-active { |
| 142 | + .main-banner-menu-link { |
| 143 | + &:after { |
| 144 | + content: ""; |
| 145 | + display: inline-block; |
| 146 | + position: absolute; |
| 147 | + bottom: 0; |
| 148 | + left: calc(50% - 20px); |
| 149 | + width: 40px; |
| 150 | + height: 2px; |
| 151 | + background: #409eff; |
| 152 | + } |
| 153 | + } |
| 154 | + } |
| 155 | + } |
| 156 | + } |
| 157 | + } |
| 158 | + } |
| 159 | + } |
| 160 | + |
| 161 | + /* 主体内容 */ |
| 162 | + .main-wrapper { |
| 163 | + width: 100%; |
| 164 | + background-color: #fff; |
| 165 | + overflow: hidden; |
| 166 | + |
| 167 | + /* 菜单栏 */ |
| 168 | + .main-wrapper-sidebar { |
| 169 | + width: @-main-left-content-width; |
| 170 | + min-width: @-main-left-content-min-width; |
| 171 | + max-width: @-main-left-content-max-width; |
| 172 | + position: fixed; |
| 173 | + padding-bottom: 25px; |
| 174 | + top: @-header-height; |
| 175 | + z-index: @-left-menu-index; |
| 176 | + height: calc(100vh - 60px); |
| 177 | + color: #495060; |
| 178 | + display: block; |
| 179 | + overflow-x: hidden; |
| 180 | + overflow-y: hidden; |
| 181 | + border-right: 1px solid #eee; |
| 182 | + z-index: 99; |
| 183 | + background-color: #fff; |
| 184 | + |
| 185 | + &:hover { |
| 186 | + overflow-y: auto; |
| 187 | + } |
| 188 | + |
| 189 | + .menu-root { |
| 190 | + position: relative; |
| 191 | + list-style: none; |
| 192 | + margin-left: 0; |
| 193 | + padding-left: 0; |
| 194 | + |
| 195 | + li { |
| 196 | + line-height: 40px; |
| 197 | + } |
| 198 | + |
| 199 | + a { |
| 200 | + margin: 0 @-main-left-content-padding; |
| 201 | + display: inline-block; |
| 202 | + font-size: 14px; |
| 203 | + width: 100%; |
| 204 | + height: 100%; |
| 205 | + text-decoration: none; |
| 206 | + color: #000000d9; |
| 207 | + } |
| 208 | + |
| 209 | + li.no-child:hover a { |
| 210 | + color: #1890ff; |
| 211 | + } |
| 212 | + |
| 213 | + li.active { |
| 214 | + a { |
| 215 | + color: #1890ff; |
| 216 | + } |
| 217 | + border-right: 3px solid #1890ff; |
| 218 | + background: #e6f7ff; |
| 219 | + } |
| 220 | + |
| 221 | + .main-wrapper-sidebar-link { |
| 222 | + display: inline-block; |
| 223 | + width: 100%; |
| 224 | + line-height: 40px; |
| 225 | + margin-top: 20px; |
| 226 | + margin-bottom: 10px; |
| 227 | + font-size: 16px; |
| 228 | + color: #666666; |
| 229 | + cursor: default; |
| 230 | + /* border-bottom: 1px solid #eee; */ |
| 231 | + } |
| 232 | + |
| 233 | + ul.menu-sub { |
| 234 | + border-top: 1px solid #eee; |
| 235 | + font-size: 1em; |
| 236 | + padding-left: 0; |
| 237 | + list-style-type: none; |
| 238 | + margin: 0; |
| 239 | + line-height: 1.8em; |
| 240 | + |
| 241 | + li:hover a { |
| 242 | + color: #1890ff; |
| 243 | + } |
| 244 | + } |
| 245 | + } |
| 246 | + } |
| 247 | + |
| 248 | + /* 右侧主体内容 */ |
| 249 | + .main-wrapper-container { |
| 250 | + width: @-main-right-content-width; |
| 251 | + min-width: @-main-right-content-min-width; |
| 252 | + max-width: @-main-right-content-max-width; |
| 253 | + margin: 0 auto; |
| 254 | + margin-top: @-header-height; |
| 255 | + z-index: @-right-content-index; |
| 256 | + padding: 5px 0 30px 65px; |
| 257 | + height: auto; |
| 258 | + min-height: calc(100vh - 160px); |
| 259 | + background-color: #ffffff; |
| 260 | + padding-bottom: 50px; |
| 261 | + |
| 262 | + &:after { |
| 263 | + content: ""; |
| 264 | + display: block; |
| 265 | + width: 1px; |
| 266 | + height: 100%; |
| 267 | + background: #eee; |
| 268 | + position: absolute; |
| 269 | + left: -1px; |
| 270 | + top: 0; |
| 271 | + bottom: 0; |
| 272 | + z-index: 1; |
| 273 | + } |
| 274 | + } |
| 275 | + |
| 276 | + /* footer */ |
| 277 | + .main-footer { |
| 278 | + height: 60px; |
| 279 | + line-height: 60px; |
| 280 | + // margin-left: #{"min(310px, #{@-main-left-content-width})"}; |
| 281 | + |
| 282 | + text-align: center; |
| 283 | + background-color: #fff; |
| 284 | + border-top: 1px solid #eee; |
| 285 | + } |
| 286 | + |
| 287 | + .example-md-doc { |
| 288 | + margin-bottom: 30px; |
| 289 | + // 代码 |
| 290 | + p { |
| 291 | + line-height: 1.8; |
| 292 | + code { |
| 293 | + font-family: Menlo, Monaco, Consolas, Courier, monospace; |
| 294 | + color: #5e6d82; |
| 295 | + background-color: #e6effb; |
| 296 | + margin: 0 4px; |
| 297 | + display: inline-block; |
| 298 | + padding: 1px 5px; |
| 299 | + font-size: 12px; |
| 300 | + border-radius: 3px; |
| 301 | + height: 20px; |
| 302 | + line-height: 20px; |
| 303 | + } |
| 304 | + } |
| 305 | + // 提示 |
| 306 | + > .tip { |
| 307 | + padding: 3px 16px; |
| 308 | + background-color: #ecf8ff; |
| 309 | + border-radius: 4px; |
| 310 | + border-left: 5px solid #91d5ff; |
| 311 | + margin: 20px 0; |
| 312 | + > p { |
| 313 | + line-height: 2; |
| 314 | + } |
| 315 | + } |
| 316 | + // 警告 |
| 317 | + > .warning { |
| 318 | + padding: 2px 16px; |
| 319 | + background-color: #fff6f7; |
| 320 | + border-radius: 4px; |
| 321 | + border-left: 5px solid #fe6c6f; |
| 322 | + margin: 20px 0; |
| 323 | + } |
| 324 | + |
| 325 | + // ul li |
| 326 | + > ul li { |
| 327 | + margin-top: 15px; |
| 328 | + } |
| 329 | + } |
| 330 | + } |
| 331 | + |
| 332 | + /*回到顶部 start*/ |
| 333 | + .main-back-top { |
| 334 | + position: fixed; |
| 335 | + bottom: 100px; |
| 336 | + right: 38px; |
| 337 | + width: 80px; |
| 338 | + z-index: 1; |
| 339 | + } |
| 340 | + |
| 341 | + .main-back-top-icon { |
| 342 | + color: #555; |
| 343 | + font-size: 56px; |
| 344 | + opacity: 0.3; |
| 345 | + } |
| 346 | + |
| 347 | + .main-back-top-icon:hover { |
| 348 | + cursor: pointer; |
| 349 | + opacity: 0.8; |
| 350 | + } |
| 351 | + /*回到顶部 end*/ |
| 352 | + |
| 353 | + .anchor { |
| 354 | + cursor: pointer; |
| 355 | + } |
| 356 | +} |
0 commit comments