aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/docs/.vitepress/theme/components/HomeFooter.vue42
-rw-r--r--doc/docs/.vitepress/theme/index.ts4
-rw-r--r--doc/docs/index.md7
-rw-r--r--doc/docs/zh/index.md7
4 files changed, 51 insertions, 9 deletions
diff --git a/doc/docs/.vitepress/theme/components/HomeFooter.vue b/doc/docs/.vitepress/theme/components/HomeFooter.vue
new file mode 100644
index 0000000..5ee116c
--- /dev/null
+++ b/doc/docs/.vitepress/theme/components/HomeFooter.vue
@@ -0,0 +1,42 @@
1<script setup lang="ts">
2import { useData } from 'vitepress'
3
4const { frontmatter } = useData()
5</script>
6
7<template>
8 <footer v-if="frontmatter.footer" class="VPFooter has-sidebar">
9 <div class="container">
10 <p v-if="frontmatter.footer.message" class="message">
11 {{ frontmatter.footer.message }}
12 </p>
13 <p v-if="frontmatter.footer.copyright" class="copyright">
14 {{ frontmatter.footer.copyright }}
15 </p>
16 </div>
17 </footer>
18</template>
19
20<style scoped>
21.VPFooter {
22 position: relative;
23 z-index: var(--vp-z-index-footer);
24 border-top: 1px solid var(--vp-c-gutter);
25 padding: 32px 24px;
26 background-color: var(--vp-c-bg);
27}
28
29.container {
30 margin: 0 auto;
31 max-width: var(--vp-layout-max-width);
32 text-align: center;
33}
34
35.message,
36.copyright {
37 line-height: 24px;
38 font-size: 14px;
39 font-weight: 500;
40 color: var(--vp-c-text-2);
41}
42</style>
diff --git a/doc/docs/.vitepress/theme/index.ts b/doc/docs/.vitepress/theme/index.ts
index c4ec3d7..0ee45fe 100644
--- a/doc/docs/.vitepress/theme/index.ts
+++ b/doc/docs/.vitepress/theme/index.ts
@@ -6,6 +6,8 @@ import './custom.css'
6// @ts-ignore 6// @ts-ignore
7import CompilerModal from './components/CompilerModal.vue' 7import CompilerModal from './components/CompilerModal.vue'
8// @ts-ignore 8// @ts-ignore
9import HomeFooter from './components/HomeFooter.vue'
10// @ts-ignore
9import YueCompiler from './components/YueCompiler.vue' 11import YueCompiler from './components/YueCompiler.vue'
10// @ts-ignore 12// @ts-ignore
11import YueDisplay from './components/YueDisplay.vue' 13import YueDisplay from './components/YueDisplay.vue'
@@ -14,7 +16,7 @@ const theme: Theme = {
14 extends: DefaultTheme, 16 extends: DefaultTheme,
15 Layout: () => 17 Layout: () =>
16 h(DefaultTheme.Layout, null, { 18 h(DefaultTheme.Layout, null, {
17 'layout-bottom': () => h(CompilerModal) 19 'layout-bottom': () => [h(HomeFooter), h(CompilerModal)]
18 }), 20 }),
19 enhanceApp({ app }) { 21 enhanceApp({ app }) {
20 app.component('CompilerModal', CompilerModal) 22 app.component('CompilerModal', CompilerModal)
diff --git a/doc/docs/index.md b/doc/docs/index.md
index 6141caf..016b688 100644
--- a/doc/docs/index.md
+++ b/doc/docs/index.md
@@ -17,8 +17,7 @@ features:
17 details: Pipe, pattern matching, slicing, and destructuring without giving up Lua interop. 17 details: Pipe, pattern matching, slicing, and destructuring without giving up Lua interop.
18 - title: Rapid Iteration 18 - title: Rapid Iteration
19 details: Any feedback is welcome to help accelerate the language development and evolution! 19 details: Any feedback is welcome to help accelerate the language development and evolution!
20footer:
21 message: MIT License.
22 copyright: Copyright © 2017-2026 Li Jin. All rights reserved.
20--- 23---
21
22### License & Copyright
23
24MIT License. Copyright © 2017-2026 Li Jin. All rights reserved.
diff --git a/doc/docs/zh/index.md b/doc/docs/zh/index.md
index 5f2dc20..bd5cd6d 100644
--- a/doc/docs/zh/index.md
+++ b/doc/docs/zh/index.md
@@ -17,8 +17,7 @@ features:
17 details: 管道、模式匹配、切片与解构,同时保留 Lua 互操作性。 17 details: 管道、模式匹配、切片与解构,同时保留 Lua 互操作性。
18 - title: 快速迭代 18 - title: 快速迭代
19 details: 虚心接受用户反馈,以帮助改进和加速语言的开发和演进! 19 details: 虚心接受用户反馈,以帮助改进和加速语言的开发和演进!
20footer:
21 message: MIT 许可。
22 copyright: Copyright © 2017-2026 Li Jin. 保留所有权利。
20--- 23---
21
22### 版权和协议
23
24MIT 许可。Copyright © 2017-2026 Li Jin. 保留所有权利。