删除:移除扩展默认主题的Copyright组件,官方已经调整了footer配置的渲染,该组件的意义也就不存在了
This commit is contained in:
@@ -14,9 +14,7 @@
|
|||||||
"vitepress": "^1.0.0-alpha.4"
|
"vitepress": "^1.0.0-alpha.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/icons-vue": "^6.1.0",
|
|
||||||
"@element-plus/icons-vue": "^2.0.6",
|
"@element-plus/icons-vue": "^2.0.6",
|
||||||
"ant-design-vue": "^3.2.10",
|
|
||||||
"element-plus": "^2.2.9",
|
"element-plus": "^2.2.9",
|
||||||
"fast-glob": "^3.2.11",
|
"fast-glob": "^3.2.11",
|
||||||
"vue": "^3.2.37"
|
"vue": "^3.2.37"
|
||||||
|
@@ -15,11 +15,10 @@ export const themeConfig: DefaultTheme.Config = {
|
|||||||
pattern: 'https://github.com/Charles7c/charles7c.github.io/edit/main/repos/:path',
|
pattern: 'https://github.com/Charles7c/charles7c.github.io/edit/main/repos/:path',
|
||||||
text: '在 GitHub 上编辑此页面'
|
text: '在 GitHub 上编辑此页面'
|
||||||
},
|
},
|
||||||
// 页脚配置, 由于vitepress官方没有此计划, 所以自行定制
|
// 页脚配置
|
||||||
footerConfig: {
|
footer: {
|
||||||
showFooter: true, // 是否显示页脚
|
|
||||||
message: `<a href="https://beian.miit.gov.cn/" target="_blank">京ICP备20003712号-2</a>`, // 备案信息
|
message: `<a href="https://beian.miit.gov.cn/" target="_blank">京ICP备20003712号-2</a>`, // 备案信息
|
||||||
copyright : `Copyright © 2019-${new Date().getFullYear()} Charles7c` // 版权信息
|
copyright: `Copyright © 2019-${new Date().getFullYear()} Charles7c` // 版权信息
|
||||||
},
|
},
|
||||||
// 全文搜索
|
// 全文搜索
|
||||||
algolia: {
|
algolia: {
|
||||||
|
@@ -1,50 +0,0 @@
|
|||||||
<template>
|
|
||||||
<footer v-if="theme.footerConfig.showFooter" class="VPFooter">
|
|
||||||
<div class="container">
|
|
||||||
<p class="message" v-html="theme.footerConfig.message"></p>
|
|
||||||
<p class="copyright" v-html="theme.footerConfig.copyright"></p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { useData } from 'vitepress'
|
|
||||||
|
|
||||||
const { theme } = useData()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.VPFooter {
|
|
||||||
position: relative;
|
|
||||||
z-index: var(--vp-z-index-footer);
|
|
||||||
border-top: 1px solid var(--vp-c-divider-light);
|
|
||||||
padding: 32px 24px;
|
|
||||||
background-color: var(--vp-c-bg);
|
|
||||||
}
|
|
||||||
.VPFooter.has-sidebar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.VPFooter {
|
|
||||||
padding: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: var(--vp-layout-max-width);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.message,
|
|
||||||
.copyright {
|
|
||||||
line-height: 24px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--vp-c-text-2);
|
|
||||||
}
|
|
||||||
.message { order: 2; }
|
|
||||||
.copyright { order: 1; }
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
@@ -1,14 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<Layout>
|
<Layout>
|
||||||
<template #layout-bottom>
|
<template #layout-bottom>
|
||||||
<Copyright />
|
|
||||||
</template>
|
</template>
|
||||||
</Layout>
|
</Layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import DefaultTheme from "vitepress/theme"
|
import DefaultTheme from "vitepress/theme"
|
||||||
import Copyright from "./Copyright.vue"
|
|
||||||
|
|
||||||
const { Layout } = DefaultTheme
|
const { Layout } = DefaultTheme
|
||||||
</script>
|
</script>
|
||||||
|
@@ -3,11 +3,6 @@ import MyLayout from "./components/MyLayout.vue"
|
|||||||
import ElementPlus from 'element-plus'
|
import ElementPlus from 'element-plus'
|
||||||
import "element-plus/dist/index.css"
|
import "element-plus/dist/index.css"
|
||||||
import * as ElIcons from '@element-plus/icons-vue'
|
import * as ElIcons from '@element-plus/icons-vue'
|
||||||
import Antd from 'ant-design-vue'
|
|
||||||
import 'ant-design-vue/dist/antd.css'
|
|
||||||
import * as AntdIcons from '@ant-design/icons-vue'
|
|
||||||
|
|
||||||
|
|
||||||
import './custom.css'
|
import './custom.css'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -20,12 +15,5 @@ export default {
|
|||||||
}
|
}
|
||||||
// 全局注册ElementPlus
|
// 全局注册ElementPlus
|
||||||
app.use(ElementPlus)
|
app.use(ElementPlus)
|
||||||
|
|
||||||
// 全局注册Ant Design of Vue的所有图标
|
|
||||||
for (const [key, antdIcon] of Object.entries(AntdIcons)) {
|
|
||||||
app.component(key, antdIcon)
|
|
||||||
}
|
|
||||||
// 全局注册Ant Design of Vue
|
|
||||||
app.use(Antd)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user