Skip to content

Commit fadf7ae

Browse files
author
142vip.cn
committed
feat: 优化页面footer显示形式,展示版本信息
1 parent 7941f4d commit fadf7ae

File tree

6 files changed

+58
-24
lines changed

6 files changed

+58
-24
lines changed

docs/.vuepress/config/constant.config.ts

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,44 @@
1-
export const FOOTER_HTML_INFO=`<a href="https://tongji.baidu.com/web/welcome/login" target="_blank">百度统计</a> |
2-
Copyrights ©2015-${new Date().getFullYear()} 妍荣姑娘网络工作室
3-
All Rights Reserved <a href="https://github.com/142vip" target="_blank">142vip</a> `
1+
import {name, version, authorInfo} from "../../../package.json"
2+
3+
export const FOOTER_HTML_INFO=`
4+
<div>
5+
All Rights Reserved
6+
<a href="https://github.com/142vip" target="_blank">142vip</a> Repo.
7+
${name}@v${version}
8+
&nbsp;&nbsp;
9+
</div>
10+
<div style="margin-top: 5px">
11+
<a href="https://tongji.baidu.com/web/welcome/login" target="_blank">百度统计</a>
12+
<span style="margin: 0 5px;">|</span>
13+
<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">鄂ICP备17025193号-1 </a>
14+
<!-- <span style="margin: 0 5px;">|</span>-->
15+
<!-- <a href="https://theme-hope.vuejs.press/" target="_blank">Vuepress</a> -->
16+
</div>
17+
`
418

519
// 代码组织:<a href="https://github.com/142vip" target="_blank">142VIP</a>
620
// Theme By <a href="https://theme-hope.vuejs.press/" target="_blank">vuepress-theme-hope</a> |
21+
22+
/**
23+
* 版权信息
24+
*/
25+
export const COPYRIGHT = `
26+
Copyrights © 2015-${new Date().getFullYear()} ${authorInfo.name}
27+
`
28+
29+
/**
30+
* 作者信息
31+
*/
32+
export const AUTHOR_INFO = {
33+
name: authorInfo.name,
34+
email: authorInfo.email,
35+
url: authorInfo.homePages
36+
}
37+
38+
39+
/**
40+
* 状态码404时,页面提示语
41+
*/
742
export const NotFoundMsgList = [
843
"徒留我孤单在湖面成双。",
944
"就让回忆永远停在那里。",

docs/.vuepress/config/theme.config.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import navbar from "./navbar";
22
import sidebar from "./sidebar";
3-
import {FOOTER_HTML_INFO} from "./constant.config";
3+
import {AUTHOR_INFO, COPYRIGHT, FOOTER_HTML_INFO} from "./constant.config";
44
import {hopeTheme} from "vuepress-theme-hope";
55
import {langConfig} from "./lang.config";
66

@@ -19,11 +19,7 @@ export default {
1919
// pure: true,
2020
print: false, // 打印按钮
2121
hostname: 'https://142vip.cn',
22-
author: {
23-
name: '微信公众号:储凡',
24-
email: 'fairy_vip@2925.com',
25-
url: 'https://www.142vip.cn'
26-
},
22+
author: AUTHOR_INFO,
2723
favicon: "/favicon.ico",
2824
// logo: "/assets/408_logo.png",
2925
navbar: navbar,
@@ -41,8 +37,6 @@ export default {
4137
docsDir: "docs",
4238
docsBranch: "master",
4339
repo: "https://github.com/142vip/JavaScriptCollection.git",
44-
// logoDark: "/assets/408_logo.png",
45-
// logo: "/assets/408_logo.png",
4640

4741
// 博客配置
4842
// blog: {
@@ -60,15 +54,10 @@ export default {
6054
// 设置页脚
6155
displayFooter: true,
6256
footer: FOOTER_HTML_INFO,
63-
// copyright: false,
57+
copyright: COPYRIGHT,
6458

6559
// 主题色选择器
66-
themeColor: {
67-
blue: "#2196f3",
68-
red: "#f26d6d",
69-
green: "#3eaf7c",
70-
orange: "#fb9b5f",
71-
},
60+
themeColor: true,
7261

7362
plugins: {
7463
// comment:{
@@ -77,7 +66,7 @@ export default {
7766
// site:'JavaScriptCollection',
7867
// },
7968
readingTime: {
80-
wordPerMinute: 200
69+
wordPerMinute: 100
8170
},
8271
copyright: false,
8372
// 开启博客功能

docs/.vuepress/styles/config.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// 参考:https://theme-hope.vuejs.press/zh/guide/interface/code-theme.htm
22

33
// 浅色主题
4-
$code-light-them: "atom-dark";
4+
$code-light-them: "coldark-cold";
55

66
// 深色主题
7-
//$code-dark-theme: "atom-dark";
7+
$code-dark-theme: "atom-dark";
8+
9+
10+
// 主题色
11+
//$theme-colors: #2196f3, #f26d6d, #3eaf7c, #fb9b5f;

docs/.vuepress/styles/palette.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 主题色
2-
$theme-color: #2196f3;
2+
$theme-color: #5aa9ad;
33
//$sidebar-width: 20rem;
44
//$sidebar-mobile-width: 16rem;
55
//$content-width: 75rem;

docs/manuscripts/server-end/base/base.sidebar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const BaseSidebar=[
1+
export const BaseSidebar = [
22
{
33
text: 'RestFul风格',
44
link: 'restFul.md'
@@ -19,4 +19,4 @@ export const BaseSidebar=[
1919
text: '远程调用',
2020
link: '远程调用.md'
2121
}
22-
]
22+
]

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"name": "JavaScriptCollection",
33
"description": "一本有趣的JavaScript合集",
44
"version": "0.0.2-alpha.7",
5+
"authorInfo": {
6+
"name": "微信公众号:储凡",
7+
"email": "fairy_408@2925.com",
8+
"url": "https://github.com/142vip",
9+
"homePage": "https://www.142vip.cn"
10+
},
511
"packageManager": "pnpm@8.9.2",
612
"engines": {
713
"node": "^18.x",

0 commit comments

Comments
 (0)