aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/docs/.vitepress/theme/index.ts36
-rw-r--r--doc/docs/de/index.md1
-rw-r--r--doc/docs/id-id/index.md1
-rw-r--r--doc/docs/index.md1
-rw-r--r--doc/docs/pt-br/index.md1
-rw-r--r--doc/docs/zh/index.md1
6 files changed, 38 insertions, 3 deletions
diff --git a/doc/docs/.vitepress/theme/index.ts b/doc/docs/.vitepress/theme/index.ts
index 70145d5..403b783 100644
--- a/doc/docs/.vitepress/theme/index.ts
+++ b/doc/docs/.vitepress/theme/index.ts
@@ -1,6 +1,7 @@
1import DefaultTheme from "vitepress/theme"; 1import DefaultTheme from "vitepress/theme";
2import type { Theme } from "vitepress"; 2import type { Theme } from "vitepress";
3import { h } from "vue"; 3import { h } from "vue";
4import { useData, withBase } from "vitepress";
4import "./custom.css"; 5import "./custom.css";
5 6
6// @ts-ignore 7// @ts-ignore
@@ -14,10 +15,39 @@ import YueDisplay from "./components/YueDisplay.vue";
14 15
15const theme: Theme = { 16const theme: Theme = {
16 extends: DefaultTheme, 17 extends: DefaultTheme,
17 Layout: () => 18 Layout: () => {
18 h(DefaultTheme.Layout, null, { 19 const { frontmatter } = useData();
20
21 return h(DefaultTheme.Layout, null, {
19 "layout-bottom": () => [h(HomeFooter), h(CompilerModal)], 22 "layout-bottom": () => [h(HomeFooter), h(CompilerModal)],
20 }), 23 "home-hero-image": () => {
24 const fm = frontmatter.value;
25 if (fm?.hero?.image?.src) {
26 const img = h("img", {
27 src: withBase(fm.hero.image.src),
28 alt: fm.hero.image.alt || "",
29 class: "VPImage",
30 style: "max-width: 100%; max-height: 100%; object-fit: contain;",
31 });
32
33 if (fm.hero.image.link) {
34 return h(
35 "a",
36 {
37 href: withBase(fm.hero.image.link),
38 class: "image-src",
39 style: "display: flex; justify-content: center; align-items: center;",
40 },
41 [img]
42 );
43 }
44
45 return h("div", { class: "image-src", style: "display: flex; justify-content: center; align-items: center;" }, [img]);
46 }
47 return null;
48 },
49 });
50 },
21 enhanceApp({ app }) { 51 enhanceApp({ app }) {
22 app.component("CompilerModal", CompilerModal); 52 app.component("CompilerModal", CompilerModal);
23 app.component("YueCompiler", YueCompiler); 53 app.component("YueCompiler", YueCompiler);
diff --git a/doc/docs/de/index.md b/doc/docs/de/index.md
index d9ebff0..bab0a91 100644
--- a/doc/docs/de/index.md
+++ b/doc/docs/de/index.md
@@ -6,6 +6,7 @@ hero:
6 image: 6 image:
7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png 7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png
8 alt: YueScript 8 alt: YueScript
9 link: /de/doc/reference/mascot
9 actions: 10 actions:
10 - theme: brand 11 - theme: brand
11 text: Schnellstart → 12 text: Schnellstart →
diff --git a/doc/docs/id-id/index.md b/doc/docs/id-id/index.md
index feef760..5e1b31b 100644
--- a/doc/docs/id-id/index.md
+++ b/doc/docs/id-id/index.md
@@ -6,6 +6,7 @@ hero:
6 image: 6 image:
7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png 7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png
8 alt: YueScript 8 alt: YueScript
9 link: /id-id/doc/reference/mascot
9 actions: 10 actions:
10 - theme: brand 11 - theme: brand
11 text: Mulai Cepat → 12 text: Mulai Cepat →
diff --git a/doc/docs/index.md b/doc/docs/index.md
index 7d34f11..e6b5cfe 100644
--- a/doc/docs/index.md
+++ b/doc/docs/index.md
@@ -6,6 +6,7 @@ hero:
6 image: 6 image:
7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png 7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png
8 alt: YueScript 8 alt: YueScript
9 link: /doc/reference/mascot
9 actions: 10 actions:
10 - theme: brand 11 - theme: brand
11 text: Quick Start → 12 text: Quick Start →
diff --git a/doc/docs/pt-br/index.md b/doc/docs/pt-br/index.md
index ce0a516..3a94715 100644
--- a/doc/docs/pt-br/index.md
+++ b/doc/docs/pt-br/index.md
@@ -6,6 +6,7 @@ hero:
6 image: 6 image:
7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png 7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png
8 alt: YueScript 8 alt: YueScript
9 link: /pt-br/doc/reference/mascot
9 actions: 10 actions:
10 - theme: brand 11 - theme: brand
11 text: Início rápido → 12 text: Início rápido →
diff --git a/doc/docs/zh/index.md b/doc/docs/zh/index.md
index 0146468..75f0eff 100644
--- a/doc/docs/zh/index.md
+++ b/doc/docs/zh/index.md
@@ -6,6 +6,7 @@ hero:
6 image: 6 image:
7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png 7 src: /image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png
8 alt: 月之脚本 8 alt: 月之脚本
9 link: /zh/doc/reference/mascot
9 actions: 10 actions:
10 - theme: brand 11 - theme: brand
11 text: 快速上手 → 12 text: 快速上手 →