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

199 lines
3.7 KiB
Stylus
Raw Normal View History

$temp-width = hexo-config('style.left_side_width')
$page-aside-width = $temp-width ? convert($temp-width) : 260px
.page-container {
position relative
box-sizing border-box
width 100%
height auto
background var(--background-color)
transition-t("padding-left", "0", "0.3", "ease-out")
2020-11-20 12:02:22 +08:00
+keep-tablet() {
padding-left 0 !important
}
2021-01-06 18:36:28 +08:00
.page-main-content {
position relative
padding-top $header-height
&.home {
.transparent-1 {
background var(--header-transparent-background-1)
}
.transparent-2 {
background var(--header-transparent-background-2)
}
}
2021-01-06 18:36:28 +08:00
.header-shrink & {
padding-top $header-shrink-height
2021-01-06 18:36:28 +08:00
+keep-tablet() {
padding-top $header-shrink-height * 0.9
2021-01-06 18:36:28 +08:00
}
+keep-mobile() {
padding-top $header-shrink-height * 0.8
2021-01-06 18:36:28 +08:00
}
}
2020-04-01 12:09:06 +08:00
2021-01-06 18:36:28 +08:00
+keep-tablet() {
padding-top $header-height * 0.9
2021-01-06 18:36:28 +08:00
}
2021-01-06 18:36:28 +08:00
+keep-mobile() {
padding-top $header-height * 0.8
2021-01-06 18:36:28 +08:00
}
2021-01-06 18:36:28 +08:00
.page-main-content-top {
position fixed
top 0
right 0
z-index $z-index-5
box-sizing border-box
width 100%
height $header-height
transition-t("transform, padding-left, height", "0, 0, 0", "0.3, 0.2, 0.2", "ease-out, linear, ease")
2021-01-06 18:36:28 +08:00
&.hide {
transform translateY(-105%)
2021-01-06 18:36:28 +08:00
}
2021-01-05 11:48:58 +08:00
.header-shrink & {
height $header-shrink-height
2021-01-05 11:48:58 +08:00
+keep-tablet() {
height $header-shrink-height * 0.9
2021-01-05 11:48:58 +08:00
}
+keep-mobile() {
height $header-shrink-height * 0.8
2021-01-05 11:48:58 +08:00
}
}
2021-01-06 18:36:28 +08:00
2020-11-20 12:02:22 +08:00
+keep-tablet() {
height $header-height * 0.9
padding-left 0 !important
}
2020-04-29 16:37:13 +08:00
2021-01-06 18:36:28 +08:00
2020-11-20 12:02:22 +08:00
+keep-mobile() {
height $header-height * 0.8
}
2021-01-06 18:36:28 +08:00
}
2021-01-06 18:36:28 +08:00
.page-main-content-middle {
display flex
justify-content center
box-sizing border-box
width 100%
padding $component-spacing-value 0
2021-01-05 11:48:58 +08:00
2021-01-06 18:36:28 +08:00
+keep-tablet() {
padding $component-spacing-value * 0.8 0
2021-01-06 18:36:28 +08:00
}
2021-01-06 18:36:28 +08:00
+keep-mobile() {
padding $component-spacing-value * 0.6 0
2020-04-21 10:47:36 +08:00
}
2021-01-06 18:36:28 +08:00
.main-content {
position relative
box-sizing border-box
width $main-content-width
max-width $content-max-width
height 100%
2020-04-21 10:47:36 +08:00
2020-11-20 12:02:22 +08:00
+keep-tablet() {
width $main-content-width-tablet
}
2020-11-20 12:02:22 +08:00
+keep-mobile() {
width $main-content-width-mobile
}
}
2021-01-06 18:36:28 +08:00
}
2021-01-06 18:36:28 +08:00
.page-main-content-bottom {
width 100%
}
2020-04-03 18:18:42 +08:00
}
2020-04-21 10:47:36 +08:00
2020-04-03 18:18:42 +08:00
.page-aside {
position fixed
top 0
bottom 0
left - $page-aside-width
z-index $z-index-6
box-sizing border-box
width $page-aside-width
height 100%
padding 20px
overflow-y auto
background var(--background-color)
hover-style(false, 0, 0)
transition-t("left, transform", "0, 0", "0.3, 0.2", "ease-out, linear")
2020-06-04 22:11:27 +08:00
2020-11-20 12:02:22 +08:00
+keep-tablet() {
left 0 !important
display none !important
}
}
2020-04-05 00:42:07 +08:00
2021-01-06 23:53:17 +08:00
.post-tools {
position fixed
top $header-height + $component-spacing-value
right $component-spacing-value
transition-t("top", "0", "0.2", "ease")
2020-09-07 16:25:37 +08:00
2021-01-05 11:48:58 +08:00
.header-shrink & {
top $header-shrink-height + $component-spacing-value
2021-01-04 21:16:07 +08:00
+keep-tablet() {
top $header-shrink-height * 0.9 + $component-spacing-value
2021-01-04 21:16:07 +08:00
}
+keep-mobile() {
top $header-shrink-height * 0.8 + $component-spacing-value
2021-01-04 21:16:07 +08:00
}
}
2021-01-05 11:48:58 +08:00
2020-11-20 12:02:22 +08:00
+keep-tablet() {
top $header-height * 0.9 + $component-spacing-value
right 10px
transform scale(0.82)
transform-origin right top
2020-09-07 16:25:37 +08:00
}
2021-01-05 11:48:58 +08:00
2020-11-20 12:02:22 +08:00
+keep-mobile() {
top $header-height * 0.8 + $component-spacing-value
right 5px
transform scale(0.72)
2020-09-07 16:25:37 +08:00
}
2020-04-21 10:47:36 +08:00
}
.right-bottom-side-tools {
position fixed
right 0
bottom 5%
}
2020-09-02 19:17:24 +08:00
}