Skip to content

Commit 187367e

Browse files
authored
优化首页组件 与 header 溢光 (#16)
1 parent 568c234 commit 187367e

File tree

10 files changed

+206
-506
lines changed

10 files changed

+206
-506
lines changed

docusaurus.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ const config: Config = {
3434
// ICP 备案号
3535
ICP_LICENSE: ICP_LICENSE,
3636
// 是否为中国站点
37-
IS_CHINA_SITE: IS_CHINA_SITE
37+
IS_CHINA_SITE: IS_CHINA_SITE,
38+
description:
39+
"笨蛋开服教程为 Minecraft 玩家提供 Java 版与基岩版服务器开服指南,包含环境配置、插件使用、端口转发、常见报错解决与服务器优化技巧。适合新手与进阶服主快速掌握开服步骤,顺利搭建稳定高性能的 Minecraft 服务器。"
3840
},
3941

4042
markdown: {
@@ -424,4 +426,4 @@ const config: Config = {
424426

425427
themes: ["@docusaurus/theme-mermaid"]
426428
};
427-
export default config;
429+
export default config;

src/components/HeroBackground.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
export function HeroBackground() {
2+
return (
3+
<svg viewBox="0 0 1440 181" fill="none" xmlns="http://www.w3.org/2000/svg" className="pointer-events-none">
4+
<mask id="path-1-inside-1_414_5526" fill="white">
5+
<path d="M0 0H1440V181H0V0Z" />
6+
</mask>
7+
<path d="M0 0H1440V181H0V0Z" fill="url(#paint0_linear_414_5526)" fillOpacity="0.22" />
8+
<path d="M0 2H1440V-2H0V2Z" fill="url(#paint1_linear_414_5526)" mask="url(#path-1-inside-1_414_5526)" />
9+
<defs>
10+
<linearGradient
11+
id="paint0_linear_414_5526"
12+
x1="720"
13+
y1="0"
14+
x2="720"
15+
y2="181"
16+
gradientUnits="userSpaceOnUse"
17+
>
18+
<stop stopColor="currentColor" />
19+
<stop offset="1" stopColor="currentColor" stopOpacity="0" />
20+
</linearGradient>
21+
<linearGradient
22+
id="paint1_linear_414_5526"
23+
x1="0"
24+
y1="90.5"
25+
x2="1440"
26+
y2="90.5"
27+
gradientUnits="userSpaceOnUse"
28+
>
29+
<stop stopColor="currentColor" stopOpacity="0" />
30+
<stop offset="0.395" stopColor="currentColor" />
31+
<stop offset="1" stopColor="currentColor" stopOpacity="0" />
32+
</linearGradient>
33+
</defs>
34+
</svg>
35+
);
36+
}

src/css/components/navbar.css

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,11 @@
99
display: flex;
1010
align-items: center;
1111
background: var(--ifm-navbar-background-color);
12-
border-bottom: 1px solid var(--border);
1312
transition: all var(--transition-base);
1413
box-shadow: none !important;
1514
position: relative;
1615
}
1716

18-
/* 底部渐变线 */
19-
.navbar::after {
20-
content: "";
21-
position: absolute;
22-
bottom: 0;
23-
left: 0;
24-
right: 0;
25-
height: 1px;
26-
background: linear-gradient(90deg, transparent 0%, var(--primary-alpha-30) 50%, transparent 100%);
27-
opacity: 0;
28-
transition: opacity var(--transition-base);
29-
}
30-
31-
.navbar:hover::after {
32-
opacity: 1;
33-
}
34-
3517
/* ======================================
3618
品牌区域
3719
====================================== */

src/css/custom.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
/* ======================================
3939
工具类样式
4040
====================================== */
41-
@import "./utilities/animations.css";
4241
@import "./utilities/scrollbar.css";
4342
@import "./utilities/responsive.css";
4443
@import "./utilities/search.css";

0 commit comments

Comments
 (0)