hexo-theme-shokax 0.0.7 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/_config.yml +1 -0
- package/layout/_alternate/atom.ejs +1 -1
- package/layout/_alternate/json.ejs +1 -1
- package/layout/_alternate/rss.ejs +1 -1
- package/layout/_mixin/comment.pug +12 -5
- package/layout/_partials/post/post.pug +1 -1
- package/layout/_partials/post/reward.pug +1 -1
- package/layout/category.pug +1 -0
- package/layout/page.pug +1 -1
- package/package.json +1 -1
- package/scripts/helpers/asset.js +1 -1
- package/scripts/tags/links.js +1 -1
- package/source/css/_common/components/pages/pages.styl +1 -1
- package/source/css/_common/components/tags/player.styl +2 -2
- package/source/css/_common/components/third-party/search.styl +2 -2
- package/source/js/_app/page.js +1 -1
package/README.md
CHANGED
package/_config.yml
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<id><%= config.url %></id>
|
4
4
|
<title><%= config.title %></title>
|
5
5
|
<subtitle><%= config.subtitle %></subtitle>
|
6
|
-
<icon><%= full_url_for('/
|
6
|
+
<icon><%= full_url_for('/assets/favicon.ico') %></icon>
|
7
7
|
<link href="<%= config.url %>" />
|
8
8
|
<author>
|
9
9
|
<name><%= config.author %></name>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
version: 'https://jsonfeed.org/version/1',
|
3
3
|
title: config.title,
|
4
4
|
subtitle: config.subtitle,
|
5
|
-
icon: full_url_for('/
|
5
|
+
icon: full_url_for('/assets/favicon.ico'),
|
6
6
|
description: config.description,
|
7
7
|
home_page_url: config.url,
|
8
8
|
items: posts.map(post => ({
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<channel>
|
4
4
|
<title><%= config.title %></title>
|
5
5
|
<subtitle><%= config.subtitle %></subtitle>
|
6
|
-
<icon><%= full_url_for('/
|
6
|
+
<icon><%= full_url_for('/assets/favicon.ico') %></icon>
|
7
7
|
<link><%= config.url %></link>
|
8
8
|
<author>
|
9
9
|
<name><%= config.author %></name>
|
@@ -14,20 +14,27 @@ mixin CommentRender()
|
|
14
14
|
}, 1000)
|
15
15
|
else if wl
|
16
16
|
div(class="warp" id="wcomments")
|
17
|
+
- var locale = JSON.stringify(theme.waline.locale)
|
18
|
+
- var emoji = JSON.stringify(theme.waline.emoji)
|
19
|
+
- var meta = JSON.stringify(theme.waline.meta)
|
20
|
+
- var requiredMeta = JSON.stringify(theme.waline.requiredMeta)
|
17
21
|
script(type="module" data-pjax).
|
18
22
|
import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs';
|
19
23
|
|
24
|
+
var path = document.getElementById("twikoo_visitors").getAttribute("data-path");
|
20
25
|
setTimeout(function () {
|
21
26
|
init({
|
22
27
|
el: '#wcomments',
|
23
28
|
serverURL: '#{hexo.theme.config.waline.serverURL}',
|
24
29
|
lang: '#{hexo.theme.config.waline.lang}',
|
25
|
-
locale:
|
26
|
-
emoji:
|
27
|
-
meta:
|
28
|
-
requiredMeta:
|
30
|
+
locale: !{locale},
|
31
|
+
emoji: !{emoji},
|
32
|
+
meta: !{meta},
|
33
|
+
requiredMeta: !{requiredMeta},
|
29
34
|
wordLimit: #{hexo.theme.config.waline.wordLimit},
|
30
|
-
pageSize: #{hexo.theme.config.waline.pageSize}
|
35
|
+
pageSize: #{hexo.theme.config.waline.pageSize},
|
36
|
+
pageview: #{theme.waline.pageview},
|
37
|
+
path: path
|
31
38
|
});
|
32
39
|
}, 1000)
|
33
40
|
else if gt
|
@@ -2,7 +2,7 @@
|
|
2
2
|
article(itemscope itemtype="http://schema.org/Article" class="post block" lang=temp)
|
3
3
|
link(itemprop="mainEntityOfPage" href!=post.permalink)
|
4
4
|
span(hidden itemprop="author" itemscope itemtype="http://schema.org/Person")
|
5
|
-
meta(itemprop="image" content=url_for(theme.statics + theme.
|
5
|
+
meta(itemprop="image" content=url_for(theme.statics + theme.assets + '/' + theme.sidebar.avatar))
|
6
6
|
meta(itemprop="name" content=author)
|
7
7
|
meta(itemprop="description" content=`${ subtitle }, ${ description }`)
|
8
8
|
span(hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization")
|
@@ -13,6 +13,6 @@ if page.reward !== false
|
|
13
13
|
else
|
14
14
|
- var translation = name
|
15
15
|
div
|
16
|
-
img(data-src=`${url_for(theme.statics + theme.
|
16
|
+
img(data-src=`${url_for(theme.statics + theme.assets + image) }` alt=`${ author } ${ translation }`)
|
17
17
|
p
|
18
18
|
!= translation
|
package/layout/category.pug
CHANGED
package/layout/page.pug
CHANGED
@@ -27,7 +27,6 @@ block header
|
|
27
27
|
!= __('title.not_found')
|
28
28
|
else
|
29
29
|
!= page.title
|
30
|
-
!= "|"
|
31
30
|
|
32
31
|
block content
|
33
32
|
if page.type === 'categories'
|
@@ -37,6 +36,7 @@ block content
|
|
37
36
|
!= __('menu.home')
|
38
37
|
small
|
39
38
|
!= _p('counter.categories', site.categories.length)
|
39
|
+
!= _list_categories(3)
|
40
40
|
else if page.type === 'tags'
|
41
41
|
div(class="collapse wrap")
|
42
42
|
h2(class="item title")
|
package/package.json
CHANGED
package/scripts/helpers/asset.js
CHANGED
@@ -38,7 +38,7 @@ hexo.extend.helper.register('_new_comments', function (mode) {
|
|
38
38
|
</script>`
|
39
39
|
} else if (mode === 'waline') {
|
40
40
|
return `
|
41
|
-
<script type="module">
|
41
|
+
<script type="module" data-pjax>
|
42
42
|
import { RecentComments } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs'
|
43
43
|
RecentComments({
|
44
44
|
el: '#new-comment',
|
package/scripts/tags/links.js
CHANGED
@@ -53,7 +53,7 @@ function linkGrid (args, content) {
|
|
53
53
|
urlparam = new URL(item.url)
|
54
54
|
}
|
55
55
|
|
56
|
-
let item_image = item.image || theme.
|
56
|
+
let item_image = item.image || theme.assets + '/404.png'
|
57
57
|
|
58
58
|
if (!item_image.startsWith('//') && !item_image.startsWith('http')) {
|
59
59
|
item_image = theme.statics + item_image
|
@@ -303,7 +303,7 @@
|
|
303
303
|
content: "";
|
304
304
|
position: absolute;
|
305
305
|
z-index: 1;
|
306
|
-
background: url("../
|
306
|
+
background: url("../assets/play_needle.png") no-repeat center/contain;
|
307
307
|
width: 3.4375rem;
|
308
308
|
height: 5.1875rem;
|
309
309
|
top: -1.5625rem;
|
@@ -322,7 +322,7 @@
|
|
322
322
|
&::after {
|
323
323
|
content: "";
|
324
324
|
position: absolute;
|
325
|
-
background: url("../
|
325
|
+
background: url("../assets/play_disc.png") no-repeat center/contain;
|
326
326
|
z-index: 1;
|
327
327
|
width: 100%;
|
328
328
|
height: 100%;
|
@@ -71,7 +71,7 @@
|
|
71
71
|
padding: 1.875rem 1.875rem .3125rem;
|
72
72
|
border-radius: .3125rem;
|
73
73
|
|
74
|
-
background: var(--grey-1-a7) url(../
|
74
|
+
background: var(--grey-1-a7) url(../assets/search.png) no-repeat bottom right;
|
75
75
|
|
76
76
|
color: var(--text-color);
|
77
77
|
|
@@ -91,7 +91,7 @@
|
|
91
91
|
|
92
92
|
.algolia-powered {
|
93
93
|
float: right;
|
94
|
-
background: url('../
|
94
|
+
background: url('../assets/algolia_logo.svg') no-repeat;
|
95
95
|
display: inline-block;
|
96
96
|
height: 1.125rem;
|
97
97
|
width: 4.25rem;
|
package/source/js/_app/page.js
CHANGED