Skip to content

Commit 381b489

Browse files
committed
feat: leftbar config
1 parent f42a740 commit 381b489

File tree

3 files changed

+53
-38
lines changed

3 files changed

+53
-38
lines changed

config.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,53 @@ export default {
33
repository: 'blog', // 记录 issue 的仓库名
44
accessToken: 'MGNhMTQ3YTRlMGQ0NGFkM2JjZTdmMTI5MTQzYWFkY2ZjMWQ0NmMyNg==', // 经过 base64 加密后的 GitHub Token
55
blogName: 'ISSUE BLOG', // 给你的博客取个名字
6+
/**
7+
* 定制左侧菜单链接部分
8+
* 格式:
9+
* {
10+
* title: '', // 名称
11+
* subTile: '', // 描述
12+
* icon: '', // 图标名称,上这里查找你需要的图标名称 https://fontawesome.com ,如果需要自定义图标的参考示例的最后一个配置,并将图标文件放到 /src/statics 目录中
13+
* url: '', // 链接
14+
* }
15+
* 示例如下:
16+
*/
17+
links: [
18+
{
19+
title: 'RSS',
20+
subTile: 'rsshub.app/github/issue/ttop5/blog',
21+
icon: 'fas fa-rss-square',
22+
url: 'https://rsshub.app/github/issue/ttop5/blog',
23+
},
24+
{
25+
title: 'Email',
26+
subTile: 'ttop5@qq.com',
27+
icon: 'fas fa-envelope',
28+
url: 'mailto:ttop5@qq.com',
29+
},
30+
{
31+
title: 'Home',
32+
subTile: 'ttop5.net',
33+
icon: 'fas fa-home',
34+
url: 'https://ttop5.net',
35+
},
36+
{
37+
title: 'GitHub',
38+
subTile: 'github.com/ttop5',
39+
icon: 'fab fa-github',
40+
url: 'https://github.com/ttop5',
41+
},
42+
{
43+
title: 'Steam',
44+
subTile: 'steamcommunity.com/id/ttop5',
45+
icon: 'fab fa-steam',
46+
url: 'https://steamcommunity.com/id/ttop5',
47+
},
48+
{
49+
title: 'DouBan',
50+
subTile: 'douban.com/people/ttop5',
51+
icon: 'img:statics/douban.svg',
52+
url: 'https://www.douban.com/people/ttop5',
53+
},
54+
],
655
};

src/layouts/MyLayout.vue

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -96,44 +96,7 @@ export default {
9696
return {
9797
leftDrawerOpen: this.$q.platform.is.desktop,
9898
user: {},
99-
links: [
100-
{
101-
title: 'RSS',
102-
subTile: 'rsshub.app/github/issue/ttop5/blog',
103-
icon: 'fas fa-rss-square',
104-
url: 'https://rsshub.app/github/issue/ttop5/blog',
105-
},
106-
{
107-
title: 'Email',
108-
subTile: 'ttop5@qq.com',
109-
icon: 'fas fa-envelope',
110-
url: 'mailto:ttop5@qq.com',
111-
},
112-
{
113-
title: 'Home',
114-
subTile: 'ttop5.net',
115-
icon: 'fas fa-home',
116-
url: 'https://ttop5.net',
117-
},
118-
{
119-
title: 'GitHub',
120-
subTile: 'github.com/ttop5',
121-
icon: 'fab fa-github',
122-
url: 'https://github.com/ttop5',
123-
},
124-
{
125-
title: 'Steam',
126-
subTile: 'steamcommunity.com/id/ttop5',
127-
icon: 'fab fa-steam',
128-
url: 'https://steamcommunity.com/id/ttop5',
129-
},
130-
{
131-
title: 'DouBan',
132-
subTile: 'douban.com/people/ttop5',
133-
icon: 'img:statics/douban.svg',
134-
url: 'https://www.douban.com/people/ttop5',
135-
},
136-
],
99+
links: this.$store.getters.links,
137100
year: date.formatDate(new Date(), 'YYYY'),
138101
};
139102
},

src/store/account.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const getters = {
1515
blogName(s) {
1616
return s.blogName;
1717
},
18+
links(s) {
19+
return s.links;
20+
},
1821
};
1922

2023
const mutations = {};

0 commit comments

Comments
 (0)