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

73 lines
1.5 KiB
Stylus
Raw Normal View History

2020-12-07 12:04:34 +08:00
$first-screen-font-size = 2rem;
$first-screen-icon-size = 1.6rem;
$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');
$first-screen-font-color = $temp-font-color ? convert($temp-font-color) : var(--default-text-color);
2020-11-13 14:43:22 +08:00
.first-screen-container {
position: relative;
box-sizing: border-box;
width: 100%;
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;
}
2021-01-04 21:16:07 +08:00
+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 {
2020-11-19 11:58:54 +08:00
position: relative;
box-sizing: border-box;
2020-11-19 11:58:54 +08:00
width: 80%;
2021-01-06 18:38:47 +08:00
height: 90%;
2022-09-28 13:51:32 +08:00
padding-top: 2rem;
2020-11-15 22:06:32 +08:00
.description {
font-weight: bold;
2020-12-07 12:04:34 +08:00
font-size: $first-screen-font-size;
line-height: 1.8;
text-align: center;
color: $first-screen-font-color;
+keep-tablet() {
2020-12-07 12:04:34 +08:00
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 {
2020-11-15 22:06:32 +08:00
position: absolute;
bottom: 0;
2020-12-07 12:04:34 +08:00
font-size: $first-screen-icon-size;
text-align: center;
2020-11-15 22:06:32 +08:00
+keep-tablet() {
2020-12-07 12:04:34 +08:00
font-size: $first-screen-icon-size * 0.9;
}
2020-11-27 14:49:53 +08:00
.s-icon-item {
margin-right: 20px;
2020-11-15 22:06:32 +08:00
cursor: pointer;
line-height: 2;
2020-11-15 22:06:32 +08:00
&:last-child {
margin-right: 0;
}
}
}
}
2020-11-13 14:43:22 +08:00
}