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

176 lines
3.2 KiB
Stylus
Raw Normal View History

.page-container {
position relative
box-sizing border-box
width 100%
height auto
background var(--background-color)
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
2022-10-11 12:42:11 +08:00
box-sizing border-box
padding-top $header-height
&.is-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, height", "0, 0", "0.3, 0.2", "ease-out, 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%
transition-t("max-width, width", "0, 0", "0.1, 0.1", "ease, ease")
2020-04-21 10:47:36 +08:00
.has-toc & {
max-width $has-toc-content-max-width
}
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
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
}