hexo-theme-stellar 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_config.yml +39 -56
- package/_data/widgets.yml +70 -0
- package/languages/en.yml +0 -1
- package/languages/zh-CN.yml +4 -5
- package/languages/zh-TW.yml +4 -5
- package/layout/_partial/main/article/read_next.ejs +16 -17
- package/layout/_partial/main/navbar/breadcrumb.ejs +1 -1
- package/layout/_partial/main/navbar/list_post.ejs +2 -2
- package/layout/_partial/main/post_list/post_card.ejs +21 -15
- package/layout/_partial/main/post_list/wiki_card.ejs +1 -1
- package/layout/_partial/sidebar/header.ejs +2 -26
- package/layout/_partial/sidebar/index.ejs +6 -6
- package/layout/_partial/sidebar/logo.ejs +3 -3
- package/layout/_partial/sidebar/menu.ejs +27 -0
- package/layout/_partial/sidebar/widgets/ghissues.ejs +46 -0
- package/layout/_partial/sidebar/widgets/ghrepo.ejs +53 -0
- package/layout/_partial/sidebar/widgets/ghuser.ejs +9 -11
- package/layout/_partial/sidebar/widgets/markdown.ejs +1 -1
- package/layout/_partial/sidebar/widgets/recent.ejs +8 -11
- package/layout/_partial/sidebar/widgets/{wiki_more.ejs → related.ejs} +7 -7
- package/layout/_partial/sidebar/widgets/tagcloud.ejs +24 -0
- package/layout/_partial/sidebar/widgets/timeline.ejs +27 -0
- package/layout/_partial/sidebar/widgets/toc.ejs +2 -6
- package/layout/index.ejs +1 -1
- package/package.json +1 -1
- package/scripts/events/lib/config.js +26 -10
- package/scripts/events/lib/doc_tree.js +3 -0
- package/scripts/helpers/related_posts.js +11 -39
- package/scripts/tags/about.js +10 -7
- package/scripts/tags/{grid.js → border.js} +4 -4
- package/scripts/tags/folders.js +55 -0
- package/scripts/tags/link.js +11 -9
- package/scripts/tags/navbar.js +1 -1
- package/scripts/tags/sites.js +1 -1
- package/scripts/tags/split.js +51 -0
- package/scripts/tags/timeline.js +4 -2
- package/source/css/_common/base.styl +5 -2
- package/source/css/_common/blur.styl +3 -0
- package/source/css/_common/device.styl +2 -0
- package/source/css/_common/highlight.styl +1 -1
- package/source/css/_common/loading.styl +16 -3
- package/source/css/_common/title.styl +0 -13
- package/source/css/_custom.styl +23 -26
- package/source/css/_defines/theme.styl +12 -12
- package/source/css/_layout/list.styl +40 -9
- package/source/css/_layout/md.styl +2 -2
- package/source/css/_layout/partial/related.styl +62 -93
- package/source/css/_layout/sidebar/footer.styl +4 -2
- package/source/css/_layout/sidebar/ghrepo.styl +36 -0
- package/source/css/_layout/sidebar/ghuser.styl +19 -1
- package/source/css/_layout/sidebar/sidebar.styl +4 -91
- package/source/css/_layout/sidebar/toc_common.styl +5 -3
- package/source/css/_layout/sidebar/widgets.styl +104 -0
- package/source/css/_layout/tag-plugins/about.styl +21 -17
- package/source/css/_layout/tag-plugins/common.styl +36 -31
- package/source/css/_layout/tag-plugins/folders.styl +62 -0
- package/source/css/_layout/tag-plugins/link.styl +41 -27
- package/source/css/_layout/tag-plugins/navbar.styl +10 -4
- package/source/css/_layout/tag-plugins/poetry.styl +1 -1
- package/source/css/_layout/tag-plugins/quot.styl +8 -7
- package/source/css/_layout/tag-plugins/split.styl +28 -0
- package/source/css/_layout/tag-plugins/timeline.styl +69 -41
- package/source/css/_plugins/comments/twikoo.styl +12 -6
- package/source/css/_plugins/comments/valine.styl +4 -0
- package/source/css/_plugins/comments/waline.styl +2 -2
- package/source/js/main.js +14 -8
- package/source/js/plugins/friends.js +3 -2
- package/source/js/plugins/ghinfo.js +14 -2
- package/source/js/plugins/linkcard.js +124 -0
- package/source/js/plugins/sites.js +4 -3
- package/source/js/plugins/timeline.js +60 -33
- package/layout/_partial/sidebar/widgets/repo_info.ejs +0 -91
- package/source/css/_layout/sidebar/repo_info.styl +0 -31
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
function layoutDiv() {
|
|
3
|
-
var el = '';
|
|
4
|
-
var repo;
|
|
5
|
-
var branch = 'main';
|
|
6
|
-
if (page.layout === 'wiki' && page.wiki) {
|
|
7
|
-
let proj = theme.wiki.projects[page.wiki];
|
|
8
|
-
if (proj && proj.repo) {
|
|
9
|
-
repo = proj.repo;
|
|
10
|
-
if (proj.branch != undefined) {
|
|
11
|
-
branch = proj.branch;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
} else {
|
|
15
|
-
// 其它的如果有设置 repo 也可以
|
|
16
|
-
repo = page.repo;
|
|
17
|
-
}
|
|
18
|
-
if (repo == undefined) {
|
|
19
|
-
return el;
|
|
20
|
-
}
|
|
21
|
-
// 布局
|
|
22
|
-
el += '<div class="widget-wrap" id="repo-info">';
|
|
23
|
-
// header
|
|
24
|
-
el += '<div class="widget-header cap dis-select">';
|
|
25
|
-
el += '<span class="name">' + __("meta.repo_info") + '</span>';
|
|
26
|
-
el += '</div>';
|
|
27
|
-
// body
|
|
28
|
-
el += '<div class="widget-body fs14">';
|
|
29
|
-
el += '<div class="items stellar-ghinfo-api" api="https://api.github.xaoxuu.com/repos/' + repo + '">';
|
|
30
|
-
var items = [];
|
|
31
|
-
// GitHub
|
|
32
|
-
items.push({
|
|
33
|
-
icon: '<svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1rem" height="1rem" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>',
|
|
34
|
-
text: 'GitHub',
|
|
35
|
-
href: 'https://github.com/' + repo
|
|
36
|
-
});
|
|
37
|
-
// Stars
|
|
38
|
-
items.push({
|
|
39
|
-
icon: '<svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1rem" height="1rem" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path></svg>',
|
|
40
|
-
text: 'Stars',
|
|
41
|
-
apiKey: 'stargazers_count',
|
|
42
|
-
href: 'https://github.com/' + repo + '/stargazers'
|
|
43
|
-
});
|
|
44
|
-
// Forks
|
|
45
|
-
items.push({
|
|
46
|
-
icon: '<svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1rem" height="1rem" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path></svg>',
|
|
47
|
-
text: 'Forks',
|
|
48
|
-
apiKey: 'forks_count',
|
|
49
|
-
href: 'https://github.com/' + repo + '/network/members'
|
|
50
|
-
});
|
|
51
|
-
// Releases
|
|
52
|
-
items.push({
|
|
53
|
-
icon: '<svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1rem" height="1rem" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>',
|
|
54
|
-
text: 'Releases',
|
|
55
|
-
href: 'https://github.com/' + repo + '/releases'
|
|
56
|
-
});
|
|
57
|
-
// Download
|
|
58
|
-
items.push({
|
|
59
|
-
icon: '<svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1rem" height="1rem" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path fill-rule="evenodd" d="M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z"></path></svg>',
|
|
60
|
-
text: 'Download Zip',
|
|
61
|
-
href: 'https://github.com/' + repo + '/archive/refs/heads/' + branch + '.zip'
|
|
62
|
-
});
|
|
63
|
-
items.forEach((item, i) => {
|
|
64
|
-
el += '<div class="line"></div>';
|
|
65
|
-
el += '<a class="item-link"';
|
|
66
|
-
el += ' title="' + item.href + '"';
|
|
67
|
-
el += ' href="' + url_for(item.href) + '"';
|
|
68
|
-
el += ' target="_blank" rel="external nofollow noopener noreferrer"';
|
|
69
|
-
el += '>';
|
|
70
|
-
// left
|
|
71
|
-
el += '<div class="left">';
|
|
72
|
-
el += '<span>' + item.text + '</span>';
|
|
73
|
-
el += '</div>';
|
|
74
|
-
// right
|
|
75
|
-
el += '<div class="right">';
|
|
76
|
-
if (item.apiKey) {
|
|
77
|
-
el += '<span type="text" id="' + item.apiKey + '"></span>';
|
|
78
|
-
}
|
|
79
|
-
if (item.icon) {
|
|
80
|
-
el += item.icon;
|
|
81
|
-
}
|
|
82
|
-
el += '</div>';
|
|
83
|
-
el += '</a>';
|
|
84
|
-
});
|
|
85
|
-
el += '</div>';
|
|
86
|
-
el += '</div>';
|
|
87
|
-
el += '</div>';
|
|
88
|
-
return el;
|
|
89
|
-
}
|
|
90
|
-
%>
|
|
91
|
-
<%- layoutDiv() %>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
.widget-wrap#repo-info
|
|
2
|
-
.widget-body
|
|
3
|
-
>.items
|
|
4
|
-
margin: 4px 0
|
|
5
|
-
border: 1px solid var(--block-border)
|
|
6
|
-
border-radius: $border-block
|
|
7
|
-
background: var(--block)
|
|
8
|
-
overflow: hidden
|
|
9
|
-
.line
|
|
10
|
-
margin: 0
|
|
11
|
-
height: 1px
|
|
12
|
-
background: var(--block-border)
|
|
13
|
-
&+.line,&:first-child,&:last-child
|
|
14
|
-
display: none
|
|
15
|
-
a.item-link
|
|
16
|
-
color: var(--text-p2)
|
|
17
|
-
font-weight: 500
|
|
18
|
-
display: flex
|
|
19
|
-
align-items: center
|
|
20
|
-
padding: 0.5rem .5rem
|
|
21
|
-
font-size: $fs-13
|
|
22
|
-
justify-content: space-between
|
|
23
|
-
svg
|
|
24
|
-
width: 1em
|
|
25
|
-
height: 1em
|
|
26
|
-
margin-left: 4px
|
|
27
|
-
div
|
|
28
|
-
display: flex
|
|
29
|
-
align-items: center
|
|
30
|
-
a:hover
|
|
31
|
-
background: var(--block-hover)
|