amis2/scss/components/_page.scss

145 lines
2.7 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Page {
2020-07-28 13:14:33 +08:00
width: 100%;
2021-04-02 17:10:00 +08:00
height: 100%;
background: var(--Page-main-bg);
2020-07-28 13:14:33 +08:00
2019-12-06 09:58:08 +08:00
&-header {
padding: var(--Page-header-paddingY) var(--Page-header-paddingX);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-main {
// background: var(--Page-main-bg);
2020-02-14 16:11:33 +08:00
height: 100%;
display: flex;
flex-direction: column;
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-content {
padding: var(--Page-content-paddingY) var(--Page-content-paddingX);
2020-10-14 11:09:04 +08:00
position: relative;
height: 100%;
width: 100%;
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-main > &-header {
border-bottom: var(--borderWidth) solid var(--borderColor);
// background: var(--Page-header-bg);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-headerRow {
// background: var(--Page-header-bg);
border-bottom: var(--borderWidth) solid var(--borderColor);
2019-04-30 11:11:25 +08:00
2020-07-28 13:14:33 +08:00
display: flex;
flex-direction: row;
align-items: center;
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
.#{$ns}Page-header,
.#{$ns}Page-toolbar {
2020-07-28 13:14:33 +08:00
flex-grow: 1;
min-height: 100%;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
.#{$ns}Page-toolbar {
text-align: right;
padding-right: var(--gap-base);
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
flex-wrap: wrap;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-title {
margin: 0;
padding: 0;
color: var(--Page-title-color);
line-height: var(--Page-title-lineHeight);
font-size: var(--Page-title-fontSize);
font-weight: var(--Page-title-fontWeight);
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
2019-12-06 09:58:08 +08:00
&-body {
padding: var(--Page-body-padding);
2020-02-14 16:11:33 +08:00
flex: 1 auto;
2019-12-06 09:58:08 +08:00
}
&-asideTplWrapper {
padding: var(--gap-xs);
2019-12-06 09:58:08 +08:00
}
&-asideResizor {
position: absolute;
right: -0.375rem;
top: 50%;
cursor: ew-resize;
writing-mode: vertical-lr;
width: 0.75rem;
height: 1.5rem;
margin-top: -0.75rem;
border: 0.0625rem solid #dee2e6;
background-color: #fff;
border-radius: 0.142rem;
font-size: 12px;
line-height: 0.625rem;
text-align: center;
user-select: none;
color: #666;
&:hover {
color: #000;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.12),
0 2px 4px 0 rgba(0, 0, 0, 0.08);
}
&:after {
content: '···';
}
}
2019-04-30 11:11:25 +08:00
}
2019-07-22 15:42:30 +08:00
.#{$ns}Page-toolbar {
2020-10-19 10:44:09 +08:00
> * + * {
margin-left: var(--gap-xs);
2019-12-06 09:58:08 +08:00
}
2019-07-22 15:42:30 +08:00
}
2019-04-30 11:11:25 +08:00
2019-07-22 15:42:30 +08:00
.#{$ns}Page-aside {
// background: var(--Page-aside-bg);
2019-04-30 11:11:25 +08:00
}
2019-07-22 15:42:30 +08:00
@include media-breakpoint-up(md) {
2019-12-06 09:58:08 +08:00
.#{$ns}Page-aside {
&::before {
content: '';
position: absolute;
width: inherit;
top: 0;
bottom: 0;
z-index: -1;
background: inherit;
2019-12-06 09:58:08 +08:00
border: inherit;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
width: var(--Page-aside-width);
border-right: var(--borderWidth) solid var(--borderColor);
&--withWidth {
min-width: var(--Page-aside-width);
max-width: var(--Page-aside-maxWidth);
}
2019-12-06 09:58:08 +08:00
}
.#{$ns}Page--withSidebar {
2020-07-28 13:14:33 +08:00
display: flex;
flex-direction: row;
2020-07-28 14:55:00 +08:00
align-items: stretch;
2019-12-06 09:58:08 +08:00
> .#{$ns}Page-content {
2020-07-28 13:14:33 +08:00
width: 0;
flex-grow: 1;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
}