@doreamonjs/gate
Version:
gate for doreamonjs
131 lines (106 loc) • 2.16 kB
text/less
@import '~antd/lib/style/themes/default.less';
:global(.ant-layout-sider-collapsed) {
.logo {
padding-left: 12px;
margin-left: 0;
}
}
@gate-layout-sider: doreamonjs-design-gate-layout-sider;
.@{gate-layout-sider}.side {
position: relative;
// box-shadow: 2px 0 6px rgba(0,21,41,.35);
// background: #001529;
.logo {
height: 64px;
position: relative;
line-height: 64px;
// padding-left: 12px;
margin-left: -12px;
text-align: center;
transition: all 0.3s;
overflow: hidden;
cursor: pointer;
background: #002140;
display: flex;
align-items: center;
justify-content: center;
:global(&.light) {
background: #fff;
color: #000;
border-right: 1px solid #e8e8e8;
border-bottom: 1px solid #e8e8e8;
.logoName {
color: #000;
}
}
:global(&.dark) {
background: #002140;
.logoName {
color: #fff;
}
}
&.logoCollapsed {
// padding-top: 12px;
:global {
.logoName {
// visibility: hidden;
display: none;
}
}
}
.logoName {
color: #fff;
font-size: 20px;
font-weight: 600;
margin-left: 12px;
}
.logoImage {
width: 32px;
height: 32px;
}
}
.siderMenuContainer {
position: absolute;
top: 64px;
left: 0;
width: 100%;
height: calc(100% - 64px);
overflow: hidden;
overflow-y: auto;
border-right: 1px solid #e8e8e8;
background-color: transparent;
&::-webkit-scrollbar {
width: 0 ;
}
}
}
@media (max-width: 767px) {
.@{gate-layout-sider}.side {
position: fixed;
top: 0px;
left: 0px;
height: 100vh;
z-index: 10000;
&:after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, .38);
z-index: -1;
}
&.ant-layout-sider-collapsed {
display: none;
}
.siderMenuContainer {
&.light {
background: #fff;
}
&.dark {
background: #001529;
}
}
}
}