hexo-theme-shokax 0.4.0-alpha.1 → 0.4.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/_config.yml +5 -4
- package/languages/README.md +22 -0
- package/languages/ar.yml +153 -0
- package/languages/de.yml +153 -0
- package/languages/es.yml +153 -0
- package/languages/fr.yml +153 -0
- package/languages/hi.yml +153 -0
- package/languages/id.yml +153 -0
- package/languages/it.yml +153 -0
- package/languages/ko.yml +153 -0
- package/languages/nl.yml +153 -0
- package/languages/pl.yml +153 -0
- package/languages/pt.yml +153 -0
- package/languages/ru.yml +153 -0
- package/languages/tr.yml +153 -0
- package/languages/vi.yml +153 -0
- package/layout/_mixin/comment.pug +2 -37
- package/layout/_partials/footer.pug +1 -1
- package/layout/_partials/head/head.pug +7 -3
- package/layout/_partials/header.pug +1 -1
- package/layout/_partials/layout.pug +1 -10
- package/layout/_partials/post/footer.pug +0 -9
- package/package.json +8 -2
- package/scripts/generaters/archive.js +1 -1
- package/scripts/generaters/script.js +63 -39
- package/scripts/helpers/asset.js +3 -72
- package/scripts/helpers/list_categories.js +0 -4
- package/scripts/plugin/lib/injects.js +1 -1
- package/source/js/_app/components/comments.ts +60 -0
- package/source/js/_app/components/sidebar.ts +7 -5
- package/source/js/_app/components/tcomments.ts +41 -0
- package/source/js/_app/globals/globalVars.ts +1 -0
- package/source/js/_app/globals/handles.ts +6 -5
- package/source/js/_app/globals/themeColor.ts +1 -1
- package/source/js/_app/globals/thirdparty.ts +1 -1
- package/source/js/_app/globals/tools.ts +3 -2
- package/source/js/_app/library/anime.ts +6 -5
- package/source/js/_app/library/declare.d.ts +25 -9
- package/source/js/_app/library/loadFile.ts +3 -1
- package/source/js/_app/library/proto.ts +75 -77
- package/source/js/_app/library/vue.ts +38 -48
- package/source/js/_app/page/fancybox.ts +2 -1
- package/source/js/_app/page/post.ts +4 -3
- package/source/js/_app/page/search.ts +17 -11
- package/source/js/_app/page/tab.ts +3 -2
- package/source/js/_app/pjax/domInit.ts +5 -4
- package/source/js/_app/pjax/refresh.ts +20 -2
- package/source/js/_app/pjax/siteInit.ts +12 -7
- package/source/js/_app/player.ts +16 -15
- package/scripts/filters/locals.d.ts +0 -1
- package/scripts/filters/locals.ts +0 -59
- package/scripts/filters/post.d.ts +0 -0
- package/scripts/filters/post.ts +0 -6
- package/scripts/generaters/archive.d.ts +0 -1
- package/scripts/generaters/archive.ts +0 -144
- package/scripts/generaters/config.d.ts +0 -1
- package/scripts/generaters/config.ts +0 -52
- package/scripts/generaters/images.d.ts +0 -1
- package/scripts/generaters/images.ts +0 -26
- package/scripts/generaters/index.d.ts +0 -1
- package/scripts/generaters/index.ts +0 -110
- package/scripts/generaters/pages.d.ts +0 -0
- package/scripts/generaters/pages.ts +0 -16
- package/scripts/generaters/script.d.ts +0 -1
- package/scripts/generaters/script.ts +0 -110
- package/scripts/helpers/asset.d.ts +0 -1
- package/scripts/helpers/asset.ts +0 -158
- package/scripts/helpers/engine.d.ts +0 -1
- package/scripts/helpers/engine.ts +0 -171
- package/scripts/helpers/list_categories.d.ts +0 -1
- package/scripts/helpers/list_categories.ts +0 -104
- package/scripts/helpers/summary_ai.d.ts +0 -1
- package/scripts/helpers/summary_ai.ts +0 -100
- package/scripts/helpers/symbols_count_time.d.ts +0 -1
- package/scripts/helpers/symbols_count_time.ts +0 -76
- package/scripts/plugin/check.d.ts +0 -1
- package/scripts/plugin/check.ts +0 -35
- package/scripts/plugin/index.d.ts +0 -6
- package/scripts/plugin/index.ts +0 -52
- package/scripts/plugin/lib/injects-point.d.ts +0 -5
- package/scripts/plugin/lib/injects-point.ts +0 -20
- package/scripts/plugin/lib/injects.d.ts +0 -2
- package/scripts/plugin/lib/injects.ts +0 -101
- package/scripts/tags/links.d.ts +0 -1
- package/scripts/tags/links.ts +0 -75
- package/scripts/tags/media.d.ts +0 -1
- package/scripts/tags/media.ts +0 -19
- package/source/assets/beian.webp +0 -0
- package/source/js/_app/library/libtype.d.ts +0 -4
package/scripts/tags/links.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/scripts/tags/links.ts
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
import fs from 'node:fs'
|
2
|
-
import path from 'node:path'
|
3
|
-
import yaml from 'js-yaml'
|
4
|
-
|
5
|
-
/*
|
6
|
-
{% links %}
|
7
|
-
- site: #main title
|
8
|
-
owner: #alternate title for image tooltip (nullable)
|
9
|
-
url: #link of site
|
10
|
-
desc: #description (nullable)
|
11
|
-
image: #icon image (nullable)
|
12
|
-
color: #block color (nullable)
|
13
|
-
{% endlinks %}
|
14
|
-
|
15
|
-
{% linksfile [path] %}
|
16
|
-
*/
|
17
|
-
|
18
|
-
interface siteLink {
|
19
|
-
site: string
|
20
|
-
owner?: string
|
21
|
-
url: string
|
22
|
-
desc?: string
|
23
|
-
image?: string
|
24
|
-
color?: string
|
25
|
-
}
|
26
|
-
|
27
|
-
function linkGrid (args:string[], content:string) {
|
28
|
-
const theme = hexo.theme.config as any
|
29
|
-
|
30
|
-
if (!args[0] && !content) {
|
31
|
-
return
|
32
|
-
}
|
33
|
-
|
34
|
-
if (args[0]) {
|
35
|
-
const filepath = path.join(hexo.source_dir, args[0])
|
36
|
-
if (fs.existsSync(filepath)) {
|
37
|
-
content = fs.readFileSync(filepath, { encoding: 'utf-8' })
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
if (!content) {
|
42
|
-
return
|
43
|
-
}
|
44
|
-
|
45
|
-
const list = yaml.load(content) as Array<siteLink>
|
46
|
-
|
47
|
-
let result = ''
|
48
|
-
|
49
|
-
list.forEach((item) => {
|
50
|
-
if (!item.url || !item.site) {
|
51
|
-
return
|
52
|
-
}
|
53
|
-
|
54
|
-
let item_image = item.image || theme.assets + '/404.png'
|
55
|
-
|
56
|
-
if (!item_image.startsWith('//') && !item_image.startsWith('http')) {
|
57
|
-
item_image = theme.statics + item_image
|
58
|
-
}
|
59
|
-
|
60
|
-
item.color = item.color ? ` style="--block-color:${item.color};"` : ''
|
61
|
-
|
62
|
-
result += `<div class="item" title="${item.owner || item.site}"${item.color}>`
|
63
|
-
|
64
|
-
result += `<a href="${item.url}" class="image" data-background-image="${item_image}"></a>
|
65
|
-
<div class="info">
|
66
|
-
<a href="${item.url}" class="title">${item.site}</a>
|
67
|
-
<p class="desc">${item.desc || item.url}</p>
|
68
|
-
</div></div>`
|
69
|
-
})
|
70
|
-
|
71
|
-
return `<div class="links">${result}</div>`
|
72
|
-
}
|
73
|
-
|
74
|
-
hexo.extend.tag.register('links', linkGrid, { ends: true })
|
75
|
-
hexo.extend.tag.register('linksfile', linkGrid, { ends: false, async: true })
|
package/scripts/tags/media.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/scripts/tags/media.ts
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
'use strict'
|
2
|
-
/* global hexo */
|
3
|
-
import yaml from 'js-yaml'
|
4
|
-
|
5
|
-
function postMedia (args, content) {
|
6
|
-
if (!args[0] || !content) {
|
7
|
-
return
|
8
|
-
}
|
9
|
-
const list = yaml.load(content)
|
10
|
-
switch (args[0]) {
|
11
|
-
case 'video':
|
12
|
-
case 'audio':
|
13
|
-
return `<div class="media-container"><div class="player" data-type="${args[0]}" data-src='${JSON.stringify(list)}'></div></div>`
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
hexo.extend.tag.register('media', postMedia, { ends: true })
|
18
|
-
|
19
|
-
// return `<video src="${args}" preload="metadata" controls playsinline poster="">Sorry, your browser does not support the video tag.</video>`;
|
package/source/assets/beian.webp
DELETED
Binary file
|