Skip to content

Commit

Permalink
🦄 refactor(components): move components
Browse files Browse the repository at this point in the history
move components
register global components
  • Loading branch information
bingling-sama committed Aug 5, 2023
1 parent d0d3ba8 commit b8b988a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<h4 style="text-align: center">
请点击按钮上传导出的 .zip/.txt/.log 文件,并尽量不要更改导出文件的名称。
</h4>
<img class="icon_upload" src="../docs/src/logo-upload.svg" />
<img class="icon_upload" src="../../../src/logo-upload.svg" />
<div class="file_uploader_container">
<h4 id="file_uploader_label" for="file_uploader" singleLine="false">
{{ labelMsg }}
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 6 additions & 3 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import { h } from "vue"
import Theme from "vitepress/theme"
import "./style.css"
import comment from "../../../components/comment.vue"
import Comment from "./components/comment.vue"
import Author from "./components/Author.vue"
import ReloadPrompt from "./components/ReloadPrompt.vue"
import LauncherBadge from "./globalComponents/LauncherBadge.vue"

export default {
...Theme,
Layout: () => {
return h(Theme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
"doc-after": () => h(comment),
"doc-after": () => h(Comment),
"doc-footer-before": () => h(Author),
"layout-bottom": () => h(ReloadPrompt),
})
},
// ...
enhanceApp(ctx) {
ctx.app.component("LauncherBadge", LauncherBadge)
},
}
4 changes: 2 additions & 2 deletions docs/analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ author: HRxiaohu
---

<script setup>
import analyzer from '../components/analyzer.vue'
import Analyzer from './.vitepress/theme/components/Analyzer.vue'
</script>

# 崩溃分析工具
Expand All @@ -14,7 +14,7 @@ import analyzer from '../components/analyzer.vue'

---

<analyzer />
<Analyzer />

---

Expand Down
4 changes: 0 additions & 4 deletions docs/client/vanilla.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<script setup>
import LauncherBadge from '../../components/LauncherBadge.vue'
</script>

# 原版问题

`Minecraft` 原版游戏中本身也存在许多问题,这里列出部分常见问题及解决方案。
Expand Down
23 changes: 4 additions & 19 deletions docs/contribute/contributing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<script setup>
import LauncherBadge from '../../components/LauncherBadge.vue'
</script>

# 贡献指南

## 排版标准
Expand All @@ -22,20 +18,9 @@ import LauncherBadge from '../../components/LauncherBadge.vue'

在涉及任何站外链接时,请优先添加官方链接,尽量避免不必要的第三方链接。

如果某一个解决方案为特定启动器独占功能,请使用 Vue Component 注明。示例如下:

:::warning 警告
在使用 Component 之前,请务必在 Markdown 最顶部引入它。

```vue
<script setup>
import LauncherBadge from "../components/LauncherBadge.vue"
</script>
```

:::
如果某一个解决方案为特定启动器独占功能,我们提供了全局组件来标注它。示例如下:

:::details HMCL
:::tip HMCL

### 修改渲染器 <LauncherBadge type="hmcl" text="仅 HMCL" />

Expand All @@ -45,7 +30,7 @@ import LauncherBadge from '../../components/LauncherBadge.vue'

:::

:::details BakaXL
:::tip BakaXL

### 重置核心 <LauncherBadge type="bakaxl" text="仅 BakaXL" />

Expand All @@ -55,7 +40,7 @@ import LauncherBadge from '../../components/LauncherBadge.vue'

:::

:::details
:::tip PCL2

### 修改验证服务器 <LauncherBadge type="pcl" text="仅 PCL2" />

Expand Down

0 comments on commit b8b988a

Please sign in to comment.