删除:移除扩展默认主题的Copyright组件,官方已经调整了footer配置的渲染,该组件的意义也就不存在了
This commit is contained in:
@@ -15,11 +15,10 @@ export const themeConfig: DefaultTheme.Config = {
|
||||
pattern: 'https://github.com/Charles7c/charles7c.github.io/edit/main/repos/:path',
|
||||
text: '在 GitHub 上编辑此页面'
|
||||
},
|
||||
// 页脚配置, 由于vitepress官方没有此计划, 所以自行定制
|
||||
footerConfig: {
|
||||
showFooter: true, // 是否显示页脚
|
||||
// 页脚配置
|
||||
footer: {
|
||||
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: {
|
||||
|
@@ -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>
|
||||
<Layout>
|
||||
<template #layout-bottom>
|
||||
<Copyright />
|
||||
|
||||
</template>
|
||||
</Layout>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import DefaultTheme from "vitepress/theme"
|
||||
import Copyright from "./Copyright.vue"
|
||||
|
||||
const { Layout } = DefaultTheme
|
||||
</script>
|
||||
|
@@ -3,11 +3,6 @@ import MyLayout from "./components/MyLayout.vue"
|
||||
import ElementPlus from 'element-plus'
|
||||
import "element-plus/dist/index.css"
|
||||
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'
|
||||
|
||||
export default {
|
||||
@@ -20,12 +15,5 @@ export default {
|
||||
}
|
||||
// 全局注册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