实现切换侧边栏导航之前
This commit is contained in:
		
							
								
								
									
										52
									
								
								docs/.vitepress/cache/deps/_metadata.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								docs/.vitepress/cache/deps/_metadata.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
{
 | 
			
		||||
  "hash": "b89788c1",
 | 
			
		||||
  "configHash": "623af0bf",
 | 
			
		||||
  "lockfileHash": "819230d2",
 | 
			
		||||
  "browserHash": "1838b124",
 | 
			
		||||
  "optimized": {
 | 
			
		||||
    "vue": {
 | 
			
		||||
      "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
 | 
			
		||||
      "file": "vue.js",
 | 
			
		||||
      "fileHash": "ea471cd0",
 | 
			
		||||
      "needsInterop": false
 | 
			
		||||
    },
 | 
			
		||||
    "vitepress > @vue/devtools-api": {
 | 
			
		||||
      "src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
 | 
			
		||||
      "file": "vitepress___@vue_devtools-api.js",
 | 
			
		||||
      "fileHash": "d04dba19",
 | 
			
		||||
      "needsInterop": false
 | 
			
		||||
    },
 | 
			
		||||
    "vitepress > @vueuse/core": {
 | 
			
		||||
      "src": "../../../../node_modules/@vueuse/core/index.mjs",
 | 
			
		||||
      "file": "vitepress___@vueuse_core.js",
 | 
			
		||||
      "fileHash": "5b3ac246",
 | 
			
		||||
      "needsInterop": false
 | 
			
		||||
    },
 | 
			
		||||
    "vitepress > @vueuse/integrations/useFocusTrap": {
 | 
			
		||||
      "src": "../../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
 | 
			
		||||
      "file": "vitepress___@vueuse_integrations_useFocusTrap.js",
 | 
			
		||||
      "fileHash": "88f4fd3e",
 | 
			
		||||
      "needsInterop": false
 | 
			
		||||
    },
 | 
			
		||||
    "vitepress > mark.js/src/vanilla.js": {
 | 
			
		||||
      "src": "../../../../node_modules/mark.js/src/vanilla.js",
 | 
			
		||||
      "file": "vitepress___mark__js_src_vanilla__js.js",
 | 
			
		||||
      "fileHash": "cb1d3ff6",
 | 
			
		||||
      "needsInterop": false
 | 
			
		||||
    },
 | 
			
		||||
    "vitepress > minisearch": {
 | 
			
		||||
      "src": "../../../../node_modules/minisearch/dist/es/index.js",
 | 
			
		||||
      "file": "vitepress___minisearch.js",
 | 
			
		||||
      "fileHash": "84d2c050",
 | 
			
		||||
      "needsInterop": false
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "chunks": {
 | 
			
		||||
    "chunk-P2XGSYO7": {
 | 
			
		||||
      "file": "chunk-P2XGSYO7.js"
 | 
			
		||||
    },
 | 
			
		||||
    "chunk-HVR2FF6M": {
 | 
			
		||||
      "file": "chunk-HVR2FF6M.js"
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -3,21 +3,19 @@ import { set_sidebar } from "../utils/auto_sidebar.js";
 | 
			
		||||
 | 
			
		||||
// https://vitepress.dev/reference/site-config
 | 
			
		||||
export default defineConfig({
 | 
			
		||||
  markdown: {
 | 
			
		||||
    vue: {
 | 
			
		||||
      compilerOptions: {
 | 
			
		||||
        isCustomElement: () => true // 禁止解析 ${{ }}
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  } as any,
 | 
			
		||||
  title: "devstar",
 | 
			
		||||
  head: [['link', { rel: 'icon', href: '/devstar-logo.png' }]],
 | 
			
		||||
  description: "A VitePress Site",
 | 
			
		||||
  title: "梦宁软件",
 | 
			
		||||
  head: [
 | 
			
		||||
    ['link', { rel: 'stylesheet', href: '/theme/style.css' }], // 引入CSS
 | 
			
		||||
    ['link', { rel: 'icon', href: '/mengninglogo.png' }]      // 设置favicon
 | 
			
		||||
  ],
 | 
			
		||||
  description: "梦宁软件",
 | 
			
		||||
  themeConfig: {
 | 
			
		||||
    // https://vitepress.dev/reference/default-theme-config
 | 
			
		||||
    outlineTitle: '目录',
 | 
			
		||||
    outline: [2, 6],
 | 
			
		||||
    logo: '/devstar-logo.png',
 | 
			
		||||
    logo: {
 | 
			
		||||
      src: '/mnsoftware.png',
 | 
			
		||||
    },
 | 
			
		||||
    nav: [
 | 
			
		||||
      { text: '文档', link: '/document/index' },
 | 
			
		||||
      { text: 'API', link: 'https://docs.gitea.com/zh-cn/api/1.24/' },
 | 
			
		||||
@@ -28,7 +26,6 @@ export default defineConfig({
 | 
			
		||||
      {
 | 
			
		||||
        text: 'devstar是什么',
 | 
			
		||||
        link: '/document/index',
 | 
			
		||||
        attrs: { class: 'bold-item' }
 | 
			
		||||
      } as any,
 | 
			
		||||
      {
 | 
			
		||||
        text: '安装',
 | 
			
		||||
@@ -163,6 +160,7 @@ export default defineConfig({
 | 
			
		||||
        ]
 | 
			
		||||
      } as any,
 | 
			
		||||
      {
 | 
			
		||||
        text: '贡献',
 | 
			
		||||
        collapsible: true, // 使整个组可折叠
 | 
			
		||||
        collapsed: true, // 默认展开
 | 
			
		||||
        items: [
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								docs/.vitepress/theme/Layout.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/.vitepress/theme/Layout.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
<script setup>
 | 
			
		||||
import { useData } from 'vitepress'
 | 
			
		||||
import DefaultTheme from 'vitepress/theme'
 | 
			
		||||
import Index from '../components/Index.vue' // 你的组件
 | 
			
		||||
 | 
			
		||||
const { Layout } = DefaultTheme
 | 
			
		||||
const { frontmatter } = useData()
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
  <Layout>
 | 
			
		||||
    <!-- 保留默认主题的所有插槽 -->
 | 
			
		||||
    <template #home-hero>
 | 
			
		||||
      <VPHomeHero /> <!-- 默认Hero区域 -->
 | 
			
		||||
      <Index />      <!-- 你的自定义组件 -->
 | 
			
		||||
    </template>
 | 
			
		||||
 | 
			
		||||
    <template #home-features>
 | 
			
		||||
      <VPHomeFeatures /> <!-- 默认Features区域 -->
 | 
			
		||||
    </template>
 | 
			
		||||
  </Layout>
 | 
			
		||||
</template>
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
/* .vitepress/theme/custom.css */
 | 
			
		||||
.bold-item {
 | 
			
		||||
  font-weight: 700 !important;
 | 
			
		||||
  font-size: 1em !important;
 | 
			
		||||
  /* 与其他目录项字号一致 */
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										5
									
								
								docs/.vitepress/theme/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								docs/.vitepress/theme/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
// 正确写法:继承默认主题
 | 
			
		||||
import DefaultTheme from 'vitepress/theme'
 | 
			
		||||
import './style.css' // 可选:你的自定义样式
 | 
			
		||||
 | 
			
		||||
export default DefaultTheme // ✅ 必须导出 default
 | 
			
		||||
							
								
								
									
										40
									
								
								docs/.vitepress/theme/style.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								docs/.vitepress/theme/style.css
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
			
		||||
/* 强制覆盖主题默认的Logo尺寸 */
 | 
			
		||||
.VPImage.logo {
 | 
			
		||||
  height: 150px !important;
 | 
			
		||||
  /* 必须用 !important 覆盖主题的 !important */
 | 
			
		||||
  width: 200px !important;
 | 
			
		||||
  /* 固定宽度,防止变形 */
 | 
			
		||||
  /* margin-left: 100px !important; */
 | 
			
		||||
  margin-right: -50px !important;
 | 
			
		||||
  margin-left: -40px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.VPNavBar .title {
 | 
			
		||||
  margin-right: 20px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.VPHero .text {
 | 
			
		||||
  font-size: 50px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* 移除掉目录之间的分割线 */
 | 
			
		||||
.group {
 | 
			
		||||
  border-top: 0 !important;
 | 
			
		||||
 | 
			
		||||
  /* padding-bottom: 0 !important; */
 | 
			
		||||
  .items {
 | 
			
		||||
    font-size: 20px !important;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.group .items {
 | 
			
		||||
  font-size: 16px !important;
 | 
			
		||||
  color: #3c3c43 !important;
 | 
			
		||||
  font-weight: 700px !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* .VPHero .image-container img {
 | 
			
		||||
  width: 1000px !important;
 | 
			
		||||
  height: 300px !important;
 | 
			
		||||
} */
 | 
			
		||||
		Reference in New Issue
	
	Block a user