✨ Add articles menu (#268)
parent
1dd3c937c8
commit
472699cd5a
|
@ -9,11 +9,8 @@ declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AppearanceToggle: typeof import('./theme/components/AppearanceToggle.vue')['default']
|
AppearanceToggle: typeof import('./theme/components/AppearanceToggle.vue')['default']
|
||||||
AppSBox: typeof import('./theme/components/AppSBox.vue')['default']
|
AppSBox: typeof import('./theme/components/AppSBox.vue')['default']
|
||||||
|
ArticlesMenu: typeof import('./theme/components/ArticlesMenu.vue')['default']
|
||||||
HomeContent: typeof import('./theme/components/HomeContent.vue')['default']
|
HomeContent: typeof import('./theme/components/HomeContent.vue')['default']
|
||||||
PageInfo: typeof import('./theme/components/PageInfo.vue')['default']
|
PageInfo: typeof import('./theme/components/PageInfo.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
|
||||||
Starport: typeof import('vue-starport')['Starport']
|
|
||||||
StarportCarrier: typeof import('vue-starport')['StarportCarrier']
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useRoute } from "vitepress";
|
||||||
|
import { data } from "./articlesmenu.data";
|
||||||
|
const route = useRoute();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<ul>
|
||||||
|
<li v-for="article in data.menu[route.path].items" :key="article.link">
|
||||||
|
<a :href="article.link">{{ article.text }}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</template>
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { sidebar } from "../../sidebar";
|
||||||
|
|
||||||
|
declare const data: {
|
||||||
|
menu: {
|
||||||
|
[key: string]: { base: string; items: { text: string; link: string }[] };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
export { data };
|
||||||
|
|
||||||
|
export default {
|
||||||
|
load() {
|
||||||
|
return { menu: sidebar };
|
||||||
|
},
|
||||||
|
};
|
|
@ -13,3 +13,7 @@ category:
|
||||||
民间有对各个大学的生活质量的问卷结果可以在 [colleges.chat](https://colleges.chat) 查阅
|
民间有对各个大学的生活质量的问卷结果可以在 [colleges.chat](https://colleges.chat) 查阅
|
||||||
|
|
||||||
投稿指南请看 [这里](../contributor-guide/campus.html)
|
投稿指南请看 [这里](../contributor-guide/campus.html)
|
||||||
|
|
||||||
|
## 大学目录
|
||||||
|
|
||||||
|
<ArticlesMenu />
|
||||||
|
|
|
@ -7,3 +7,7 @@ index: false
|
||||||
---
|
---
|
||||||
|
|
||||||
针对女性 / 性少数的暴力是一个社会性的问题。作为性少数,有必要了解一些防护的方法,以保护自己和他人的人身安全。
|
针对女性 / 性少数的暴力是一个社会性的问题。作为性少数,有必要了解一些防护的方法,以保护自己和他人的人身安全。
|
||||||
|
|
||||||
|
## 文章目录
|
||||||
|
|
||||||
|
<ArticlesMenu />
|
||||||
|
|
Loading…
Reference in New Issue