hexo-theme-keep/source/css/layout/_partial/first-screen.styl

76 lines
1.6 KiB
Stylus
Raw Permalink Normal View History

$first-screen-font-size = 2rem
$first-screen-icon-size = 1.8rem
$temp-img = hexo-config('style.first_screen.background_img')
$first-screen-img = $temp-img ? $temp-img : '/images/bg.svg'
$temp-font-color = hexo-config('style.first_screen.font_color')
2022-10-14 17:56:32 +08:00
$first-screen-font-color = $temp-font-color ? convert($temp-font-color) : var(--text-color-3)
2020-11-13 14:43:22 +08:00
.first-screen-container {
position relative
box-sizing border-box
width 100%
height 100vh
overflow hidden
background url($first-screen-img) center center / cover no-repeat
2020-11-15 22:06:32 +08:00
if (!(hexo-config('style.first_screen.header_transparent') == true)) {
background-position-y $header-height
+keep-tablet() {
background-position-y $header-height * 0.9
}
2021-01-04 21:16:07 +08:00
+keep-mobile() {
background-position-y $header-height * 0.8
}
2021-01-04 21:16:07 +08:00
}
2020-11-15 22:06:32 +08:00
.content {
position relative
box-sizing border-box
width 80%
height 90%
padding-top 2rem
2020-11-15 22:06:32 +08:00
.description {
color $first-screen-font-color
font-weight bold
font-size $first-screen-font-size
line-height 1.8
text-align center
.desc-item {
color $first-screen-font-color
}
+keep-tablet() {
font-size $first-screen-font-size * 0.9
}
2020-11-15 22:06:32 +08:00
}
2020-11-27 14:49:53 +08:00
.s-icon-list {
position absolute
bottom 0
display flex
box-sizing border-box
font-size $first-screen-icon-size
2020-11-15 22:06:32 +08:00
+keep-tablet() {
font-size $first-screen-icon-size * 0.9
}
2020-11-27 14:49:53 +08:00
.s-icon-item {
margin 0 1rem
cursor pointer
i {
2022-10-14 17:56:32 +08:00
color var(--text-color-3)
}
2020-11-15 22:06:32 +08:00
}
}
}
2020-11-13 14:43:22 +08:00
}