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

126 lines
2.3 KiB
Stylus
Raw Normal View History

@require "common/variables.styl";
@require "./common/animated.styl";
//
$component-interspace = 30px;
.page-template {
2020-04-01 12:09:06 +08:00
padding-top: $header-height;
position: relative;
.page-top {
position: fixed;
top: 0;
width: 100%;
2020-04-01 12:09:06 +08:00
height: $header-height;
2020-04-01 23:03:38 +08:00
z-index: $z-index-5;
box-sizing: border-box;
transition();
}
2020-04-21 10:47:36 +08:00
.page-middle {
width: 100%;
2020-04-01 12:09:06 +08:00
display: flex;
justify-content: center;
padding: $component-interspace 0;
2020-04-01 12:09:06 +08:00
.main-content {
width: $main-content-width;
2020-04-01 12:09:06 +08:00
height: 100%;
position: relative;
box-sizing: border-box;
if (hexo-config('magic.enable') && hexo-config('magic.sidebar.enable') == true) {
padding-right: $sidebar-width + $component-interspace;
.main-content-right {
position: absolute;
right: 0;
width: $sidebar-width;
box-sizing: border-box;
}
}
2020-04-21 10:47:36 +08:00
.main-content-left {
position: relative;
float: left;
width: 100%;
box-sizing: border-box;
2020-04-21 10:47:36 +08:00
}
2020-04-21 10:47:36 +08:00
}
.sidebar-tools {
position: fixed;
top: $header-height + $component-interspace;
left: ((100% - $main-content-width) / 4);
transition();
}
2020-04-21 10:47:36 +08:00
2020-04-05 00:42:07 +08:00
.scroll-to-top {
2020-04-05 08:32:44 +08:00
display: none;
2020-04-05 00:42:07 +08:00
position: fixed;
right: ((100% - $main-content-width) / 4);
bottom: $component-interspace;
2020-04-05 00:42:07 +08:00
border-radius: 2px;
padding: 2px 6px;
color: var(--frist-text-color);
background: var(--border-color);
cursor: pointer;
button {
color: var(--frist-text-color);
i {
font-size: 1.2em;
2020-04-05 00:42:07 +08:00
}
}
}
}
.page-bottom {
width: 100%;
}
}
.page-top-shrink {
2020-04-01 12:09:06 +08:00
padding-top: $header-shrink-height;
.page-top {
2020-04-01 12:09:06 +08:00
height: $header-shrink-height;
}
.sidebar-tools {
top: $header-shrink-height + $component-interspace !important;
2020-04-03 18:18:42 +08:00
}
2020-04-21 10:47:36 +08:00
.sidebar-toc {
top: $header-shrink-height + $component-interspace !important;
2020-04-21 10:47:36 +08:00
}
2020-04-03 18:18:42 +08:00
}
@media screen and (max-width: $media-max-width) {
.main-content {
width: $main-content-width * 1.2 !important;
}
2020-04-05 00:42:07 +08:00
.sidebar-tools {
2020-04-21 10:47:36 +08:00
left: 2% !important;
transform-origin: right top;
transform: scale(0.8);
2020-04-21 10:47:36 +08:00
}
//.sidebar-toc {
// right: 2% !important;
//}
//.scroll-to-top {
// right: 2% !important;
//}
2020-04-05 00:42:07 +08:00
}