Skip to content

Commit 1cb7892

Browse files
feat: 网页样式修改
1 parent ac56e3d commit 1cb7892

2 files changed

Lines changed: 50 additions & 7 deletions

File tree

packages/website/src/pages/index.module.css

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
background: var(--ifm-background-color);
1313
}
1414

15+
.scroll-progress,
16+
.hero-grid,
17+
.syntax-stage,
18+
.scroll-cue,
19+
.window-dots,
20+
.closing-signal,
21+
.btn-primary,
22+
.btn-secondary {
23+
user-select: none;
24+
}
25+
1526
.scroll-progress {
1627
position: fixed;
1728
z-index: calc(var(--ifm-z-index-fixed) + 1);
@@ -27,14 +38,31 @@
2738
}
2839

2940
.hero {
41+
--ifm-color-primary: #8b8df7;
42+
--ifm-color-primary-dark: #7274f4;
43+
--ifm-color-primary-light: #a5a7fa;
44+
--ifm-color-primary-lightest: #dfe0ff;
45+
--ifm-heading-color: #f5f3ff;
46+
--ifm-font-color-base: #e6e4ef;
47+
--ifm-background-color: #0f0f15;
48+
--ifm-background-surface-color: #191920;
49+
--ifm-color-emphasis-500: #858392;
50+
--ifm-color-emphasis-600: #aaa8b6;
51+
--home-panel: #191920;
52+
--home-muted: #aaa8b6;
53+
--home-line: rgba(255 255 255 / 12%);
54+
--home-soft: #161620;
55+
--home-glow: rgba(134 136 243 / 28%);
3056
position: relative;
3157
min-height: calc(100vh - var(--ifm-navbar-height));
3258
min-height: calc(100svh - var(--ifm-navbar-height));
3359
display: grid;
3460
isolation: isolate;
3561
overflow: hidden;
62+
color: var(--ifm-font-color-base);
3663
background:
3764
radial-gradient(circle at 73% 46%, var(--home-glow), transparent 31rem),
65+
radial-gradient(circle at 14% 7%, rgba(109 46 255 / 16%), transparent 22rem),
3866
linear-gradient(145deg, var(--home-soft), var(--ifm-background-color) 58%);
3967
}
4068

@@ -391,14 +419,12 @@
391419
display: block;
392420
min-height: 5.3rem;
393421
color: #d4d4d4;
394-
background: transparent;
422+
color-scheme: dark;
423+
background: linear-gradient(145deg, #252526, #1e1e1e 72%);
424+
box-shadow: inset 0 1px rgba(255 255 255 / 5%);
395425
font-size: 0.67rem;
396426
line-height: 1.7;
397427
white-space: pre;
398-
399-
:root[data-theme='light'] & {
400-
filter: hue-rotate(0.5turn) invert(0.8) brightness(1.5);
401-
}
402428
}
403429

404430
.scroll-cue {
@@ -759,6 +785,17 @@
759785
}
760786

761787
.closing-card {
788+
--ifm-color-primary: #8b8df7;
789+
--ifm-color-primary-dark: #7274f4;
790+
--ifm-color-primary-light: #a5a7fa;
791+
--ifm-color-primary-lightest: #dfe0ff;
792+
--ifm-heading-color: #f5f3ff;
793+
--ifm-font-color-base: #e6e4ef;
794+
--home-panel: #191920;
795+
--home-muted: #aaa8b6;
796+
--home-line: rgba(255 255 255 / 12%);
797+
--home-soft: #161620;
798+
--home-glow: rgba(134 136 243 / 28%);
762799
position: relative;
763800
width: min(1180px, 100%);
764801
min-height: 31rem;
@@ -769,11 +806,13 @@
769806
align-items: flex-start;
770807
justify-content: center;
771808
overflow: hidden;
809+
color: var(--ifm-font-color-base);
772810
border: 1px solid color-mix(in srgb, var(--ifm-color-primary) 40%, var(--home-line));
773811
border-radius: 1rem;
774812
background:
775813
radial-gradient(circle at 86% 32%, var(--home-glow), transparent 18rem),
776-
linear-gradient(135deg, var(--home-soft), var(--home-panel));
814+
radial-gradient(circle at 14% 92%, rgba(109 46 255 / 12%), transparent 20rem),
815+
linear-gradient(135deg, var(--home-soft), #0f0f15);
777816
}
778817

779818
.closing-card::before,

packages/website/src/pages/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@ export default function Home(): JSX.Element {
365365
READY
366366
</span>
367367
<p className={styles['section-kicker']}>YOUR TURN</p>
368-
<h2>把下一段想法,写成可运行的表达式。</h2>
368+
<h2>
369+
把下一段想法,
370+
<br />
371+
写成可运行的表达式。
372+
</h2>
369373
<p>从交互式教程开始,几分钟内掌握 MiraScript 的核心语法。</p>
370374
<CtaButtons />
371375
</div>

0 commit comments

Comments
 (0)