phanpy/src/pages/welcome.css

177 lines
3.2 KiB
CSS
Raw Normal View History

2023-11-06 17:17:56 +08:00
@keyframes shine2 {
0% {
left: -100%;
}
20% {
left: 100%;
}
100% {
left: 100%;
}
}
2022-12-10 17:14:48 +08:00
#welcome {
text-align: center;
2022-12-20 00:16:45 +08:00
background-image: radial-gradient(
2023-06-10 19:20:32 +08:00
circle at center,
var(--bg-color),
transparent 16em
),
radial-gradient(circle at center, var(--bg-color), transparent 8em);
background-repeat: no-repeat;
background-attachment: fixed;
cursor: default;
2023-11-06 17:17:56 +08:00
@media (prefers-color-scheme: dark) {
background-image: none;
}
2022-12-10 17:14:48 +08:00
2023-11-06 17:17:56 +08:00
.hero-container {
padding: 16px;
height: 100vh;
height: 100svh;
max-height: 800px;
display: flex;
flex-direction: column;
2023-06-10 19:20:32 +08:00
}
2023-11-06 17:17:56 +08:00
h1 {
margin: 0;
padding: 0;
font-size: 5em;
line-height: 1;
letter-spacing: -1px;
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
mix-blend-mode: multiply;
@media (prefers-color-scheme: dark) {
mix-blend-mode: normal;
}
&:before {
content: '';
position: absolute;
z-index: 2;
width: 100%;
height: 100%;
background-image: linear-gradient(
100deg,
rgba(255, 255, 255, 0) 30%,
rgba(255, 255, 255, 0.4),
rgba(255, 255, 255, 0) 70%
);
top: 0;
left: -100%;
pointer-events: none;
animation: shine2 5s ease-in-out 1s infinite;
@media (prefers-color-scheme: dark) {
content: none;
}
}
img {
filter: drop-shadow(-1px -1px var(--bg-blur-color))
drop-shadow(0 -1px 1px #fff)
drop-shadow(0 16px 32px var(--drop-shadow-color));
@media (prefers-color-scheme: dark) {
filter: none;
}
}
&:hover img {
transform: scale(1.05);
}
2023-06-10 19:20:32 +08:00
}
2023-11-06 17:17:56 +08:00
img {
vertical-align: top;
transition: transform 0.3s ease-out;
2023-06-10 19:20:32 +08:00
}
2023-11-06 17:17:56 +08:00
.desc {
font-size: 1.4em;
text-wrap: balance;
opacity: 0.7;
2022-12-10 17:14:48 +08:00
}
2023-11-06 17:17:56 +08:00
.hero-container > p {
margin-top: 0;
2022-12-10 17:14:48 +08:00
}
2023-11-06 17:17:56 +08:00
#why-container {
padding: 0 16px;
2023-06-10 19:20:32 +08:00
}
2023-11-06 17:17:56 +08:00
.sections {
padding-inline: 16px;
section {
text-align: start;
max-width: 480px;
background-color: var(--bg-color);
border-radius: 16px;
overflow: hidden;
box-shadow: 17px 20px 40px var(--drop-shadow-color);
margin-bottom: 48px;
h4 {
margin: 0;
padding: 30px 30px 0;
font-size: 1.4em;
font-weight: 600;
}
p {
margin-inline: 30px;
margin-bottom: 30px;
opacity: 0.7;
text-wrap: balance;
}
img {
width: 100%;
height: auto;
border-bottom: 1px solid var(--outline-color);
@media (prefers-color-scheme: dark) {
filter: invert(0.85) hue-rotate(180deg);
}
}
}
2023-06-10 19:20:32 +08:00
}
2023-04-24 22:58:14 +08:00
2023-11-06 17:17:56 +08:00
@media (width > 40em) {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr auto;
height: 100vh;
height: 100svh;
2023-04-24 22:58:14 +08:00
2023-11-06 17:17:56 +08:00
.hero-container {
height: auto;
}
#why-container {
padding: 32px;
overflow: auto;
mask-image: linear-gradient(to top, transparent 16px, black 64px);
}
footer {
grid-row: 2;
grid-column: 1 / span 2;
}
}
& ~ :is(#compose-button, #shortcuts) {
display: none;
2023-06-10 19:20:32 +08:00
}
2023-04-24 22:58:14 +08:00
}