hexo-theme-stellar 1.22.0 → 1.23.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 +18 -10
- package/_data/widgets.yml +3 -0
- package/languages/en.yml +1 -0
- package/languages/zh-CN.yml +1 -0
- package/languages/zh-TW.yml +1 -0
- package/layout/_partial/head.ejs +29 -19
- package/layout/_partial/main/footer.ejs +1 -1
- package/layout/_partial/main/navbar/author_banner.ejs +31 -0
- package/layout/_partial/main/navbar/breadcrumb.ejs +20 -4
- package/layout/_partial/main/post_list/post_card.ejs +13 -1
- package/layout/_partial/plugins/comments/giscus/script.ejs +0 -1
- package/layout/_partial/plugins/parser/head.ejs +3 -0
- package/layout/_partial/plugins/parser/katex/head.ejs +3 -0
- package/layout/_partial/plugins/parser/katex/script.ejs +4 -0
- package/layout/_partial/plugins/parser/mathjax/script.ejs +20 -0
- package/layout/_partial/plugins/parser/mermaid/script.ejs +29 -0
- package/layout/_partial/plugins/parser/script.ejs +9 -0
- package/layout/_partial/scripts/index.ejs +19 -5
- package/layout/_partial/sidebar/index.ejs +1 -1
- package/layout/_partial/widgets/toc.ejs +1 -1
- package/layout/archive.ejs +54 -37
- package/layout/page.ejs +1 -4
- package/layout/post.ejs +1 -7
- package/layout/wiki.ejs +1 -4
- package/package.json +1 -1
- package/scripts/events/index.js +2 -0
- package/scripts/events/lib/authors.js +21 -0
- package/scripts/events/lib/doc_tree.js +1 -2
- package/scripts/events/lib/links.js +17 -0
- package/scripts/filters/index.js +0 -13
- package/scripts/generators/author.js +22 -0
- package/scripts/tags/index.js +2 -0
- package/scripts/tags/lib/albums.js +47 -0
- package/scripts/tags/lib/copy.js +11 -13
- package/scripts/tags/lib/friends.js +13 -24
- package/scripts/tags/lib/gallery.js +6 -5
- package/scripts/tags/lib/posters.js +47 -0
- package/scripts/tags/lib/sites.js +15 -24
- package/scripts/tags/lib/swiper.js +1 -1
- package/source/css/_common/toast.styl +25 -5
- package/source/css/_custom.styl +2 -1
- package/source/css/_defines/func.styl +11 -0
- package/source/css/_defines/theme.styl +2 -2
- package/source/css/_layout/list.styl +6 -2
- package/source/css/_layout/main.styl +4 -0
- package/source/css/_layout/pages/archives.styl +7 -3
- package/source/css/_layout/partial/bread-nav.styl +3 -5
- package/source/css/_layout/partial/navbar.styl +5 -5
- package/source/css/_layout/tag-plugins/banner.styl +22 -8
- package/source/css/_layout/tag-plugins/copy.styl +16 -13
- package/source/css/_layout/tag-plugins/friends.styl +7 -37
- package/source/css/_layout/tag-plugins/gallery.styl +32 -15
- package/source/css/_layout/tag-plugins/grid.styl +1 -4
- package/source/css/_layout/tag-plugins/link.styl +1 -4
- package/source/css/_layout/tag-plugins/sites.styl +11 -39
- package/source/css/_layout/tag-plugins/tabs.styl +2 -0
- package/source/css/_layout/widgets/ghrepo.styl +1 -4
- package/source/css/_layout/widgets/toc_common.styl +22 -8
- package/source/css/_plugins/copycode.styl +2 -1
- package/source/css/_plugins/fancybox.styl +1 -4
- package/source/css/_plugins/index.styl +1 -1
- package/source/css/_plugins/lazyload.styl +4 -4
- package/source/js/main.js +6 -8
- package/source/js/plugins/copycode.js +1 -1
- package/source/js/plugins/friends.js +11 -11
- package/source/js/plugins/sites.js +13 -14
- package/_data/links.yml +0 -7
- package/layout/mathjax.ejs +0 -29
- package/layout/mermaid.ejs +0 -32
|
@@ -59,7 +59,7 @@ module.exports = ctx => {
|
|
|
59
59
|
const wiki_pages = pages.filter(p => (p.layout === 'wiki')).map(p => new WikiPage(p))
|
|
60
60
|
const wiki_list = Object.keys(wiki.tree)
|
|
61
61
|
// 上架的项目列表
|
|
62
|
-
wiki.shelf = ctx.locals.get('data').wiki
|
|
62
|
+
wiki.shelf = ctx.locals.get('data').wiki || []
|
|
63
63
|
|
|
64
64
|
// 数据整合:项目标签
|
|
65
65
|
var all_tag_name = []
|
|
@@ -202,7 +202,6 @@ module.exports = ctx => {
|
|
|
202
202
|
|
|
203
203
|
wiki.all_tags = all_tags
|
|
204
204
|
wiki.all_pages = wiki_pages
|
|
205
|
-
wiki.shelf = ctx.locals.get('data').wiki
|
|
206
205
|
ctx.theme.config.wiki = wiki
|
|
207
206
|
|
|
208
207
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* links.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
module.exports = ctx => {
|
|
8
|
+
var allLinks = {}
|
|
9
|
+
const data = ctx.locals.get('data')
|
|
10
|
+
for (let key of Object.keys(data)) {
|
|
11
|
+
if (key.startsWith('links/')) {
|
|
12
|
+
let newKey = key.replace('links/', '')
|
|
13
|
+
allLinks[newKey] = data[key]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
ctx.theme.config.links = allLinks
|
|
17
|
+
}
|
package/scripts/filters/index.js
CHANGED
|
@@ -2,16 +2,3 @@
|
|
|
2
2
|
|
|
3
3
|
hexo.extend.filter.register('after_render:html', require('./lib/img_lazyload').processSite);
|
|
4
4
|
hexo.extend.filter.register('after_render:html', require('./lib/img_onerror').processSite);
|
|
5
|
-
|
|
6
|
-
function change_image(data) {
|
|
7
|
-
if (this.theme.config.tag_plugins.image.parse_markdown) {
|
|
8
|
-
data.content = data.content.replace(
|
|
9
|
-
/!\[(.*?)\]\((.*?)\s*(?:"(.*?)")?\)/g,
|
|
10
|
-
'{% image $2 $3 %}'
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
return data;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
hexo.extend.filter.register('before_post_render', change_image, 9);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* author v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
hexo.extend.generator.register('author', function (locals) {
|
|
6
|
+
const { authors } = hexo.theme.config
|
|
7
|
+
var pages = []
|
|
8
|
+
for (let key of Object.keys(authors)) {
|
|
9
|
+
const author = authors[key]
|
|
10
|
+
if (author.hidden) {
|
|
11
|
+
continue
|
|
12
|
+
}
|
|
13
|
+
pages.push({
|
|
14
|
+
path: author.path,
|
|
15
|
+
layout: ['archive'],
|
|
16
|
+
data: {
|
|
17
|
+
'author': author
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
return pages
|
|
22
|
+
});
|
package/scripts/tags/index.js
CHANGED
|
@@ -16,6 +16,8 @@ hexo.extend.tag.register('banner', require('./lib/banner')(hexo), true)
|
|
|
16
16
|
// data
|
|
17
17
|
hexo.extend.tag.register('users', require('./lib/friends')(hexo))
|
|
18
18
|
hexo.extend.tag.register('friends', require('./lib/friends')(hexo))
|
|
19
|
+
hexo.extend.tag.register('albums', require('./lib/albums')(hexo))
|
|
20
|
+
hexo.extend.tag.register('posters', require('./lib/posters')(hexo))
|
|
19
21
|
hexo.extend.tag.register('sites', require('./lib/sites')(hexo))
|
|
20
22
|
hexo.extend.tag.register('ghcard', require('./lib/ghcard')(hexo))
|
|
21
23
|
hexo.extend.tag.register('toc', require('./lib/toc')(hexo))
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* albums.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* {% albums [group] [repo:owner/repo] [api:http] [size:s/m/l/xl/mix] %}
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict'
|
|
9
|
+
|
|
10
|
+
module.exports = ctx => function(args) {
|
|
11
|
+
var args = ctx.args.map(args, ['repo', 'api', 'size'], ['group'])
|
|
12
|
+
if (args.size == null) {
|
|
13
|
+
args.size = 's'
|
|
14
|
+
}
|
|
15
|
+
var api
|
|
16
|
+
if (args.api) {
|
|
17
|
+
api = args.api
|
|
18
|
+
} else if (args.repo) {
|
|
19
|
+
api = 'https://api.vlts.cc/output_data/v2/' + args.repo
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var el = ''
|
|
23
|
+
el += `<div class="tag-plugin albums-wrap">`
|
|
24
|
+
if (api) {
|
|
25
|
+
el += `<div class="stellar-friends-api" api="${api}"><div class="tag-plugin gallery grid-box" layout="grid" ratio="square" ${ctx.args.joinTags(args, ['size']).join(' ')}></div></div>`
|
|
26
|
+
} else if (args.group) {
|
|
27
|
+
const links = ctx.theme.config.links || {}
|
|
28
|
+
el += `<div class="tag-plugin gallery grid-box" layout="grid" ratio="square" ${ctx.args.joinTags(args, ['size']).join(' ')}>`
|
|
29
|
+
for (let item of (links[args.group] || [])) {
|
|
30
|
+
if (item?.url) {
|
|
31
|
+
el += `<div class="grid-cell album-card">`
|
|
32
|
+
el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
|
|
33
|
+
el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.cover}" onerror="javascript:this.removeAttribute("data-src");this.src="${ctx.theme.config.default.cover}";"/>`
|
|
34
|
+
el += `<div class="image-meta">`
|
|
35
|
+
if (item.title) {
|
|
36
|
+
el += `<span class="image-caption">${item.title}</span>`
|
|
37
|
+
}
|
|
38
|
+
el += `</div>`
|
|
39
|
+
el += `</a>`
|
|
40
|
+
el += `</div>`
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
el += `</div>`
|
|
44
|
+
}
|
|
45
|
+
el += `</div>`
|
|
46
|
+
return el
|
|
47
|
+
}
|
package/scripts/tags/lib/copy.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
var copy_index = 0
|
|
13
13
|
|
|
14
14
|
module.exports = ctx => function(args) {
|
|
15
|
-
args = ctx.args.map(args, ['
|
|
15
|
+
args = ctx.args.map(args, ['git', 'prefix'], ['text'])
|
|
16
16
|
if (args == undefined || args.text == undefined) {
|
|
17
17
|
return ''
|
|
18
18
|
}
|
|
@@ -31,19 +31,17 @@ module.exports = ctx => function(args) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
const copy_id = 'copy_' + ++copy_index
|
|
34
|
+
const toast = ctx.theme.config.tag_plugins.copy.toast
|
|
34
35
|
|
|
35
|
-
var el =
|
|
36
|
-
el +=
|
|
37
|
-
if (args.
|
|
38
|
-
el +=
|
|
36
|
+
var el = ``
|
|
37
|
+
el += `<div class="tag-plugin copy">`
|
|
38
|
+
if (args.prefix?.length > 0) {
|
|
39
|
+
el += `<span>${args.prefix}</span>`
|
|
39
40
|
}
|
|
40
|
-
el +=
|
|
41
|
-
el +=
|
|
42
|
-
el +=
|
|
43
|
-
el +=
|
|
44
|
-
el +=
|
|
45
|
-
el += '</button>'
|
|
46
|
-
|
|
47
|
-
el += '</div>'
|
|
41
|
+
el += `<input class="copy-area" id="${copy_id}" value="${text}">`
|
|
42
|
+
el += `<button class="copy-btn" onclick="util.copy("${copy_id}","${toast}")">`
|
|
43
|
+
el += `<svg class="icon copy-btn" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z"></path></svg>`
|
|
44
|
+
el += `</button>`
|
|
45
|
+
el += `</div>`
|
|
48
46
|
return el
|
|
49
47
|
}
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
module.exports = ctx => function(args) {
|
|
11
11
|
args = ctx.args.map(args, ['repo', 'api'], ['group'])
|
|
12
|
-
var links = ctx.locals.get('data').links
|
|
13
|
-
if (links == undefined) {
|
|
14
|
-
links = {}
|
|
15
|
-
}
|
|
16
12
|
var api
|
|
17
13
|
if (args.api) {
|
|
18
14
|
api = args.api
|
|
@@ -22,29 +18,22 @@ module.exports = ctx => function(args) {
|
|
|
22
18
|
|
|
23
19
|
var el = '<div class="tag-plugin users-wrap">'
|
|
24
20
|
if (api) {
|
|
25
|
-
el +=
|
|
26
|
-
el += ' api="' + api + '"'
|
|
27
|
-
el += '>'
|
|
28
|
-
el += '<div class="group-body"></div>'
|
|
29
|
-
el += '</div>'
|
|
21
|
+
el += `<div class="stellar-friends-api" ${ctx.args.joinTags(args, ['size']).join(' ')} api="${api}"><div class="grid-box"></div></div>`
|
|
30
22
|
} else if (args.group) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
const links = ctx.theme.config.links || {}
|
|
24
|
+
el += '<div class="grid-box">'
|
|
25
|
+
for (let item of (links[args.group] || [])) {
|
|
26
|
+
if (item?.url && item?.title) {
|
|
27
|
+
el += `<div class="grid-cell user-card">`
|
|
28
|
+
el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
|
|
29
|
+
el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.avatar}" onerror="javascript:this.removeAttribute("data-src");this.src="${ctx.theme.config.default.avatar}";"/>`
|
|
30
|
+
el += `<div class="name">`
|
|
31
|
+
el += `<span>${item.title}</span>`
|
|
32
|
+
el += `</div>`
|
|
33
|
+
el += `</a>`
|
|
34
|
+
el += `</div>`
|
|
41
35
|
}
|
|
42
36
|
}
|
|
43
|
-
el += '<div class="group-body">'
|
|
44
|
-
const items = links[args.group] || []
|
|
45
|
-
items.forEach((item, i) => {
|
|
46
|
-
el += cell(item)
|
|
47
|
-
})
|
|
48
37
|
el += '</div>'
|
|
49
38
|
}
|
|
50
39
|
|
|
@@ -33,9 +33,6 @@ function img(src, alt) {
|
|
|
33
33
|
|
|
34
34
|
module.exports = ctx => function(args, content) {
|
|
35
35
|
args = ctx.args.map(args, ['layout', 'size', 'ratio'])
|
|
36
|
-
if (args.layout == null) {
|
|
37
|
-
args.layout = ctx.theme.config.tag_plugins.gallery.layout
|
|
38
|
-
}
|
|
39
36
|
if (args.size == null) {
|
|
40
37
|
args.size = ctx.theme.config.tag_plugins.gallery.size
|
|
41
38
|
}
|
|
@@ -43,14 +40,18 @@ module.exports = ctx => function(args, content) {
|
|
|
43
40
|
args.ratio = ctx.theme.config.tag_plugins.gallery.ratio
|
|
44
41
|
}
|
|
45
42
|
var el = ''
|
|
46
|
-
|
|
43
|
+
var layoutType = 'grid'
|
|
44
|
+
if (args.layout == 'flow') {
|
|
45
|
+
layoutType = 'flow'
|
|
46
|
+
}
|
|
47
|
+
el += `<div class="tag-plugin gallery fancybox ${layoutType}-box" ${ctx.args.joinTags(args, ['size', 'ratio']).join(' ')}>`
|
|
47
48
|
const img_mds = content.split('\n').filter(item => item.trim().length > 0)
|
|
48
49
|
for (let md of img_mds) {
|
|
49
50
|
const matches = md.match(/\!\[(.*?)\]\((.*?)\)/i)
|
|
50
51
|
if (matches?.length > 2) {
|
|
51
52
|
let alt = matches[1]
|
|
52
53
|
let src = matches[2]
|
|
53
|
-
el += `<div class="cell">${img(src, alt)}</div>`
|
|
54
|
+
el += `<div class="${layoutType}-cell">${img(src, alt)}</div>`
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
el += `</div>`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* posters.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
3
|
+
* 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
|
|
4
|
+
*
|
|
5
|
+
* {% posters [group] [repo:owner/repo] [api:http] [size:s/m/l/xl/mix] %}
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict'
|
|
9
|
+
|
|
10
|
+
module.exports = ctx => function(args) {
|
|
11
|
+
var args = ctx.args.map(args, ['repo', 'api', 'size'], ['group'])
|
|
12
|
+
if (args.size == null) {
|
|
13
|
+
args.size = 'm'
|
|
14
|
+
}
|
|
15
|
+
var api
|
|
16
|
+
if (args.api) {
|
|
17
|
+
api = args.api
|
|
18
|
+
} else if (args.repo) {
|
|
19
|
+
api = 'https://api.vlts.cc/output_data/v2/' + args.repo
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var el = ''
|
|
23
|
+
el += `<div class="tag-plugin posters-wrap">`
|
|
24
|
+
if (api) {
|
|
25
|
+
el += `<div class="stellar-friends-api" api="${api}"><div class="tag-plugin gallery grid-box" layout="grid" ratio="square" ${ctx.args.joinTags(args, ['size']).join(' ')}></div></div>`
|
|
26
|
+
} else if (args.group) {
|
|
27
|
+
const links = ctx.theme.config.links || {}
|
|
28
|
+
el += `<div class="tag-plugin gallery grid-box" layout="grid" ratio="portrait" ${ctx.args.joinTags(args, ['size']).join(' ')}>`
|
|
29
|
+
for (let item of (links[args.group] || [])) {
|
|
30
|
+
if (item?.url) {
|
|
31
|
+
el += `<div class="grid-cell poster-card">`
|
|
32
|
+
el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
|
|
33
|
+
el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.cover}" onerror="javascript:this.removeAttribute("data-src");this.src="${ctx.theme.config.default.cover}";"/>`
|
|
34
|
+
el += `<div class="image-meta">`
|
|
35
|
+
if (item.title) {
|
|
36
|
+
el += `<span class="image-caption">${item.title}</span>`
|
|
37
|
+
}
|
|
38
|
+
el += `</div>`
|
|
39
|
+
el += `</a>`
|
|
40
|
+
el += `</div>`
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
el += `</div>`
|
|
44
|
+
}
|
|
45
|
+
el += `</div>`
|
|
46
|
+
return el
|
|
47
|
+
}
|
|
@@ -9,10 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
module.exports = ctx => function(args) {
|
|
11
11
|
args = ctx.args.map(args, ['repo', 'api'], ['group'])
|
|
12
|
-
var links = ctx.locals.get('data').links
|
|
13
|
-
if (links == undefined) {
|
|
14
|
-
links = {}
|
|
15
|
-
}
|
|
16
12
|
var api
|
|
17
13
|
if (args.api) {
|
|
18
14
|
api = args.api
|
|
@@ -25,30 +21,25 @@ module.exports = ctx => function(args) {
|
|
|
25
21
|
el += '<div class="stellar-sites-api"'
|
|
26
22
|
el += ' api="' + api + '"'
|
|
27
23
|
el += '>'
|
|
28
|
-
el += '<div class="
|
|
24
|
+
el += '<div class="grid-box"></div>'
|
|
29
25
|
el += '</div>'
|
|
30
26
|
} else if (args.group) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
const links = ctx.theme.config.links || {}
|
|
28
|
+
el += '<div class="grid-box">'
|
|
29
|
+
for (let item of (links[args.group] || [])) {
|
|
30
|
+
if (item?.url && item?.title) {
|
|
31
|
+
el += `<div class="grid-cell site-card">`
|
|
32
|
+
el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
|
|
33
|
+
el += `<img src="${item.cover || item.screenshot || ('https://api.vlts.cc/screenshot?url=' + item.url + '&width=1280&height=720')}" onerror="javascript:this.removeAttribute("data-src");this.src="${ctx.theme.config.default.cover}";"/>`
|
|
34
|
+
el += `<div class="info">`
|
|
35
|
+
el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.link}" onerror="javascript:this.removeAttribute("data-src");this.src="${item.icon || item.avatar || ctx.theme.config.default.link}";"/>`
|
|
36
|
+
el += `<span class="title">${item.title}</span>`
|
|
37
|
+
el += `<span class="desc">${item.description || item.url}</span>`
|
|
38
|
+
el += `</div>`
|
|
39
|
+
el += `</a>`
|
|
40
|
+
el += `</div>`
|
|
45
41
|
}
|
|
46
42
|
}
|
|
47
|
-
el += '<div class="group-body">'
|
|
48
|
-
const items = links[args.group] || []
|
|
49
|
-
items.forEach((item, i) => {
|
|
50
|
-
el += cell(item)
|
|
51
|
-
})
|
|
52
43
|
el += '</div>'
|
|
53
44
|
}
|
|
54
45
|
|
|
@@ -22,7 +22,7 @@ module.exports = ctx => function(args, content) {
|
|
|
22
22
|
})
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
el += '<div class="tag-plugin swiper" id="swiper-api"'
|
|
25
|
+
el += '<div class="tag-plugin swiper fancybox" id="swiper-api"'
|
|
26
26
|
el += ' ' + ctx.args.joinTags(args, ['width', 'effect']).join(' ')
|
|
27
27
|
el += '>'
|
|
28
28
|
el += '<div class="swiper-wrapper">'
|
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
div.toast
|
|
2
2
|
max-width: 60%
|
|
3
|
-
padding: 1rem
|
|
3
|
+
padding: 1rem 2rem
|
|
4
4
|
line-height: 1.5
|
|
5
5
|
color: var(--text-p1)
|
|
6
6
|
font-weight: 500
|
|
7
7
|
text-align: center
|
|
8
|
-
border-radius:
|
|
8
|
+
border-radius: 8px
|
|
9
9
|
background: var(--card)
|
|
10
10
|
position: fixed
|
|
11
|
-
top: 50%
|
|
12
11
|
left: 50%
|
|
13
|
-
|
|
12
|
+
top: 32px
|
|
13
|
+
transform: translateX(-50%)
|
|
14
14
|
z-index: 9
|
|
15
15
|
disable-select()
|
|
16
|
-
box-shadow: $boxshadow-
|
|
16
|
+
box-shadow: $boxshadow-toast
|
|
17
|
+
visibility: hidden
|
|
18
|
+
|
|
19
|
+
&.show
|
|
20
|
+
visibility: visible
|
|
21
|
+
-webkit-animation: fadein 0.5s, fadeout 0.5s 2s
|
|
22
|
+
animation: fadein 0.5s, fadeout 0.5s 2s
|
|
23
|
+
|
|
24
|
+
@-webkit-keyframes fadein
|
|
25
|
+
from {top: -64px; opacity: 0;}
|
|
26
|
+
to {top: 32px; opacity: 1;}
|
|
27
|
+
@keyframes fadein
|
|
28
|
+
from {top: -64px; opacity: 0;}
|
|
29
|
+
to {top: 32px; opacity: 1;}
|
|
30
|
+
|
|
31
|
+
@-webkit-keyframes fadeout
|
|
32
|
+
from {top: 32px; opacity: 1;}
|
|
33
|
+
to {top: -64px; opacity: 0;}
|
|
34
|
+
@keyframes fadeout
|
|
35
|
+
from {top: 32px; opacity: 1;}
|
|
36
|
+
to {top: -64px; opacity: 0;}
|
package/source/css/_custom.styl
CHANGED
|
@@ -89,6 +89,7 @@ $border-button = 4px
|
|
|
89
89
|
// shadow
|
|
90
90
|
$boxshadow-card = 0 1px 2px 0px rgba(0, 0, 0, 0.1)
|
|
91
91
|
$boxshadow-float = 0 4px 8px 0px rgba(0, 0, 0, 0.1)
|
|
92
|
-
$boxshadow-card-float = 0
|
|
92
|
+
$boxshadow-card-float = 0 12px 16px -4px rgba(0, 0, 0, 0.2)
|
|
93
93
|
$boxshadow-button = 0 0 2px 0px rgba(0, 0, 0, 0.04), 0 0 8px 0px rgba(0, 0, 0, 0.04)
|
|
94
94
|
$boxshadow-block = 0 1px 4px 0px rgba(0, 0, 0, 0.02), 0 2px 8px 0px rgba(0, 0, 0, 0.02)
|
|
95
|
+
$boxshadow-toast = 0 4px 8px 0px rgba(0, 0, 0, 0.1), 0 12px 16px -4px rgba(0, 0, 0, 0.2)
|
|
@@ -97,3 +97,14 @@ hover-block($v, $h, $br = 4px)
|
|
|
97
97
|
trans2 color background
|
|
98
98
|
&:hover
|
|
99
99
|
background: var(--block-hover)
|
|
100
|
+
|
|
101
|
+
floatable-trans()
|
|
102
|
+
trans2 transform box-shadow
|
|
103
|
+
floatable-float()
|
|
104
|
+
box-shadow: 0 12px 20px -4px rgba(0, 0, 0, 0.15)
|
|
105
|
+
transform: translate3d(0, -2px, 0)
|
|
106
|
+
|
|
107
|
+
hover-float()
|
|
108
|
+
floatable-trans()
|
|
109
|
+
&:hover
|
|
110
|
+
floatable-float()
|
|
@@ -21,7 +21,7 @@ set_text_dark()
|
|
|
21
21
|
--text-p3: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 1.25)
|
|
22
22
|
--text-p4: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 1.5)
|
|
23
23
|
--text-meta: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 2)
|
|
24
|
-
--text-code: hsl($color-code-h, $color-code-s, $color-code-l
|
|
24
|
+
--text-code: hsl($color-code-h, $color-code-s, $color-code-l)
|
|
25
25
|
|
|
26
26
|
set_text_light()
|
|
27
27
|
--text-p0: hsl($color-text-h, $color-text-s, 100)
|
|
@@ -30,7 +30,7 @@ set_text_light()
|
|
|
30
30
|
--text-p3: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.2)
|
|
31
31
|
--text-p4: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.4)
|
|
32
32
|
--text-meta: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.75)
|
|
33
|
-
--text-code: hsl($color-code-h, $color-code-s, $color-code-l * 1.
|
|
33
|
+
--text-code: hsl($color-code-h, $color-code-s, (100 - $color-code-l) * 1.2)
|
|
34
34
|
|
|
35
35
|
:root
|
|
36
36
|
--site-bg: hsl($color-background-h, $color-background-s, $color-background-l)
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
height: 1.5em
|
|
55
55
|
|
|
56
56
|
.post-list .post-card:hover
|
|
57
|
-
box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.1), 0 4px 16px 0px rgba(0, 0, 0, 0.1)
|
|
58
57
|
img
|
|
59
58
|
transform: scale(1.02)
|
|
60
59
|
filter: brightness(80%)
|
|
@@ -165,10 +164,15 @@
|
|
|
165
164
|
line-height: 1
|
|
166
165
|
margin-bottom: 0.75rem
|
|
167
166
|
.cap
|
|
167
|
+
--theme-block: var(--block)
|
|
168
168
|
background: var(--theme-block)
|
|
169
169
|
padding: 2px 4px
|
|
170
170
|
border-radius: 2px
|
|
171
171
|
p:last-child
|
|
172
172
|
margin-bottom: 0
|
|
173
173
|
.cap+.cap
|
|
174
|
-
margin-left: 4px
|
|
174
|
+
margin-left: 4px
|
|
175
|
+
|
|
176
|
+
.post-list.archives
|
|
177
|
+
@media screen and (max-width: $device-mobile)
|
|
178
|
+
margin: 1rem 0
|
|
@@ -24,14 +24,18 @@
|
|
|
24
24
|
align-items: baseline
|
|
25
25
|
margin: 0.25rem 0
|
|
26
26
|
color: var(--text-p1)
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
trans2 color border
|
|
28
|
+
border-bottom: 1px dashed var(--text-meta)
|
|
29
29
|
time
|
|
30
30
|
font-family: $ff-code
|
|
31
31
|
margin-right: 1em
|
|
32
32
|
font-weight: 700
|
|
33
33
|
flex-shrink: 0
|
|
34
|
-
|
|
34
|
+
color: var(--text-p4)
|
|
35
|
+
&:hover
|
|
36
|
+
border-bottom: 1px solid $color-theme
|
|
37
|
+
time
|
|
38
|
+
color: $color-theme
|
|
35
39
|
&:hover
|
|
36
40
|
.archive-header
|
|
37
41
|
color: var(--text-p1)
|
|
@@ -19,13 +19,11 @@
|
|
|
19
19
|
color: $color-hover
|
|
20
20
|
div#post-meta
|
|
21
21
|
margin-top: 2px
|
|
22
|
-
span
|
|
23
|
-
margin-left: 8px
|
|
22
|
+
span.updated
|
|
24
23
|
visibility: hidden
|
|
25
24
|
&:hover
|
|
26
|
-
div#post-meta
|
|
27
|
-
|
|
28
|
-
visibility: visible
|
|
25
|
+
div#post-meta span.updated
|
|
26
|
+
visibility: visible
|
|
29
27
|
|
|
30
28
|
.bread-nav .ghrepo
|
|
31
29
|
font-size: $fs-13
|
|
@@ -24,11 +24,11 @@ nav.cap
|
|
|
24
24
|
>p
|
|
25
25
|
margin: 0
|
|
26
26
|
a
|
|
27
|
-
padding: .25rem
|
|
28
|
-
margin: 10px 0 8px 0
|
|
27
|
+
padding: .25rem 0.75rem
|
|
28
|
+
margin: 10px 0.25rem 8px 0.25rem
|
|
29
29
|
line-height: 2
|
|
30
30
|
color: var(--text-p3)
|
|
31
|
-
border-radius:
|
|
31
|
+
border-radius: $border-button
|
|
32
32
|
font-weight: 500
|
|
33
33
|
white-space: nowrap
|
|
34
34
|
position: relative
|
|
@@ -37,8 +37,8 @@ nav.cap
|
|
|
37
37
|
height: 2px
|
|
38
38
|
position: absolute
|
|
39
39
|
bottom: -8px
|
|
40
|
-
left:
|
|
41
|
-
right:
|
|
40
|
+
left: 0.75rem
|
|
41
|
+
right: 0.75rem
|
|
42
42
|
background: $color-theme
|
|
43
43
|
border-radius: 2px
|
|
44
44
|
pointer-events: none
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
flex-direction: column
|
|
7
7
|
justify-content: flex-end
|
|
8
8
|
align-items: flex-start
|
|
9
|
-
color: white
|
|
10
9
|
height: 240px
|
|
11
10
|
@media screen and (max-width: $device-mobile-max)
|
|
12
11
|
height: 200px
|
|
@@ -37,12 +36,12 @@
|
|
|
37
36
|
background: none
|
|
38
37
|
line-height: 1.5
|
|
39
38
|
font-size: $fs-15
|
|
40
|
-
&:hover
|
|
41
|
-
color: white
|
|
42
|
-
background: rgba(black, 0.5)
|
|
43
39
|
&.active
|
|
44
40
|
color: white
|
|
45
41
|
background: rgba(white, 0.25)
|
|
42
|
+
&:hover
|
|
43
|
+
color: white
|
|
44
|
+
background: rgba(black, 0.5) !important
|
|
46
45
|
.back
|
|
47
46
|
background: none
|
|
48
47
|
padding: 0
|
|
@@ -78,14 +77,11 @@
|
|
|
78
77
|
border-radius: 50%
|
|
79
78
|
width: 48px
|
|
80
79
|
height: 48px
|
|
81
|
-
border: 2px solid white
|
|
82
80
|
.bottom
|
|
83
81
|
display: flex
|
|
84
82
|
padding: 1rem
|
|
85
83
|
width: 100%
|
|
86
84
|
box-sizing: border-box
|
|
87
|
-
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
|
|
88
|
-
text-shadow: 0 0 1px rgba(0,0,0,0.12)
|
|
89
85
|
.title
|
|
90
86
|
font-size: 1.5rem
|
|
91
87
|
font-weight: 600
|
|
@@ -99,9 +95,27 @@
|
|
|
99
95
|
font-size: 1.2rem
|
|
100
96
|
.subtitle
|
|
101
97
|
font-size: $fs-14
|
|
98
|
+
.content:only-child
|
|
99
|
+
color: var(--text-p1)
|
|
100
|
+
.bg+.content
|
|
101
|
+
color: white
|
|
102
|
+
.avatar
|
|
103
|
+
border: 2px solid white
|
|
104
|
+
.bottom
|
|
105
|
+
background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
|
|
106
|
+
text-shadow: 0 0 1px rgba(0,0,0,0.12)
|
|
102
107
|
|
|
103
108
|
.tag-plugin.banner
|
|
104
109
|
trans1(transform, 2s)
|
|
105
110
|
&:hover
|
|
106
111
|
img.bg
|
|
107
|
-
transform: scale(1.01)
|
|
112
|
+
transform: scale(1.01)
|
|
113
|
+
|
|
114
|
+
.l_main.list .tag-plugin.banner
|
|
115
|
+
background: var(--block-hover)
|
|
116
|
+
.content .top
|
|
117
|
+
margin-top: 1.5rem
|
|
118
|
+
margin: 0 1rem
|
|
119
|
+
@media screen and (max-width: $device-mobile)
|
|
120
|
+
margin: 0
|
|
121
|
+
border-radius: 0
|