hexo-theme-shokax 0.0.4-alpha4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- package/layout/_mixin/breadcrumb.pug +3 -3
- package/layout/_mixin/card.pug +4 -5
- package/layout/_mixin/postmeta.pug +3 -3
- package/layout/_mixin/segment.pug +2 -2
- package/layout/_mixin/sidebar.pug +4 -4
- package/layout/_mixin/widgets.pug +1 -1
- package/layout/_partials/footer.pug +3 -4
- package/layout/_partials/head/head.pug +1 -1
- package/layout/_partials/header.pug +2 -2
- package/layout/_partials/layout.pug +1 -1
- package/layout/_partials/pagination.pug +1 -1
- package/layout/_partials/post/copyright.pug +2 -2
- package/layout/_partials/post/footer.pug +2 -2
- package/layout/_partials/post/nav.pug +1 -1
- package/layout/_partials/post/post.pug +1 -1
- package/layout/_partials/post/reward.pug +1 -1
- package/layout/_partials/sidebar/menu.pug +5 -4
- package/layout/_partials/sidebar/overview.pug +1 -1
- package/layout/archive.pug +2 -2
- package/layout/category.pug +2 -2
- package/layout/page.pug +1 -2
- package/layout/post.pug +2 -2
- package/layout/tag.pug +2 -2
- package/package.json +8 -8
- package/scripts/plugin/lib/injects-point.js +1 -2
- package/source/css/_common/components/highlight/highlight.styl +2 -2
- package/source/css/_common/components/pages/home.styl +2 -2
- package/source/css/_common/components/post/breadcrumb.styl +1 -1
- package/source/css/_common/components/post/post.styl +1 -1
- package/source/css/_common/components/tags/links.styl +1 -1
- package/source/css/_common/components/third-party/valine.styl +3 -2
- package/source/css/_common/outline/header/menu.styl +1 -1
- package/source/css/_common/outline/sidebar/menu.styl +1 -1
- package/source/css/_common/scaffolding/base.styl +4 -8
- package/source/css/_common/scaffolding/buttons.styl +1 -1
- package/source/css/_common/scaffolding/iconfont.styl +60 -60
- package/source/js/_app/global.js +5 -5
- package/source/js/_app/library.js +1 -1
- package/source/js/_app/page.js +15 -15
- package/source/js/_app/vue.js +1 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
mixin BCRender(post, home)
|
2
2
|
if home
|
3
3
|
!= '<div class="breadcrumb" itemListElement itemscope itemtype="https://schema.org/BreadcrumbList">'
|
4
|
-
i(class="
|
4
|
+
i(class="ic i-home")
|
5
5
|
span
|
6
6
|
a(href=url_for(site.path))
|
7
7
|
!= __('menu.home')
|
@@ -10,7 +10,7 @@ mixin BCRender(post, home)
|
|
10
10
|
if post.categories && post.categories.length
|
11
11
|
- var cat_length = post.categories.length
|
12
12
|
if home
|
13
|
-
i(class="
|
13
|
+
i(class="ic i-angle-right")
|
14
14
|
each cat,index in post.categories.toArray()
|
15
15
|
if home
|
16
16
|
if index===cat_length
|
@@ -29,5 +29,5 @@ mixin BCRender(post, home)
|
|
29
29
|
a(href=url_for(cat.path) title=__('post.in')+cat.name)
|
30
30
|
!= cat.name
|
31
31
|
if cat_length > 1 && index !== cat_length
|
32
|
-
i(class="
|
32
|
+
i(class="ic i-angle-right")
|
33
33
|
!= '</div>'
|
package/layout/_mixin/card.pug
CHANGED
@@ -12,11 +12,10 @@ mixin CardRender(item)
|
|
12
12
|
!= item.top.name
|
13
13
|
div(class="info")
|
14
14
|
if item.link
|
15
|
-
- var postTitleIcon = '<i class="
|
15
|
+
- var postTitleIcon = '<i class="ic i-link-alt"></i>'
|
16
16
|
- var postText = itemname || item.link || __('post.untitled')
|
17
|
-
- var tempI = postText + (postTitleIcon || '')
|
18
17
|
div(class="ribbon")
|
19
|
-
!= _url(item.link ,
|
18
|
+
!= _url(item.link , postText + (postTitleIcon || ''), {itemprop: 'url', title: postText})
|
20
19
|
div(class="inner")
|
21
20
|
- var len = ''
|
22
21
|
if item.child
|
@@ -31,8 +30,8 @@ mixin CardRender(item)
|
|
31
30
|
div(class="meta footer")
|
32
31
|
if item.top
|
33
32
|
span
|
34
|
-
!= _url(item.top.path, '<i class="
|
33
|
+
!= _url(item.top.path, '<i class="ic i-flag"></i>'+item.top.name, {itemprop: 'url', title: item.top.name})
|
35
34
|
span
|
36
|
-
i(class="
|
35
|
+
i(class="ic i-file")
|
37
36
|
!= len
|
38
37
|
!= _url(item.path, 'more...', {itemprop: 'url', title: itemname, class: 'btn'})
|
@@ -5,7 +5,7 @@ mixin PMRender(item, full)
|
|
5
5
|
- var create_title = __('post.created') + __('symbol.colon') + full_date(item.date)
|
6
6
|
span(class="item" title=create_title)
|
7
7
|
span(class="icon")
|
8
|
-
i(class="
|
8
|
+
i(class="ic i-calendar")
|
9
9
|
if full
|
10
10
|
span(class="text")
|
11
11
|
!= __('post.posted')
|
@@ -14,7 +14,7 @@ mixin PMRender(item, full)
|
|
14
14
|
if theme.post.count
|
15
15
|
span(class="item" title=__('symbols_count_time.count'))
|
16
16
|
span(class="icon")
|
17
|
-
i(class="
|
17
|
+
i(class="ic i-pen")
|
18
18
|
if full
|
19
19
|
span(class="text")
|
20
20
|
!= __('symbols_count_time.count')
|
@@ -23,7 +23,7 @@ mixin PMRender(item, full)
|
|
23
23
|
!= __('symbols_count_time.word')
|
24
24
|
span(class="item" title=__('symbols_count_time.time'))
|
25
25
|
span(class="icon")
|
26
|
-
i(class="
|
26
|
+
i(class="ic i-clock")
|
27
27
|
if full
|
28
28
|
span(class="text")
|
29
29
|
!= __('symbols_count_time.time')
|
@@ -4,7 +4,7 @@ mixin SMRender(item)
|
|
4
4
|
- var link1 = item.link || item.path
|
5
5
|
- var gradient = theme?.experiments?.gradient
|
6
6
|
if item.link
|
7
|
-
- var postTitleIcon = '<i class="
|
7
|
+
- var postTitleIcon = '<i class="ic i-link-alt"></i>'
|
8
8
|
- var postText = item.title || item.link || __('post.untitled')
|
9
9
|
article(class="item")
|
10
10
|
if gradient
|
@@ -27,6 +27,6 @@ mixin SMRender(item)
|
|
27
27
|
div(class="meta footer")
|
28
28
|
span
|
29
29
|
- var lastcat = item.categories.last()
|
30
|
-
!= _url(lastcat.path, '<i class="
|
30
|
+
!= _url(lastcat.path, '<i class="ic i-flag"></i>' + lastcat.name, {itemprop: 'url', title: lastcat.name})
|
31
31
|
!= _url(link1, 'more...', {itemprop: 'url', title: postText, class: 'btn'})
|
32
32
|
|
@@ -25,12 +25,12 @@ mixin sidebarRender(display_toc)
|
|
25
25
|
li(class="prev pjax")
|
26
26
|
if page && page.prev
|
27
27
|
if prevlink
|
28
|
-
!= _url(prevlink, '<i class="
|
28
|
+
!= _url(prevlink, '<i class="ic i-chevron-left"></i>', {rel: 'prev', title: __('post.prev')})
|
29
29
|
li(class="up")
|
30
|
-
i(class="
|
30
|
+
i(class="ic i-arrow-up")
|
31
31
|
li(class="down")
|
32
|
-
i(class="
|
32
|
+
i(class="ic i-arrow-down")
|
33
33
|
li(class="next pjax")
|
34
34
|
if nextlink
|
35
|
-
!= _url(nextlink, '<i class="
|
35
|
+
!= _url(nextlink, '<i class="ic i-chevron-right"></i>', {rel: 'next', title: __('post.next')})
|
36
36
|
li(class="percent")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
mixin field(item)
|
2
2
|
if item.link
|
3
|
-
- var postTitleIcon = '<i class="
|
3
|
+
- var postTitleIcon = '<i class="ic i-link-alt"></i>'
|
4
4
|
li(class="item")
|
5
5
|
+BCRender(item, false)
|
6
6
|
- var postText = item.title || item.link || __('post.untitled')
|
@@ -6,18 +6,18 @@ div(class="status")
|
|
6
6
|
span(itemprop="copyrightYear")
|
7
7
|
!= copyright_year
|
8
8
|
span(class="with-love")
|
9
|
-
i(class=`
|
9
|
+
i(class=`ic i-${ theme.footer.icon.name }`)
|
10
10
|
span(class="author" itemprop="copyrightHolder")
|
11
11
|
!= `${author} @ ${ alternate?alternate:title}`
|
12
12
|
if theme.footer.count
|
13
13
|
div(class="count")
|
14
14
|
span(class="post-meta-item-icon")
|
15
|
-
i(class="
|
15
|
+
i(class="ic i-chart-area")
|
16
16
|
span(title=__('symbols_count_time.count_total'))
|
17
17
|
!= `${ symbolsCountTotal(site) } ${__('symbols_count_time.word')}`
|
18
18
|
span(class="post-meta-divider") |
|
19
19
|
span(class="post-meta-item-icon")
|
20
|
-
i(class="
|
20
|
+
i(class="ic i-coffee")
|
21
21
|
span(title=__('symbols_count_time.time_total'))
|
22
22
|
!= symbolsTimeTotal(site, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes'))
|
23
23
|
//- span(id="timeDate")
|
@@ -36,7 +36,6 @@ div(class="status")
|
|
36
36
|
a(target="_blank" href=`https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=${RC}`)
|
37
37
|
img(src=theme.statics + theme.assets + '/' + theme.footer.icp.icon style="max-width: 2em;display:inline;")
|
38
38
|
!= beianN
|
39
|
-
!= shokax_inject('status')
|
40
39
|
|
41
40
|
!= shokax_inject('footer')
|
42
41
|
|
@@ -33,7 +33,7 @@ link(rel="alternate" type="application/json" title=siteTitle href=feedLink)
|
|
33
33
|
if fontConfig
|
34
34
|
!= _vendor_font()
|
35
35
|
!= _css('app.css')
|
36
|
-
|
36
|
+
|
37
37
|
- var debugVue = theme?.experiments?.debug
|
38
38
|
if debugVue
|
39
39
|
script(src="https://cdn.staticfile.org/vue/3.2.45/vue.global.js")
|
@@ -11,8 +11,8 @@ nav(id="nav")
|
|
11
11
|
!= alternate || title
|
12
12
|
ul(class="right" id="rightNav")
|
13
13
|
li(class="item theme" @click="changeThemeByBtn")
|
14
|
-
i(class="
|
14
|
+
i(class="ic" :class="{'i-sun': !themeStatus,'i-moon': themeStatus}")
|
15
15
|
li(class="item search")
|
16
|
-
i(class="
|
16
|
+
i(class="ic i-search")
|
17
17
|
!= shokax_inject('rightNav')
|
18
18
|
|
@@ -65,7 +65,7 @@ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'f
|
|
65
65
|
div(class="widgets")
|
66
66
|
+WRender
|
67
67
|
!= partial('_partials/footer.pug', {}, {cache: true})
|
68
|
-
- var ccIcon = '<i class="
|
68
|
+
- var ccIcon = '<i class="ic i-creative-commons"></i>'
|
69
69
|
- var ccText = theme.creative_commons.license.toUpperCase()
|
70
70
|
<script data-config type="text/javascript" >
|
71
71
|
| var LOCAL = {
|
@@ -1,4 +1,4 @@
|
|
1
1
|
if page.prev || page.next
|
2
2
|
nav(class="pagination")
|
3
3
|
div(class="inner")
|
4
|
-
!= paginator({prev_text: '<i class="
|
4
|
+
!= paginator({prev_text: '<i class="ic i-angle-left" aria-label="' + __('accessibility.prev_page') + '"></i>',next_text: '<i class="ic i-angle-right" aria-label="' + __('accessibility.next_page') + '"></i>',mid_size : 1,escape : false})
|
@@ -1,5 +1,5 @@
|
|
1
1
|
if page.copyright !== false
|
2
|
-
- var ccIcon = '<i class="
|
2
|
+
- var ccIcon = '<i class="ic i-creative-commons"><em>(CC)</em></i>'
|
3
3
|
- var ccText = theme.creative_commons.license.toUpperCase()
|
4
4
|
div(id="copyright")
|
5
5
|
ul
|
@@ -7,7 +7,7 @@ if page.copyright !== false
|
|
7
7
|
strong
|
8
8
|
!= __('post.copyright.author') + __('symbol.colon')
|
9
9
|
!= page.author || author
|
10
|
-
i(class="
|
10
|
+
i(class="ic i-at")
|
11
11
|
em @
|
12
12
|
!= title
|
13
13
|
li(class="link")
|
@@ -1,12 +1,12 @@
|
|
1
1
|
div(class="meta")
|
2
2
|
if date(post.date) != date(post.updated) || time(post.date) != time(post.updated)
|
3
3
|
span(class="icon")
|
4
|
-
i(class="
|
4
|
+
i(class="ic i-eye")
|
5
5
|
span 此文章已被阅读次数:
|
6
6
|
span(id="twikoo_visitors" class="waline-pageview-count" data-path=post.path) 正在加载...
|
7
7
|
span(class="item")
|
8
8
|
span(class="icon")
|
9
|
-
i(class="
|
9
|
+
i(class="ic i-calendar-check")
|
10
10
|
span(class="text")
|
11
11
|
!= __('post.edited')
|
12
12
|
time(title=__('post.modified') + __('symbol.colon') + full_date(post.updated) itemprop="dateModified" datetime=moment(post.updated).format())
|
@@ -1,7 +1,7 @@
|
|
1
1
|
mixin navpost(item, type)
|
2
2
|
- var postText = item.title || item.link || __('post.untitled')
|
3
3
|
- var lastcat = item.categories.last()
|
4
|
-
- var itemlink=`<span class="type">${__('post.' + type)}</span><span class="category"><i class="
|
4
|
+
- var itemlink=`<span class="type">${__('post.' + type)}</span><span class="category"><i class="ic i-flag"></i>${lastcat?.name}</span><h3>${ postText }</h3>`
|
5
5
|
!= _url(item.path, itemlink, {itemprop: 'url', rel: type, 'data-background-image': _cover(item), title: postText})
|
6
6
|
|
7
7
|
div(class="post-nav")
|
@@ -17,7 +17,7 @@ article(itemscope itemtype="http://schema.org/Article" class="post block" lang=t
|
|
17
17
|
div(class="tags")
|
18
18
|
each tag in post.tags.toArray()
|
19
19
|
a(href!=url_for(tag.path) rel="tag")
|
20
|
-
i(class="
|
20
|
+
i(class="ic i-tag")
|
21
21
|
!= tag.name
|
22
22
|
footer
|
23
23
|
!= partial('_partials/post/footer.pug')
|
@@ -3,7 +3,7 @@ mixin item(name, path, parent, dropdown, sublist)
|
|
3
3
|
- var path = path.split('||')
|
4
4
|
- var itemURL = path[0].trim()
|
5
5
|
- if (!itemURL.startsWith('http')){ itemURL = itemURL.replace('//', '/') }
|
6
|
-
- var menuIcon = '<i class="
|
6
|
+
- var menuIcon = '<i class="ic i-' + trimn(path[1]) + '"></i>'
|
7
7
|
- var menuText = __('menu.' + name).replace('menu.', '')
|
8
8
|
if parent
|
9
9
|
li(class="item dropdown")
|
@@ -21,9 +21,10 @@ mixin item(name, path, parent, dropdown, sublist)
|
|
21
21
|
- var menuText = __('menu.' + subname).replace('menu.', '')
|
22
22
|
if subname == 'default'
|
23
23
|
- var menuText = __('menu.' + name).replace('menu.', '')
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
else
|
25
|
+
- var menuIcon = '<i class="ic i-' + trimn(path[1]) + '"></i>'
|
26
|
+
li(class="item")
|
27
|
+
!= _url(itemURL, menuIcon + menuText, {rel: 'section'})
|
27
28
|
else
|
28
29
|
li(class="item")
|
29
30
|
!= _url(itemURL, menuIcon + menuText, {rel: 'section'})
|
@@ -32,7 +32,7 @@ nav(class="state")
|
|
32
32
|
div(class="social")
|
33
33
|
each link, name in theme.social
|
34
34
|
- var sidebarURL = link.split('||')[0].trim()
|
35
|
-
- var sidebarIcon = '<i class="
|
35
|
+
- var sidebarIcon = '<i class="ic i-' + link.split('||')[1].trim() + '"></i>'
|
36
36
|
!= _url(sidebarURL, sidebarIcon, {title: sidebarURL, class: 'item ' + name})
|
37
37
|
|
38
38
|
!= shokax_inject('sidebar')
|
package/layout/archive.pug
CHANGED
@@ -5,7 +5,7 @@ block title
|
|
5
5
|
!= `${page.year}${__('symbol.year')}/${page.month}${__('symbol.month')}`
|
6
6
|
else if is_year()
|
7
7
|
!= `${page.year}${__('symbol.year')}`
|
8
|
-
!= `${__('title.archive')}
|
8
|
+
!= `${__('title.archive')}`
|
9
9
|
|
10
10
|
block header
|
11
11
|
h1(itemprop="name headline")
|
@@ -103,7 +103,7 @@ block content
|
|
103
103
|
a(href=url_for(cat.path)) #{cat.name}
|
104
104
|
div(class="title")
|
105
105
|
if post.link
|
106
|
-
- var postTitleIcon = '<i class="
|
106
|
+
- var postTitleIcon = '<i class="ic i-link-alt"></i>'
|
107
107
|
- var postText = post.title || post.link
|
108
108
|
!= _url(post.link, postText + postTitleIcon, {class: 'external', itemprop: 'url'})
|
109
109
|
else
|
package/layout/category.pug
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
extends ./_partials/layout.pug
|
2
2
|
|
3
3
|
block title
|
4
|
-
!= `${__('title.category')}${__('symbol.colon')}${page.category}
|
4
|
+
!= `${__('title.category')}${__('symbol.colon')}${page.category}`
|
5
5
|
|
6
6
|
block header
|
7
7
|
h1(itemprop="name headline")
|
@@ -53,7 +53,7 @@ block content
|
|
53
53
|
) #{date(post.date, 'MM-DD')}
|
54
54
|
div(class="title")
|
55
55
|
if post.link
|
56
|
-
- var postTitleIcon = '<i class="
|
56
|
+
- var postTitleIcon = '<i class="ic i-link-alt"></i>'
|
57
57
|
- var postText = post.title || post.link
|
58
58
|
!= _url(post.link, postText + postTitleIcon, {class: 'external', itemprop: 'url'})
|
59
59
|
else
|
package/layout/page.pug
CHANGED
@@ -11,12 +11,11 @@ block title
|
|
11
11
|
!= __('title.not_found')
|
12
12
|
else
|
13
13
|
!= page.title
|
14
|
-
!= "|"
|
15
14
|
|
16
15
|
block header
|
17
16
|
h1(itemprop="name headline")
|
18
17
|
if page.link
|
19
|
-
- var postTitleIcon = '<i class="
|
18
|
+
- var postTitleIcon = '<i class="ic i-link-alt"></i>'
|
20
19
|
- var postText = page.title || page.link
|
21
20
|
!= _url(page.link, postText + postTitleIcon, {class: 'link external', itemprop: 'url'})
|
22
21
|
else
|
package/layout/post.pug
CHANGED
@@ -12,12 +12,12 @@ block title
|
|
12
12
|
- var cat_list = cat.name + comma + cat_list
|
13
13
|
- var comma = ' - '
|
14
14
|
- var page_title = page.title + ' - ' + cat_list
|
15
|
-
!= `${page_title}
|
15
|
+
!= `${page_title}`
|
16
16
|
|
17
17
|
block header
|
18
18
|
h1(itemprop="name headline")
|
19
19
|
if page.link
|
20
|
-
- var postTitleIcon = '<i class="
|
20
|
+
- var postTitleIcon = '<i class="ic i-link-alt"></i>'
|
21
21
|
- var postText = page.title || page.link
|
22
22
|
!= _url(page.link, postText + postTitleIcon, {class: 'link external', itemprop: 'url'})
|
23
23
|
else
|
package/layout/tag.pug
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
extends ./_partials/layout.pug
|
2
2
|
|
3
3
|
block title
|
4
|
-
!= `${__('title.tag')}${__('symbol.colon')}${page.tag}
|
4
|
+
!= `${__('title.tag')}${__('symbol.colon')}${page.tag}`
|
5
5
|
|
6
6
|
block header
|
7
7
|
h1(itemprop="name headline")
|
@@ -33,7 +33,7 @@ block content
|
|
33
33
|
!= cat.name
|
34
34
|
div(class="title")
|
35
35
|
if post.link
|
36
|
-
- var postTitleIcon = '<i class="
|
36
|
+
- var postTitleIcon = '<i class="ic i-link-alt"></i>'
|
37
37
|
- var postText = post.title || post.link
|
38
38
|
!= _url(post.link, postText + postTitleIcon, {class: 'external', itemprop: 'url'})
|
39
39
|
else
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hexo-theme-shokax",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.5",
|
4
4
|
"description": "a hexo theme based on shoka",
|
5
5
|
"main": "index.js",
|
6
6
|
"repository": "https://github.com/zkz098/hexo-theme-shokaX",
|
@@ -13,19 +13,19 @@
|
|
13
13
|
"@types/animejs": "^3.1.6",
|
14
14
|
"@types/fancybox": "^3.5.3",
|
15
15
|
"@types/hexo": "^3.8.8",
|
16
|
-
"@types/jquery": "^3.5.
|
16
|
+
"@types/jquery": "^3.5.14",
|
17
17
|
"@types/js-yaml": "^4.0.5",
|
18
18
|
"@types/lozad": "^1.16.1",
|
19
19
|
"@types/node": "^18.11.18",
|
20
20
|
"@types/shelljs": "^0.8.11",
|
21
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
22
|
-
"@typescript-eslint/parser": "^5.
|
23
|
-
"eslint": "^8.
|
21
|
+
"@typescript-eslint/eslint-plugin": "^5.47.1",
|
22
|
+
"@typescript-eslint/parser": "^5.47.1",
|
23
|
+
"eslint": "^8.30.0",
|
24
24
|
"eslint-config-standard": "^17.0.0",
|
25
|
-
"eslint-plugin-import": "^2.
|
26
|
-
"eslint-plugin-n": "^15.6.
|
25
|
+
"eslint-plugin-import": "^2.26.0",
|
26
|
+
"eslint-plugin-n": "^15.6.0",
|
27
27
|
"eslint-plugin-promise": "^6.1.1",
|
28
|
-
"eslint-plugin-vue": "^9.
|
28
|
+
"eslint-plugin-vue": "^9.8.0",
|
29
29
|
"typescript": "^4.9.4",
|
30
30
|
"vue": "^3.2.45"
|
31
31
|
},
|
@@ -243,7 +243,7 @@ code,
|
|
243
243
|
background: var(--grey-2);
|
244
244
|
}
|
245
245
|
|
246
|
-
.
|
246
|
+
.ic {
|
247
247
|
margin-top: 1rem;
|
248
248
|
@extend .up-down;
|
249
249
|
}
|
@@ -256,7 +256,7 @@ code,
|
|
256
256
|
display: none;
|
257
257
|
}
|
258
258
|
|
259
|
-
.
|
259
|
+
.ic {
|
260
260
|
@extend .down-up;
|
261
261
|
}
|
262
262
|
}
|
@@ -186,11 +186,12 @@
|
|
186
186
|
margin: .5rem;
|
187
187
|
overflow: hidden;
|
188
188
|
vertical-align: middle;
|
189
|
-
|
189
|
+
|
190
|
+
&.actived .ic {
|
190
191
|
color: var(--primary-color);
|
191
192
|
}
|
192
193
|
|
193
|
-
.
|
194
|
+
.ic {
|
194
195
|
color: var(--grey-6);
|
195
196
|
transition: all .25s ease;
|
196
197
|
|
@@ -145,8 +145,8 @@ input, textarea {
|
|
145
145
|
src: url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono@2.242/fonts/webfonts/JetBrainsMono-Regular.woff2") format("woff2");
|
146
146
|
}
|
147
147
|
|
148
|
-
|
149
|
-
|
148
|
+
.ic {
|
149
|
+
font-family: "ic" !important;
|
150
150
|
-webkit-font-smoothing: antialiased;
|
151
151
|
-moz-osx-font-smoothing: grayscale;
|
152
152
|
text-align: center;
|
@@ -158,15 +158,11 @@ input, textarea {
|
|
158
158
|
line-height: 1;
|
159
159
|
}
|
160
160
|
|
161
|
-
|
162
|
-
|
163
|
-
.fa em {
|
161
|
+
.ic em {
|
164
162
|
font-size: 0;
|
165
163
|
}
|
166
164
|
|
167
|
-
|
168
|
-
|
169
|
-
.fa-lg {
|
165
|
+
.ic-lg {
|
170
166
|
font-size: 1.33333em;
|
171
167
|
line-height: .75em;
|
172
168
|
vertical-align: -.0667em;
|
@@ -1,161 +1,161 @@
|
|
1
1
|
.i-volume-off:before {
|
2
|
-
content: "\
|
2
|
+
content: "\e61e";
|
3
3
|
}
|
4
4
|
|
5
5
|
.i-volume-on:before {
|
6
|
-
content: "\
|
6
|
+
content: "\e62c";
|
7
7
|
}
|
8
8
|
|
9
9
|
.i-circle-play:before {
|
10
|
-
content: "\
|
10
|
+
content: "\e647";
|
11
11
|
}
|
12
12
|
|
13
13
|
.i-forward:before {
|
14
|
-
content: "\
|
14
|
+
content: "\e648";
|
15
15
|
}
|
16
16
|
|
17
17
|
.i-backward:before {
|
18
|
-
content: "\
|
18
|
+
content: "\e649";
|
19
19
|
}
|
20
20
|
|
21
21
|
.i-circle-pause:before {
|
22
|
-
content: "\
|
22
|
+
content: "\e64a";
|
23
23
|
}
|
24
24
|
|
25
25
|
.i-loop:before {
|
26
|
-
content: "\
|
26
|
+
content: "\e64b";
|
27
27
|
}
|
28
28
|
|
29
29
|
.i-order:before {
|
30
|
-
content: "\
|
30
|
+
content: "\e64c";
|
31
31
|
}
|
32
32
|
|
33
33
|
.i-random:before {
|
34
|
-
content: "\
|
34
|
+
content: "\e64d";
|
35
35
|
}
|
36
36
|
|
37
37
|
.i-douban:before {
|
38
|
-
content: "\
|
38
|
+
content: "\e75f";
|
39
39
|
}
|
40
40
|
|
41
41
|
.i-linux:before {
|
42
|
-
content: "\
|
42
|
+
content: "\f1e8";
|
43
43
|
}
|
44
44
|
|
45
45
|
.i-opera:before {
|
46
|
-
content: "\
|
46
|
+
content: "\f205";
|
47
47
|
}
|
48
48
|
|
49
49
|
.i-qq:before {
|
50
|
-
content: "\
|
50
|
+
content: "\f216";
|
51
51
|
}
|
52
52
|
|
53
53
|
.i-safari:before {
|
54
|
-
content: "\
|
54
|
+
content: "\f229";
|
55
55
|
}
|
56
56
|
|
57
57
|
.i-snapchat-ghost:before {
|
58
|
-
content: "\
|
58
|
+
content: "\f234";
|
59
59
|
}
|
60
60
|
|
61
61
|
.i-weixin:before {
|
62
|
-
content: "\
|
62
|
+
content: "\f262";
|
63
63
|
}
|
64
64
|
|
65
65
|
.i-windows:before {
|
66
|
-
content: "\
|
66
|
+
content: "\f266";
|
67
67
|
}
|
68
68
|
|
69
69
|
.i-stars:before {
|
70
|
-
content: "\
|
70
|
+
content: "\e8c4";
|
71
71
|
}
|
72
72
|
|
73
73
|
.i-apple:before {
|
74
|
-
content: "\
|
74
|
+
content: "\e600";
|
75
75
|
}
|
76
76
|
|
77
77
|
.i-blackberry:before {
|
78
|
-
content: "\
|
78
|
+
content: "\e601";
|
79
79
|
}
|
80
80
|
|
81
81
|
.i-centos:before {
|
82
|
-
content: "\
|
82
|
+
content: "\e602";
|
83
83
|
}
|
84
84
|
|
85
85
|
.i-fedora:before {
|
86
|
-
content: "\
|
86
|
+
content: "\e603";
|
87
87
|
}
|
88
88
|
|
89
89
|
.i-redhat:before {
|
90
|
-
content: "\
|
90
|
+
content: "\e604";
|
91
91
|
}
|
92
92
|
|
93
93
|
.i-ubuntu:before {
|
94
|
-
content: "\
|
94
|
+
content: "\e605";
|
95
95
|
}
|
96
96
|
|
97
97
|
.i-suse:before {
|
98
|
-
content: "\
|
98
|
+
content: "\e606";
|
99
99
|
}
|
100
100
|
|
101
101
|
.i-mobile-alt:before {
|
102
|
-
content: "\
|
102
|
+
content: "\f052";
|
103
103
|
}
|
104
104
|
|
105
105
|
.i-paw:before {
|
106
|
-
content: "\
|
106
|
+
content: "\f06b";
|
107
107
|
}
|
108
108
|
|
109
109
|
.i-android:before {
|
110
|
-
content: "\
|
110
|
+
content: "\f161";
|
111
111
|
}
|
112
112
|
|
113
113
|
.i-chrome:before {
|
114
|
-
content: "\
|
114
|
+
content: "\f178";
|
115
115
|
}
|
116
116
|
|
117
117
|
.i-edge:before {
|
118
|
-
content: "\
|
118
|
+
content: "\f195";
|
119
119
|
}
|
120
120
|
|
121
121
|
.i-firefox:before {
|
122
|
-
content: "\
|
122
|
+
content: "\f1a1";
|
123
123
|
}
|
124
124
|
|
125
125
|
.i-internet-explorer:before {
|
126
|
-
content: "\
|
126
|
+
content: "\f1d4";
|
127
127
|
}
|
128
128
|
|
129
129
|
.i-markdown:before {
|
130
|
-
content: "\
|
130
|
+
content: "\f1eb";
|
131
131
|
}
|
132
132
|
|
133
133
|
.i-smile:before {
|
134
|
-
content: "\
|
134
|
+
content: "\f2a5";
|
135
135
|
}
|
136
136
|
|
137
137
|
.i-preview:before {
|
138
|
-
content: "\
|
138
|
+
content: "\e901";
|
139
139
|
}
|
140
140
|
|
141
141
|
.i-share:before {
|
142
|
-
content: "\
|
142
|
+
content: "\e61b";
|
143
143
|
}
|
144
144
|
|
145
145
|
.i-link-circle:before {
|
146
|
-
content: "\
|
146
|
+
content: "\e67b";
|
147
147
|
}
|
148
148
|
|
149
149
|
.i-person:before {
|
150
|
-
content: "\
|
150
|
+
content: "\e69d";
|
151
151
|
}
|
152
152
|
|
153
153
|
.i-sun:before {
|
154
|
-
content: "\
|
154
|
+
content: "\e6d1";
|
155
155
|
}
|
156
156
|
|
157
157
|
.i-moon:before {
|
158
|
-
content: "\
|
158
|
+
content: "\e71e";
|
159
159
|
}
|
160
160
|
|
161
161
|
.i-compress:before {
|
@@ -207,7 +207,7 @@
|
|
207
207
|
}
|
208
208
|
|
209
209
|
.i-music:before {
|
210
|
-
content: "\
|
210
|
+
content: "\f059";
|
211
211
|
}
|
212
212
|
|
213
213
|
.i-pause:before {
|
@@ -219,7 +219,7 @@
|
|
219
219
|
}
|
220
220
|
|
221
221
|
.i-play:before {
|
222
|
-
content: "\
|
222
|
+
content: "\f07f";
|
223
223
|
}
|
224
224
|
|
225
225
|
.i-calendar-check:before {
|
@@ -255,7 +255,7 @@
|
|
255
255
|
}
|
256
256
|
|
257
257
|
.i-star:before {
|
258
|
-
content: "\
|
258
|
+
content: "\f0d4";
|
259
259
|
}
|
260
260
|
|
261
261
|
.i-link-alt:before {
|
@@ -283,7 +283,7 @@
|
|
283
283
|
}
|
284
284
|
|
285
285
|
.i-home:before {
|
286
|
-
content: "\
|
286
|
+
content: "\e8ed";
|
287
287
|
}
|
288
288
|
|
289
289
|
.i-magic:before {
|
@@ -291,7 +291,7 @@
|
|
291
291
|
}
|
292
292
|
|
293
293
|
.i-sakura:before {
|
294
|
-
content: "\
|
294
|
+
content: "\e695";
|
295
295
|
}
|
296
296
|
|
297
297
|
.i-tag:before {
|
@@ -299,19 +299,19 @@
|
|
299
299
|
}
|
300
300
|
|
301
301
|
.i-angle-left:before {
|
302
|
-
content: "\
|
302
|
+
content: "\ef19";
|
303
303
|
}
|
304
304
|
|
305
305
|
.i-arrow-circle-right:before {
|
306
|
-
content: "\
|
306
|
+
content: "\ef23";
|
307
307
|
}
|
308
308
|
|
309
309
|
.i-check-circle:before {
|
310
|
-
content: "\
|
310
|
+
content: "\ef66";
|
311
311
|
}
|
312
312
|
|
313
313
|
.i-exclamation-circle:before {
|
314
|
-
content: "\
|
314
|
+
content: "\efb5";
|
315
315
|
}
|
316
316
|
|
317
317
|
.i-info-circle:before {
|
@@ -319,11 +319,11 @@
|
|
319
319
|
}
|
320
320
|
|
321
321
|
.i-minus-circle:before {
|
322
|
-
content: "\
|
322
|
+
content: "\f050";
|
323
323
|
}
|
324
324
|
|
325
325
|
.i-plus-circle:before {
|
326
|
-
content: "\
|
326
|
+
content: "\f082";
|
327
327
|
}
|
328
328
|
|
329
329
|
.i-file-word:before {
|
@@ -331,15 +331,15 @@
|
|
331
331
|
}
|
332
332
|
|
333
333
|
.i-check:before {
|
334
|
-
content: "\
|
334
|
+
content: "\ef65";
|
335
335
|
}
|
336
336
|
|
337
337
|
.i-times:before {
|
338
|
-
content: "\
|
338
|
+
content: "\f109";
|
339
339
|
}
|
340
340
|
|
341
341
|
.i-list-ol:before {
|
342
|
-
content: "\
|
342
|
+
content: "\f039";
|
343
343
|
}
|
344
344
|
|
345
345
|
.i-archive:before {
|
@@ -347,15 +347,15 @@
|
|
347
347
|
}
|
348
348
|
|
349
349
|
.i-angle-right:before {
|
350
|
-
content: "\
|
350
|
+
content: "\ef1f";
|
351
351
|
}
|
352
352
|
|
353
353
|
.i-arrow-down:before {
|
354
|
-
content: "\
|
354
|
+
content: "\ef25";
|
355
355
|
}
|
356
356
|
|
357
357
|
.i-arrow-up:before {
|
358
|
-
content: "\
|
358
|
+
content: "\ef2a";
|
359
359
|
}
|
360
360
|
|
361
361
|
.i-chart-area:before {
|
@@ -387,7 +387,7 @@
|
|
387
387
|
}
|
388
388
|
|
389
389
|
.i-heartbeat:before {
|
390
|
-
content: "\
|
390
|
+
content: "\f017";
|
391
391
|
}
|
392
392
|
|
393
393
|
.i-search:before {
|
@@ -395,7 +395,7 @@
|
|
395
395
|
}
|
396
396
|
|
397
397
|
.i-sitemap:before {
|
398
|
-
content: "\
|
398
|
+
content: "\f0bd";
|
399
399
|
}
|
400
400
|
|
401
401
|
.i-tags:before {
|
@@ -411,7 +411,7 @@
|
|
411
411
|
}
|
412
412
|
|
413
413
|
.i-times-circle:before {
|
414
|
-
content: "\
|
414
|
+
content: "\f10a";
|
415
415
|
}
|
416
416
|
|
417
417
|
.i-creative-commons:before {
|
package/source/js/_app/global.js
CHANGED
@@ -25,16 +25,16 @@ let LOCAL_HASH = 0;
|
|
25
25
|
let LOCAL_URL = window.location.href;
|
26
26
|
let pjax;
|
27
27
|
const changeTheme = function (type) {
|
28
|
-
const btn = $dom('.theme .
|
28
|
+
const btn = $dom('.theme .ic');
|
29
29
|
if (type === 'dark') {
|
30
30
|
HTML.attr('data-theme', type);
|
31
|
-
btn.removeClass('
|
32
|
-
btn.addClass('
|
31
|
+
btn.removeClass('i-sun');
|
32
|
+
btn.addClass('i-moon');
|
33
33
|
}
|
34
34
|
else {
|
35
35
|
HTML.attr('data-theme', null);
|
36
|
-
btn.removeClass('
|
37
|
-
btn.addClass('
|
36
|
+
btn.removeClass('i-moon');
|
37
|
+
btn.addClass('i-sun');
|
38
38
|
}
|
39
39
|
};
|
40
40
|
const autoDarkmode = function () {
|
@@ -167,7 +167,7 @@ const assetUrl = function (asset, type) {
|
|
167
167
|
return `https://cdn.jsdelivr.net/${str}`;
|
168
168
|
}
|
169
169
|
if (str.indexOf('npm') > -1) {
|
170
|
-
return `https://
|
170
|
+
return `https://cdn.jsdelivr.net/${str}`;
|
171
171
|
}
|
172
172
|
if (str.indexOf('http') > -1) {
|
173
173
|
return str;
|
package/source/js/_app/page.js
CHANGED
@@ -175,7 +175,7 @@ const postBeauty = function () {
|
|
175
175
|
$dom.each('figure.highlight', function (element) {
|
176
176
|
const code_container = element.child('.code-container');
|
177
177
|
const caption = element.child('figcaption');
|
178
|
-
element.insertAdjacentHTML('beforeend', '<div class="operation"><span class="breakline-btn"><i class="
|
178
|
+
element.insertAdjacentHTML('beforeend', '<div class="operation"><span class="breakline-btn"><i class="ic i-align-left"></i></span><span class="copy-btn"><i class="ic i-clipboard"></i></span><span class="fullscreen-btn"><i class="ic i-expand"></i></span></div>');
|
179
179
|
const copyBtn = element.child('.copy-btn');
|
180
180
|
if (LOCAL.nocopy) {
|
181
181
|
copyBtn.remove();
|
@@ -190,14 +190,14 @@ const postBeauty = function () {
|
|
190
190
|
comma = '\n';
|
191
191
|
});
|
192
192
|
clipBoard(code, function (result) {
|
193
|
-
target.child('.
|
193
|
+
target.child('.ic').className = result ? 'ic i-check' : 'ic i-times';
|
194
194
|
target.blur();
|
195
195
|
showtip(LOCAL.copyright);
|
196
196
|
});
|
197
197
|
}, { passive: true });
|
198
198
|
copyBtn.addEventListener('mouseleave', function (event) {
|
199
199
|
setTimeout(function () {
|
200
|
-
event.target.child('.
|
200
|
+
event.target.child('.ic').className = 'ic i-clipboard';
|
201
201
|
}, 1000);
|
202
202
|
});
|
203
203
|
}
|
@@ -206,11 +206,11 @@ const postBeauty = function () {
|
|
206
206
|
const target = event.currentTarget;
|
207
207
|
if (element.hasClass('breakline')) {
|
208
208
|
element.removeClass('breakline');
|
209
|
-
target.child('.
|
209
|
+
target.child('.ic').className = 'ic i-align-left';
|
210
210
|
}
|
211
211
|
else {
|
212
212
|
element.addClass('breakline');
|
213
|
-
target.child('.
|
213
|
+
target.child('.ic').className = 'ic i-align-justify';
|
214
214
|
}
|
215
215
|
});
|
216
216
|
const fullscreenBtn = element.child('.fullscreen-btn');
|
@@ -218,7 +218,7 @@ const postBeauty = function () {
|
|
218
218
|
element.removeClass('fullscreen');
|
219
219
|
element.scrollTop = 0;
|
220
220
|
BODY.removeClass('fullscreen');
|
221
|
-
fullscreenBtn.child('.
|
221
|
+
fullscreenBtn.child('.ic').className = 'ic i-expand';
|
222
222
|
};
|
223
223
|
const fullscreenHandle = function (event) {
|
224
224
|
const target = event.currentTarget;
|
@@ -234,7 +234,7 @@ const postBeauty = function () {
|
|
234
234
|
else {
|
235
235
|
element.addClass('fullscreen');
|
236
236
|
BODY.addClass('fullscreen');
|
237
|
-
fullscreenBtn.child('.
|
237
|
+
fullscreenBtn.child('.ic').className = 'ic i-compress';
|
238
238
|
if (code_container && code_container.find('tr').length > 15) {
|
239
239
|
const showBtn = code_container.child('.show-btn');
|
240
240
|
code_container.style.maxHeight = '';
|
@@ -246,7 +246,7 @@ const postBeauty = function () {
|
|
246
246
|
caption && caption.addEventListener('click', fullscreenHandle);
|
247
247
|
if (code_container && code_container.find('tr').length > 15) {
|
248
248
|
code_container.style.maxHeight = '300px';
|
249
|
-
code_container.insertAdjacentHTML('beforeend', '<div class="show-btn"><i class="
|
249
|
+
code_container.insertAdjacentHTML('beforeend', '<div class="show-btn"><i class="ic i-angle-down"></i></div>');
|
250
250
|
const showBtn = code_container.child('.show-btn');
|
251
251
|
const hideCode = function () {
|
252
252
|
code_container.style.maxHeight = '300px';
|
@@ -414,7 +414,7 @@ const algoliaSearch = function (pjax) {
|
|
414
414
|
if (!siteSearch) {
|
415
415
|
siteSearch = BODY.createChild('div', {
|
416
416
|
id: 'search',
|
417
|
-
innerHTML: '<div class="inner"><div class="header"><span class="icon"><i class="
|
417
|
+
innerHTML: '<div class="inner"><div class="header"><span class="icon"><i class="ic i-search"></i></span><div class="search-input-container"></div><span class="close-btn"><i class="ic i-times-circle"></i></span></div><div class="results"><div class="inner"><div id="search-stats"></div><div id="search-hits"></div><div id="search-pagination"></div></div></div></div>'
|
418
418
|
});
|
419
419
|
}
|
420
420
|
const search = instantsearch({
|
@@ -459,7 +459,7 @@ const algoliaSearch = function (pjax) {
|
|
459
459
|
container: '#search-hits',
|
460
460
|
templates: {
|
461
461
|
item: function (data) {
|
462
|
-
const cats = data.categories ? '<span>' + data.categories.join('<i class="
|
462
|
+
const cats = data.categories ? '<span>' + data.categories.join('<i class="ic i-angle-right"></i>') + '</span>' : '';
|
463
463
|
return '<a href="' + CONFIG.root + data.path + '">' + cats + data._highlightResult.title.value + '</a>';
|
464
464
|
},
|
465
465
|
empty: function (data) {
|
@@ -478,10 +478,10 @@ const algoliaSearch = function (pjax) {
|
|
478
478
|
showFirst: false,
|
479
479
|
showLast: false,
|
480
480
|
templates: {
|
481
|
-
first: '<i class="
|
482
|
-
last: '<i class="
|
483
|
-
previous: '<i class="
|
484
|
-
next: '<i class="
|
481
|
+
first: '<i class="ic i-angle-double-left"></i>',
|
482
|
+
last: '<i class="ic i-angle-double-right"></i>',
|
483
|
+
previous: '<i class="ic i-angle-left"></i>',
|
484
|
+
next: '<i class="ic i-angle-right"></i>'
|
485
485
|
},
|
486
486
|
cssClasses: {
|
487
487
|
root: 'pagination',
|
@@ -530,7 +530,7 @@ const domInit = function () {
|
|
530
530
|
if (!toolBtn) {
|
531
531
|
toolBtn = siteHeader.createChild('div', {
|
532
532
|
id: 'tool',
|
533
|
-
innerHTML: '<div class="item player"></div><div class="item contents"><i class="
|
533
|
+
innerHTML: '<div class="item player"></div><div class="item contents"><i class="ic i-list-ol"></i></div><div class="item chat"><i class="ic i-comments"></i></div><div class="item back-to-top"><i class="ic i-arrow-up"></i><span>0%</span></div>'
|
534
534
|
});
|
535
535
|
}
|
536
536
|
toolPlayer = toolBtn.child('.player');
|
package/source/js/_app/vue.js
CHANGED
@@ -5,7 +5,7 @@ Vue.createApp({
|
|
5
5
|
methods: {
|
6
6
|
changeThemeByBtn() {
|
7
7
|
let c;
|
8
|
-
const btn = $dom('.theme').child('.
|
8
|
+
const btn = $dom('.theme').child('.ic');
|
9
9
|
const neko = BODY.createChild('div', {
|
10
10
|
id: 'neko',
|
11
11
|
innerHTML: '<div class="planet"><div class="sun"></div><div class="moon"></div></div><div class="body"><div class="face"><section class="eyes left"><span class="pupil"></span></section><section class="eyes right"><span class="pupil"></span></section><span class="nose"></span></div></div>'
|