hexo-theme-keep/source/css/layout/page.styl

197 lines
3.7 KiB
Stylus

$temp-width = hexo-config('style.left_side_width');
$page-aside-width = $temp-width ? convert($temp-width):260px;
.page-container {
position: relative;
padding-top: $header-progress-height;
transition();
+keep-tablet() {
padding-left: 0 !important;
}
.page-header {
.header-progress {
visibility: hidden;
position: fixed;
width: 0;
height: $header-progress-height;
top: 0;
left: 0;
background: var(--primary-color);
transition: all 0.1s ease;
z-index: $z-index-7;
}
}
.page-main {
.page-main-content {
padding-top: $header-height;
position: relative;
.header-shrink & {
padding-top: $header-shrink-height;
transition();
+keep-tablet() {
padding-top: $header-shrink-height * 0.9;
}
+keep-mobile() {
padding-top: $header-shrink-height * 0.8;
}
}
+keep-tablet() {
padding-top: $header-height * 0.9;
}
+keep-mobile() {
padding-top: $header-height * 0.8;
}
.page-main-content-top {
position: fixed;
top: 0;
right: 0;
width: 100%;
height: $header-height;
z-index: $z-index-5;
box-sizing: border-box;
transition();
.header-shrink & {
height: $header-shrink-height;
+keep-tablet() {
height: $header-shrink-height * 0.9;
}
+keep-mobile() {
height: $header-shrink-height * 0.8;
}
}
+keep-tablet() {
height: $header-height * 0.9;
padding-left: 0 !important;
}
+keep-mobile() {
height: $header-height * 0.8;
}
}
.page-main-content-middle {
box-sizing: border-box;
width: 100%;
display: flex;
justify-content: center;
padding: $component-interspace 0;
+keep-tablet() {
padding: $component-interspace * 0.8 0;
}
+keep-mobile() {
padding: $component-interspace * 0.6 0;
}
.main-content {
position: relative;
box-sizing: border-box;
width: $main-content-width;
max-width: $content-max-width;
height: 100%;
transition();
+keep-tablet() {
width: $main-content-width-tablet;
}
+keep-mobile() {
width: $main-content-width-mobile;
}
}
}
.page-main-content-bottom {
width: 100%;
}
}
}
.page-aside {
position: fixed;
top: 0;
bottom: 0;
left: - $page-aside-width;
width: $page-aside-width;
height: 100%;
z-index: $z-index-6;
overflow-y: auto;
border-radius: 0 !important;
keep-container(1.02, 1.02, 18px, 0);
+keep-tablet() {
left: 0 !important;
display: none !important;
}
the-transition-ease-out();
}
.sidebar-tools {
position: fixed;
top: $header-height + $component-interspace;
right: $component-interspace;
transition();
.header-shrink & {
top: $header-shrink-height + $component-interspace;
+keep-tablet() {
top: $header-shrink-height * 0.9 + $component-interspace;
}
+keep-mobile() {
top: $header-shrink-height * 0.8 + $component-interspace;
}
}
+keep-tablet() {
top: $header-height * 0.9 + $component-interspace;
right: 10px;
transform: scale(0.82);
transform-origin: right top;
}
+keep-mobile() {
top: $header-height * 0.8 + $component-interspace;
right: 5px;
transform: scale(0.72);
}
}
.right-bottom-side-tools {
position: fixed;
bottom: 5%;
right: 0;
}
}