@jx3box/jx3box-ui 2.0.4 → 2.0.6
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/.storybook/main.js +208 -0
- package/.storybook/preview.js +93 -0
- package/.storybook/storybookMocks.js +191 -0
- package/README.md +29 -82
- package/assets/css/bread/admin.less +20 -2
- package/assets/css/bread/breadcrumb.less +5 -2
- package/assets/css/comment/quick-reply.less +1 -1
- package/assets/css/common/left-sidebar.less +1 -1
- package/assets/css/interact/like2.less +5 -2
- package/assets/css/single/author.less +15 -10
- package/assets/css/single/cms-single.less +1 -0
- package/assets/css/single/thx.less +34 -11
- package/assets/data/nav.json +344 -10
- package/assets/img/comment/comment.svg +1 -1
- package/assets/img/comment/heart_1.svg +1 -1
- package/assets/img/comment/hide.svg +1 -1
- package/assets/img/leftsidebar/medal.svg +1 -1
- package/assets/img/leftsidebar/post.svg +27 -46
- package/i18n/messages/en-US.js +357 -22
- package/i18n/messages/vi.js +350 -22
- package/i18n/messages/zh-CN.js +469 -20
- package/i18n/messages/zh-TW.js +350 -22
- package/index.js +19 -7
- package/package.json +15 -5
- package/service/cms.js +22 -0
- package/service/commit-history.js +18 -0
- package/service/community.js +60 -0
- package/service/fav.js +5 -6
- package/src/App.vue +154 -80
- package/src/Breadcrumb.vue +24 -11
- package/src/CommonFooter.vue +4 -4
- package/src/Footer.vue +13 -5
- package/src/LeftSideToggle.vue +10 -3
- package/src/LeftSidebar.vue +19 -5
- package/src/Main.vue +9 -2
- package/src/RightSidebar.vue +12 -3
- package/src/SuspendCommon.vue +52 -38
- package/src/author/AuthorFans.vue +7 -5
- package/src/author/AuthorFollow.vue +14 -7
- package/src/author/AuthorGift.vue +25 -17
- package/src/author/AuthorInfo.vue +46 -19
- package/src/author/AuthorLink.vue +3 -1
- package/src/author/AuthorMedals.vue +5 -2
- package/src/author/AuthorPosts.vue +31 -13
- package/src/author/AuthorRss.vue +7 -3
- package/src/author/AuthorTeams.vue +3 -1
- package/src/author/UserPop.vue +29 -17
- package/src/bread/Admin.vue +55 -32
- package/src/bread/AdminDirectMessage.vue +15 -8
- package/src/bread/AdminDrop.vue +124 -45
- package/src/bread/CommunityAdmin.vue +527 -0
- package/src/bread/DesignTask.vue +30 -26
- package/src/bread/ListAdmin.vue +199 -0
- package/src/bread/MigrateCommunity.vue +192 -0
- package/src/bread/MoveToCommunityDialog.vue +234 -0
- package/src/comment/Avatar.vue +18 -24
- package/src/comment/CommentContent.vue +57 -37
- package/src/comment/CommentContentSimple.vue +61 -63
- package/src/comment/CommentInputForm.vue +45 -34
- package/src/comment/CommentWithReply.vue +9 -6
- package/src/comment/QuickReply.vue +5 -1
- package/src/comment/ReplyForReply.vue +6 -4
- package/src/comment/ReplyList.vue +28 -18
- package/src/comment/Upload.vue +24 -6
- package/src/filters/clientBy.vue +10 -8
- package/src/filters/markBy.vue +35 -31
- package/src/filters/menuBy.vue +20 -22
- package/src/filters/orderBy.vue +17 -11
- package/src/filters/tagBy.vue +4 -2
- package/src/filters/topicBy.vue +12 -10
- package/src/filters/versionBy.vue +5 -3
- package/src/filters/zlpBy.vue +29 -25
- package/src/footer/copyright.vue +5 -5
- package/src/footer/links.vue +2 -2
- package/src/footer/official.vue +1 -1
- package/src/footer/resource.vue +41 -8
- package/src/header/alternate.vue +35 -18
- package/src/header/asset.vue +9 -19
- package/src/header/box.vue +20 -8
- package/src/header/box2.vue +25 -13
- package/src/header/client.vue +7 -7
- package/src/header/lang.vue +41 -6
- package/src/header/logo.vue +2 -3
- package/src/header/manage.vue +2 -2
- package/src/header/message.vue +3 -3
- package/src/header/nav.vue +26 -23
- package/src/header/publish.vue +2 -2
- package/src/header/search.vue +2 -2
- package/src/header/shop.vue +2 -2
- package/src/header/user.vue +4 -4
- package/src/header/userInfo.vue +22 -24
- package/src/header/vip.vue +2 -2
- package/src/interact/BoxcoinAdmin.vue +30 -16
- package/src/interact/BoxcoinRecords.vue +28 -11
- package/src/interact/BoxcoinUser.vue +33 -17
- package/src/interact/Fav.vue +5 -1
- package/src/interact/Homework.vue +318 -0
- package/src/interact/Like.vue +4 -2
- package/src/interact/Rss.vue +10 -4
- package/src/interact/Share.vue +18 -19
- package/src/interact/WatchLater.vue +5 -1
- package/src/main.js +1 -0
- package/src/single/Author.vue +5 -1
- package/src/single/CmsSingle.vue +29 -15
- package/src/single/Collection.vue +36 -26
- package/src/single/Comment.vue +19 -13
- package/src/single/Creators.vue +5 -3
- package/src/single/PostCollection.vue +158 -0
- package/src/single/PostDirectory.vue +0 -126
- package/src/single/PostGuide.vue +93 -0
- package/src/single/PostHeader.vue +39 -17
- package/src/single/PostTopic.vue +3 -3
- package/src/single/PostVersion.vue +219 -0
- package/src/single/RightAffix.vue +160 -0
- package/src/single/SimpleThx.vue +4 -2
- package/src/single/Thx.vue +14 -2
- package/src/single/VersionDialog.vue +238 -0
- package/src/stories/components/StoryPropsTable.vue +137 -0
- package/src/stories/filters/FilterGallery.stories.js +110 -0
- package/src/stories/filters/clientBy.stories.js +24 -0
- package/src/stories/filters/markBy.stories.js +6 -0
- package/src/stories/filters/menuBy.stories.js +6 -0
- package/src/stories/filters/orderBy.stories.js +6 -0
- package/src/stories/filters/tagBy.stories.js +6 -0
- package/src/stories/filters/topicBy.stories.js +6 -0
- package/src/stories/filters/versionBy.stories.js +6 -0
- package/src/stories/filters/zlpBy.stories.js +6 -0
- package/src/stories/layout/BaseShell.stories.js +38 -0
- package/src/stories/layout/Breadcrumb.stories.js +40 -0
- package/src/stories/layout/CommonFooter.stories.js +22 -0
- package/src/stories/layout/CommonHeader.stories.js +39 -0
- package/src/stories/layout/LeftSideToggle.stories.js +78 -0
- package/src/stories/layout/LeftSidebar.stories.js +40 -0
- package/src/stories/layout/Main.stories.js +41 -0
- package/src/stories/layout/RightSidebar.stories.js +36 -0
- package/src/stories/layout/StorybookShell.vue +271 -0
- package/src/stories/layout/SuspendCommon.stories.js +67 -0
- package/src/stories/layout/SuspendCommonStage.vue +143 -0
- package/src/stories/mockData.js +275 -0
- package/src/stories/other/UserPop.stories.js +51 -0
- package/src/stories/single/Author.stories.js +19 -0
- package/src/stories/single/AuthorStoryStage.vue +103 -0
- package/src/stories/single/CmsSingle.stories.js +19 -0
- package/src/stories/single/CmsSingleStoryStage.vue +118 -0
- package/src/stories/single/Collection.stories.js +34 -0
- package/src/stories/single/Comment.stories.js +36 -0
- package/src/stories/single/Creators.stories.js +34 -0
- package/src/stories/single/PostCollection.stories.js +34 -0
- package/src/stories/single/PostDirectory.stories.js +31 -0
- package/src/stories/single/PostGuide.stories.js +47 -0
- package/src/stories/single/PostHeader.stories.js +39 -0
- package/src/stories/single/PostVersion.stories.js +41 -0
- package/src/stories/single/RightAffix.stories.js +84 -0
- package/src/stories/single/SimpleThx.stories.js +39 -0
- package/src/stories/single/SingleGallery.stories.js +207 -0
- package/src/stories/single/Thx.stories.js +38 -0
- package/vue.config.js +2 -12
- package/assets/css/common/bottom.less +0 -25
- package/assets/css/editor/article.less +0 -36
- package/assets/css/editor/combo.less +0 -362
- package/assets/css/editor/resource.less +0 -399
- package/assets/css/editor/tinymce.less +0 -100
- package/assets/css/editor/upload.less +0 -136
- package/assets/css/module/author.less +0 -231
- package/assets/css/module/buff.less +0 -88
- package/assets/css/module/directory.less +0 -165
- package/assets/css/module/icon.less +0 -25
- package/assets/css/module/item.less +0 -279
- package/assets/css/module/item_simple.less +0 -58
- package/assets/css/module/jx3_element.less +0 -5
- package/assets/css/module/macro.less +0 -89
- package/assets/css/module/npc.less +0 -265
- package/assets/css/module/resource.less +0 -93
- package/assets/css/module/skill.less +0 -74
- package/assets/css/module/talent.less +0 -495
- package/assets/js/a.js +0 -46
- package/assets/js/code.js +0 -13
- package/assets/js/combo.js +0 -40
- package/assets/js/directory.js +0 -114
- package/assets/js/filter2.js +0 -186
- package/assets/js/fold.js +0 -11
- package/assets/js/gallery.js +0 -14
- package/assets/js/hljs_languages.js +0 -177
- package/assets/js/iframe.js +0 -38
- package/assets/js/img.js +0 -23
- package/assets/js/item/attribute_percent.js +0 -88
- package/assets/js/item/bind.js +0 -18
- package/assets/js/item/border.js +0 -19
- package/assets/js/item/border_quest.js +0 -12
- package/assets/js/item/color.js +0 -25
- package/assets/js/item/hljs_languages.js +0 -177
- package/assets/js/item/icon_url.js +0 -15
- package/assets/js/item/second_format.js +0 -19
- package/assets/js/jx3_element.js +0 -73
- package/assets/js/katex.js +0 -181
- package/assets/js/macro.js +0 -16
- package/assets/js/nextpage.js +0 -4
- package/assets/js/pswp.js +0 -67
- package/assets/js/pswp_template.js +0 -66
- package/assets/js/pz_iframe.js +0 -30
- package/assets/js/qixue.js +0 -28
- package/assets/js/renderImgPreview.js +0 -18
- package/assets/js/script.js +0 -6
- package/assets/js/stat.js +0 -107
- package/assets/js/talent2.js +0 -21
- package/assets/js/tex-mml-chtml.js +0 -36310
- package/assets/js/voice.js +0 -238
- package/assets/js/xss.js +0 -130
- package/src/editor/Article.vue +0 -230
- package/src/editor/BoxResource.vue +0 -441
- package/src/editor/Resource.vue +0 -623
- package/src/editor/Tinymce.vue +0 -204
- package/src/editor/Upload.vue +0 -277
- package/src/editor/UploadAlum.vue +0 -176
- package/src/editor/UploadBanner.vue +0 -156
- package/src/editor/components/Author.vue +0 -322
- package/src/editor/components/Avatar.vue +0 -95
- package/src/editor/components/Buff.vue +0 -80
- package/src/editor/components/Combo.vue +0 -259
- package/src/editor/components/Equip.vue +0 -299
- package/src/editor/components/GameText.vue +0 -242
- package/src/editor/components/Item.vue +0 -325
- package/src/editor/components/ItemSimple.vue +0 -134
- package/src/editor/components/Medal.vue +0 -43
- package/src/editor/components/Npc.vue +0 -215
- package/src/editor/components/PostAuthor.vue +0 -102
- package/src/editor/components/Skill.vue +0 -71
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* attribute_percent
|
|
3
|
-
* @param {*} type 物品属性类型
|
|
4
|
-
* @param {*} value 物品属性值
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export default (type, value) => {
|
|
8
|
-
let label = '';
|
|
9
|
-
value = value ? parseInt(value) : 0;
|
|
10
|
-
switch (type) {
|
|
11
|
-
case 'atAllTypeCriticalStrike':
|
|
12
|
-
case 'atLunarCriticalStrike':
|
|
13
|
-
case 'atMagicCriticalStrike':
|
|
14
|
-
case 'atNeutralCriticalStrike':
|
|
15
|
-
case 'atPhysicsCriticalStrike':
|
|
16
|
-
case 'atPoisonCriticalStrike':
|
|
17
|
-
case 'atSolarAndLunarCriticalStrike':
|
|
18
|
-
case 'atSolarCriticalStrike':
|
|
19
|
-
label = `+${(value / 35737.5 * 100).toFixed(2)}%`;
|
|
20
|
-
break;
|
|
21
|
-
case 'atAllTypeCriticalDamagePowerBase':
|
|
22
|
-
case 'atLunarCriticalDamagePowerBase':
|
|
23
|
-
case 'atMagicCriticalDamagePowerBase':
|
|
24
|
-
case 'atNeutralCriticalDamagePowerBase':
|
|
25
|
-
case 'atPhysicsCriticalDamagePowerBase':
|
|
26
|
-
case 'atPoisonCriticalDamagePowerBase':
|
|
27
|
-
case 'atSolarAndLunarCriticalDamagePowerBase':
|
|
28
|
-
case 'atSolarCriticalDamagePowerBase':
|
|
29
|
-
label = `+${(value / 12506.25 * 100).toFixed(2)}%`;
|
|
30
|
-
break;
|
|
31
|
-
case 'atToughnessBase':
|
|
32
|
-
label = `+${(value / 35737.5 * 100).toFixed(2)}% +${(value / 9588.75 * 100).toFixed(2)}%会心减害`;
|
|
33
|
-
break;
|
|
34
|
-
// 化劲
|
|
35
|
-
case 'atDecriticalDamagePowerBase':
|
|
36
|
-
label = '';// `+${(value / (5175 + value) * 100).toFixed(2)}%`;
|
|
37
|
-
break;
|
|
38
|
-
case 'atAllTypeHitValue':
|
|
39
|
-
case 'atLunarHitValue':
|
|
40
|
-
case 'atMagicHitValue':
|
|
41
|
-
case 'atNeutralHitValue':
|
|
42
|
-
case 'atPhysicsHitValue':
|
|
43
|
-
case 'atPoisonHitValue':
|
|
44
|
-
case 'atSolarAndLunarHitValue':
|
|
45
|
-
case 'atSolarHitValue':
|
|
46
|
-
label = `+${(value / 25991.25 * 100).toFixed(2)}%`;
|
|
47
|
-
break;
|
|
48
|
-
// 闪避
|
|
49
|
-
case 'atDodge':
|
|
50
|
-
label = '';// `+${(value / (17355 + value) * 100).toFixed(2)}%`;
|
|
51
|
-
break;
|
|
52
|
-
// 招架
|
|
53
|
-
case 'atParryBase':
|
|
54
|
-
label = '';// `+${(value / (16293.75 + value) * 100).toFixed(2)}%`;
|
|
55
|
-
break;
|
|
56
|
-
case 'atStrainBase':
|
|
57
|
-
label = `+${(value / 34458.75 * 100).toFixed(2)}%`;
|
|
58
|
-
break;
|
|
59
|
-
case 'atPhysicsDefenceAdd':
|
|
60
|
-
case 'atPhysicsShieldAdditional':
|
|
61
|
-
case 'atPhysicsShieldBase':
|
|
62
|
-
label = '';// `+${(value / (19091.25 + value) * 100).toFixed(2)}%`;
|
|
63
|
-
break;
|
|
64
|
-
case 'atLunarMagicShieldBase':
|
|
65
|
-
case 'atMagicShield':
|
|
66
|
-
case 'atNeutralMagicShieldBase':
|
|
67
|
-
case 'atPoisonMagicShieldBase':
|
|
68
|
-
case 'atSolarMagicShieldBase':
|
|
69
|
-
label = '';// `+${(value / (19091.25 + value) * 100).toFixed(2)}%`;
|
|
70
|
-
break;
|
|
71
|
-
case 'atLunarOvercomeBase':
|
|
72
|
-
case 'atMagicOvercome':
|
|
73
|
-
case 'atNeutralOvercomeBase':
|
|
74
|
-
case 'atPhysicsOvercomeBase':
|
|
75
|
-
case 'atPoisonOvercomeBase':
|
|
76
|
-
case 'atSolarAndLunarOvercomeBase':
|
|
77
|
-
case 'atSolarOvercomeBase':
|
|
78
|
-
label = `+${(value / 35737.5 * 100).toFixed(2)}%`;
|
|
79
|
-
break;
|
|
80
|
-
case 'atHasteBase':
|
|
81
|
-
label = `+${(value / 43856.25 * 100).toFixed(2)}%`;
|
|
82
|
-
break;
|
|
83
|
-
default:
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
return label ? ` (${label})` : '';
|
|
87
|
-
}
|
|
88
|
-
|
package/assets/js/item/bind.js
DELETED
package/assets/js/item/border.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* border
|
|
3
|
-
* @param {*} item 物品对象
|
|
4
|
-
*/
|
|
5
|
-
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
6
|
-
const { __imgPath } = JX3BOX;
|
|
7
|
-
|
|
8
|
-
export default (item) => {
|
|
9
|
-
switch (item.Quality) {
|
|
10
|
-
case 3:
|
|
11
|
-
return `url(${__imgPath}image/item/blue.png)`;
|
|
12
|
-
case 4:
|
|
13
|
-
return `url(${__imgPath}image/item/purple.png)`;
|
|
14
|
-
case 5:
|
|
15
|
-
return `url(${__imgPath}image/item/orange.gif)`;
|
|
16
|
-
default:
|
|
17
|
-
return "";
|
|
18
|
-
}
|
|
19
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* border_quest
|
|
3
|
-
* @param {*} item 物品对象
|
|
4
|
-
*/
|
|
5
|
-
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
6
|
-
const { __imgPath } = JX3BOX;
|
|
7
|
-
|
|
8
|
-
export default (item) => {
|
|
9
|
-
if (item.IsQuest > 0) return `url(${__imgPath}image/item/renwu.png)`;
|
|
10
|
-
return '';
|
|
11
|
-
}
|
|
12
|
-
|
package/assets/js/item/color.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 品质 转 颜色
|
|
3
|
-
*
|
|
4
|
-
* @param {*} quality
|
|
5
|
-
*/
|
|
6
|
-
export default (quality) => {
|
|
7
|
-
quality = parseInt(quality);
|
|
8
|
-
switch (quality) {
|
|
9
|
-
case 0:
|
|
10
|
-
return 'rgb(167,167,167)';
|
|
11
|
-
case 1:
|
|
12
|
-
return 'rgb(255,255,255)';
|
|
13
|
-
case 2:
|
|
14
|
-
return 'rgb(0,210,75)';
|
|
15
|
-
case 3 :
|
|
16
|
-
return 'rgb(0,126,255)';
|
|
17
|
-
case 4:
|
|
18
|
-
return 'rgb(254,45,254)';
|
|
19
|
-
case 5:
|
|
20
|
-
return 'rgb(255,165,0)';
|
|
21
|
-
default:
|
|
22
|
-
return 'rgb(167,167,167)'
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* highlight.js 默认支持(不需要额外装库)的语法
|
|
3
|
-
* https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
// 不加参数时默认的
|
|
8
|
-
{ text: "JSON", value: "json" },
|
|
9
|
-
{ text: "Lua", value: "lua" },
|
|
10
|
-
{ text: "HTML, XML", value: "xml" },
|
|
11
|
-
{ text: "Bash", value: "bash" },
|
|
12
|
-
{ text: "JavaScript", value: "javascript" },
|
|
13
|
-
{ text: "Python", value: "python" },
|
|
14
|
-
{ text: "Java", value: "java" },
|
|
15
|
-
{ text: "C", value: "c" },
|
|
16
|
-
{ text: "C#", value: "csharp" },
|
|
17
|
-
{ text: "C++", value: "cpp" },
|
|
18
|
-
|
|
19
|
-
// 其他支持的
|
|
20
|
-
{ text: "1C", value: "1c" },
|
|
21
|
-
{ text: "ABNF", value: "abnf" },
|
|
22
|
-
{ text: "Access logs", value: "accesslog" },
|
|
23
|
-
{ text: "Ada", value: "ada" },
|
|
24
|
-
{ text: "Arduino (C++ w/Arduino libs)", value: "arduino" },
|
|
25
|
-
{ text: "ARM assembler", value: "armasm" },
|
|
26
|
-
{ text: "AVR assembler", value: "avrasm" },
|
|
27
|
-
{ text: "ActionScript", value: "actionscript" },
|
|
28
|
-
{ text: "AngelScript", value: "angelscript" },
|
|
29
|
-
{ text: "Apache", value: "apache" },
|
|
30
|
-
{ text: "AppleScript", value: "applescript" },
|
|
31
|
-
{ text: "Arcade", value: "arcade" },
|
|
32
|
-
{ text: "AsciiDoc", value: "asciidoc" },
|
|
33
|
-
{ text: "AspectJ", value: "aspectj" },
|
|
34
|
-
{ text: "AutoHotkey", value: "autohotkey" },
|
|
35
|
-
{ text: "AutoIt", value: "autoit" },
|
|
36
|
-
{ text: "Awk", value: "awk" },
|
|
37
|
-
{ text: "Basic", value: "basic" },
|
|
38
|
-
{ text: "BNF", value: "bnf" },
|
|
39
|
-
{ text: "Brainfuck", value: "brainfuck" },
|
|
40
|
-
{ text: "C/AL", value: "cal" },
|
|
41
|
-
{ text: "Cache Object Script", value: "cos" },
|
|
42
|
-
{ text: "CMake", value: "cmake" },
|
|
43
|
-
{ text: "Coq", value: "coq" },
|
|
44
|
-
{ text: "CSP", value: "csp" },
|
|
45
|
-
{ text: "CSS", value: "css" },
|
|
46
|
-
{ text: "Cap’n Proto", value: "capnproto" },
|
|
47
|
-
{ text: "Clojure", value: "clojure" },
|
|
48
|
-
{ text: "CoffeeScript", value: "coffeescript" },
|
|
49
|
-
{ text: "Crmsh", value: "crmsh" },
|
|
50
|
-
{ text: "Crystal", value: "crystal" },
|
|
51
|
-
{ text: "D", value: "d" },
|
|
52
|
-
{ text: "Dart", value: "dart" },
|
|
53
|
-
{ text: "Delphi", value: "dpr" },
|
|
54
|
-
{ text: "Diff", value: "diff" },
|
|
55
|
-
{ text: "Django", value: "django" },
|
|
56
|
-
{ text: "DNS Zone file", value: "dns" },
|
|
57
|
-
{ text: "Dockerfile", value: "dockerfile" },
|
|
58
|
-
{ text: "DOS", value: "dos" },
|
|
59
|
-
{ text: "dsconfig", value: "dsconfig" },
|
|
60
|
-
{ text: "DTS (Device Tree)", value: "dts" },
|
|
61
|
-
{ text: "Dust", value: "dust" },
|
|
62
|
-
{ text: "EBNF", value: "ebnf" },
|
|
63
|
-
{ text: "Elixir", value: "elixir" },
|
|
64
|
-
{ text: "Elm", value: "elm" },
|
|
65
|
-
{ text: "Erlang", value: "erlang" },
|
|
66
|
-
{ text: "Excel", value: "excel" },
|
|
67
|
-
{ text: "F#", value: "fsharp" },
|
|
68
|
-
{ text: "FIX", value: "fix" },
|
|
69
|
-
{ text: "Fortran", value: "fortran" },
|
|
70
|
-
{ text: "G-Code", value: "gcode" },
|
|
71
|
-
{ text: "Gams", value: "gams" },
|
|
72
|
-
{ text: "GAUSS", value: "gauss" },
|
|
73
|
-
{ text: "Gherkin", value: "gherkin" },
|
|
74
|
-
{ text: "Go", value: "go" },
|
|
75
|
-
{ text: "Golo", value: "golo" },
|
|
76
|
-
{ text: "Gradle", value: "gradle" },
|
|
77
|
-
{ text: "Groovy", value: "groovy" },
|
|
78
|
-
{ text: "HTTP", value: "http" },
|
|
79
|
-
{ text: "Haml", value: "haml" },
|
|
80
|
-
{ text: "Handlebars", value: "handlebars" },
|
|
81
|
-
{ text: "Haskell", value: "haskell" },
|
|
82
|
-
{ text: "Haxe", value: "haxe" },
|
|
83
|
-
{ text: "Hy", value: "hy" },
|
|
84
|
-
{ text: "Ini, TOML", value: "ini" },
|
|
85
|
-
{ text: "Inform7", value: "inform7" },
|
|
86
|
-
{ text: "IRPF90", value: "irpf90" },
|
|
87
|
-
{ text: "Julia", value: "julia" },
|
|
88
|
-
{ text: "Kotlin", value: "kotlin" },
|
|
89
|
-
{ text: "LaTeX", value: "tex" },
|
|
90
|
-
{ text: "Leaf", value: "leaf" },
|
|
91
|
-
{ text: "Lasso", value: "lasso" },
|
|
92
|
-
{ text: "Less", value: "less" },
|
|
93
|
-
{ text: "LDIF", value: "ldif" },
|
|
94
|
-
{ text: "Lisp", value: "lisp" },
|
|
95
|
-
{ text: "LiveCode Server", value: "livecodeserver" },
|
|
96
|
-
{ text: "LiveScript", value: "livescript" },
|
|
97
|
-
{ text: "Makefile", value: "makefile" },
|
|
98
|
-
{ text: "Markdown", value: "markdown" },
|
|
99
|
-
{ text: "Mathematica", value: "mathematica" },
|
|
100
|
-
{ text: "Matlab", value: "matlab" },
|
|
101
|
-
{ text: "Maxima", value: "maxima" },
|
|
102
|
-
{ text: "Maya Embedded Language", value: "mel" },
|
|
103
|
-
{ text: "Mercury", value: "mercury" },
|
|
104
|
-
{ text: "Mizar", value: "mizar" },
|
|
105
|
-
{ text: "Mojolicious", value: "mojolicious" },
|
|
106
|
-
{ text: "Monkey", value: "monkey" },
|
|
107
|
-
{ text: "Moonscript", value: "moonscript" },
|
|
108
|
-
{ text: "N1QL", value: "n1ql" },
|
|
109
|
-
{ text: "NSIS", value: "nsis" },
|
|
110
|
-
{ text: "Nginx", value: "nginx" },
|
|
111
|
-
{ text: "Nim", value: "nim" },
|
|
112
|
-
{ text: "Nix", value: "nix" },
|
|
113
|
-
{ text: "OCaml", value: "ocaml" },
|
|
114
|
-
{ text: "Objective C", value: "objectivec" },
|
|
115
|
-
{ text: "OpenGL Shading Language", value: "glsl" },
|
|
116
|
-
{ text: "OpenSCAD", value: "openscad" },
|
|
117
|
-
{ text: "Oracle Rules Language", value: "ruleslanguage" },
|
|
118
|
-
{ text: "Oxygene", value: "oxygene" },
|
|
119
|
-
{ text: "PF", value: "pf" },
|
|
120
|
-
{ text: "PHP", value: "php" },
|
|
121
|
-
{ text: "Parser3", value: "parser3" },
|
|
122
|
-
{ text: "Perl", value: "perl" },
|
|
123
|
-
{ text: "Plaintext", value: "plaintext" },
|
|
124
|
-
{ text: "Pony", value: "pony" },
|
|
125
|
-
{ text: "PostgreSQL & PL/pgSQL", value: "pgsql" },
|
|
126
|
-
{ text: "PowerShell", value: "powershell" },
|
|
127
|
-
{ text: "Processing", value: "processing" },
|
|
128
|
-
{ text: "Prolog", value: "prolog" },
|
|
129
|
-
{ text: "Properties", value: "properties" },
|
|
130
|
-
{ text: "Protocol Buffers", value: "protobuf" },
|
|
131
|
-
{ text: "Puppet", value: "puppet" },
|
|
132
|
-
{ text: "Python profiler results", value: "profile" },
|
|
133
|
-
{ text: "Python REPL", value: "python-repl" },
|
|
134
|
-
{ text: "Q", value: "k" },
|
|
135
|
-
{ text: "QML", value: "qml" },
|
|
136
|
-
{ text: "R", value: "r" },
|
|
137
|
-
{ text: "ReasonML", value: "reasonml" },
|
|
138
|
-
{ text: "RenderMan RIB", value: "rib" },
|
|
139
|
-
{ text: "RenderMan RSL", value: "rsl" },
|
|
140
|
-
{ text: "Roboconf", value: "graph" },
|
|
141
|
-
{ text: "Ruby", value: "ruby" },
|
|
142
|
-
{ text: "Rust", value: "rust" },
|
|
143
|
-
{ text: "SAS", value: "SAS" },
|
|
144
|
-
{ text: "SCSS", value: "scss" },
|
|
145
|
-
{ text: "SQL", value: "sql" },
|
|
146
|
-
{ text: "STEP Part 21", value: "p21" },
|
|
147
|
-
{ text: "Scala", value: "scala" },
|
|
148
|
-
{ text: "Scheme", value: "scheme" },
|
|
149
|
-
{ text: "Scilab", value: "scilab" },
|
|
150
|
-
{ text: "Shell", value: "shell" },
|
|
151
|
-
{ text: "Smali", value: "smali" },
|
|
152
|
-
{ text: "Smalltalk", value: "smalltalk" },
|
|
153
|
-
{ text: "SML", value: "sml" },
|
|
154
|
-
{ text: "Stan", value: "stan" },
|
|
155
|
-
{ text: "Stata", value: "stata" },
|
|
156
|
-
{ text: "Stylus", value: "stylus" },
|
|
157
|
-
{ text: "SubUnit", value: "subunit" },
|
|
158
|
-
{ text: "Swift", value: "swift" },
|
|
159
|
-
{ text: "Tcl", value: "tcl" },
|
|
160
|
-
{ text: "Test Anything Protocol", value: "tap" },
|
|
161
|
-
{ text: "Thrift", value: "thrift" },
|
|
162
|
-
{ text: "TP", value: "tp" },
|
|
163
|
-
{ text: "Twig", value: "twig" },
|
|
164
|
-
{ text: "TypeScript", value: "typescript" },
|
|
165
|
-
{ text: "VB.Net", value: "vbnet" },
|
|
166
|
-
{ text: "VBScript", value: "vbscript" },
|
|
167
|
-
{ text: "VHDL", value: "vhdl" },
|
|
168
|
-
{ text: "Vala", value: "vala" },
|
|
169
|
-
{ text: "Verilog", value: "verilog" },
|
|
170
|
-
{ text: "Vim Script", value: "vim" },
|
|
171
|
-
{ text: "X++", value: "axapta" },
|
|
172
|
-
{ text: "x86 Assembly", value: "x86asm" },
|
|
173
|
-
{ text: "XL", value: "xl" },
|
|
174
|
-
{ text: "XQuery", value: "xquery" },
|
|
175
|
-
{ text: "YAML", value: "yml" },
|
|
176
|
-
{ text: "Zephir", value: "zephir" },
|
|
177
|
-
];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IconID 转 URL
|
|
3
|
-
*
|
|
4
|
-
* @param {*} icon_id IconID
|
|
5
|
-
*/
|
|
6
|
-
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
7
|
-
const { __imgPath, __iconPath } = JX3BOX;
|
|
8
|
-
|
|
9
|
-
export default (icon_id) => {
|
|
10
|
-
if (isNaN(parseInt(icon_id))) {
|
|
11
|
-
return `${__imgPath}image/common/nullicon.png`;
|
|
12
|
-
} else {
|
|
13
|
-
return `${__iconPath}icon/${icon_id}.png`;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* second_format
|
|
3
|
-
* @param {*} second 秒
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export default (second) => {
|
|
7
|
-
let day = Math.floor(second / (24 * 3600)); // Math.floor()向下取整
|
|
8
|
-
let hour = Math.floor((second - day * 24 * 3600) / 3600);
|
|
9
|
-
let minute = Math.floor((second - day * 24 * 3600 - hour * 3600) / 60);
|
|
10
|
-
second = second - day * 24 * 3600 - hour * 3600 - minute * 60;
|
|
11
|
-
|
|
12
|
-
let output = '';
|
|
13
|
-
if (day) output += day + "天";
|
|
14
|
-
if (hour) output += hour + "小时";
|
|
15
|
-
if (minute) output += minute + "分钟";
|
|
16
|
-
if (second) output += second + "秒";
|
|
17
|
-
return output;
|
|
18
|
-
}
|
|
19
|
-
|
package/assets/js/jx3_element.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import $ from "jquery";
|
|
2
|
-
|
|
3
|
-
function renderItem(vm, selector = ".w-jx3-element") {
|
|
4
|
-
|
|
5
|
-
let outer, inner;
|
|
6
|
-
const pop_class = '.w-jx3-element-pop'
|
|
7
|
-
|
|
8
|
-
// 触发时
|
|
9
|
-
$(selector).on("mouseenter", function (e) {
|
|
10
|
-
clearTimeout(outer);
|
|
11
|
-
|
|
12
|
-
// 获取元素数据
|
|
13
|
-
let type = $(e.target).attr("data-type");
|
|
14
|
-
if (type == 'item') {
|
|
15
|
-
vm.item = {}
|
|
16
|
-
vm.item.id = $(e.target).attr("data-id");
|
|
17
|
-
vm.item.client = $(e.target).attr("data-client") == 'origin' ? 2 : 1;
|
|
18
|
-
} else if (type === 'author') {
|
|
19
|
-
vm.author = {}
|
|
20
|
-
vm.author.id = $(e.target).attr("data-id");
|
|
21
|
-
} else if (type === 'emotion') {
|
|
22
|
-
vm.emotion = {}
|
|
23
|
-
vm.emotion.id = $(e.target).attr("data-id");
|
|
24
|
-
} else {
|
|
25
|
-
vm[type] = {}
|
|
26
|
-
vm[type].client = $(e.target).attr("data-client");
|
|
27
|
-
vm[type].id = $(e.target).attr("data-id");
|
|
28
|
-
vm[type].level = $(e.target).attr("data-level");
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// 显示浮层
|
|
32
|
-
$(pop_class).fadeIn();
|
|
33
|
-
vm.jx3_element ? '' : vm.jx3_element = {
|
|
34
|
-
style: {},
|
|
35
|
-
type: ''
|
|
36
|
-
}
|
|
37
|
-
vm.jx3_element.type = type
|
|
38
|
-
|
|
39
|
-
// 计算浮层位置
|
|
40
|
-
let self_height = $(pop_class).height();
|
|
41
|
-
let win_height = window.innerHeight;
|
|
42
|
-
let current_y = e.clientY;
|
|
43
|
-
let will_stay_y = e.clientY + 10;
|
|
44
|
-
|
|
45
|
-
if (self_height && win_height - current_y < self_height) {
|
|
46
|
-
will_stay_y =
|
|
47
|
-
current_y - (self_height - (win_height - current_y)) - 100;
|
|
48
|
-
}
|
|
49
|
-
vm.jx3_element.style.left = e.clientX + 10 + "px";
|
|
50
|
-
vm.jx3_element.style.top = will_stay_y + "px";
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// 移除时
|
|
54
|
-
$(selector).on("mouseleave", function () {
|
|
55
|
-
outer = setTimeout(() => {
|
|
56
|
-
$(pop_class).fadeOut();
|
|
57
|
-
}, 380);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// POP内停留
|
|
61
|
-
$(pop_class).on("mouseenter", function () {
|
|
62
|
-
clearTimeout(outer);
|
|
63
|
-
$(pop_class).fadeIn();
|
|
64
|
-
});
|
|
65
|
-
$(pop_class).on("mouseleave", function () {
|
|
66
|
-
clearTimeout(inner);
|
|
67
|
-
inner = setTimeout(() => {
|
|
68
|
-
$(pop_class).fadeOut();
|
|
69
|
-
}, 280);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export default renderItem;
|
package/assets/js/katex.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import $ from 'jquery';
|
|
2
|
-
import katex from 'katex';
|
|
3
|
-
import 'katex/dist/katex.min.css';
|
|
4
|
-
|
|
5
|
-
function renderKatexBlock(selector = ".w-latex") {
|
|
6
|
-
try {
|
|
7
|
-
$(selector).each(function() {
|
|
8
|
-
let $katex = $(this);
|
|
9
|
-
|
|
10
|
-
// 获取原始HTML内容
|
|
11
|
-
let raw = $katex.html();
|
|
12
|
-
|
|
13
|
-
// 处理各种换行组合:
|
|
14
|
-
// 1. \\<br /> 或 \\<br> -> \\
|
|
15
|
-
raw = raw.replace(/\\\\\s*<br\s*\/?>/gi, '\\\\');
|
|
16
|
-
// 2. \<br /> 或 \<br> -> \\
|
|
17
|
-
raw = raw.replace(/\\\s*<br\s*\/?>/gi, '\\\\');
|
|
18
|
-
// 3. 单独的 <br /> -> \\
|
|
19
|
-
raw = raw.replace(/<br\s*\/?>/gi, '\\\\');
|
|
20
|
-
|
|
21
|
-
// 移除其他HTML标签但保留内容
|
|
22
|
-
raw = raw.replace(/<[^>]+>/g, '');
|
|
23
|
-
|
|
24
|
-
// 解码HTML实体(如 -> 空格)
|
|
25
|
-
raw = $('<div>').html(raw).text();
|
|
26
|
-
|
|
27
|
-
// 清理多余的空白字符
|
|
28
|
-
raw = raw.trim();
|
|
29
|
-
|
|
30
|
-
katex.render(raw, $katex.get(0), { displayMode: true });
|
|
31
|
-
});
|
|
32
|
-
} catch (e) {
|
|
33
|
-
console.error('KaTeX render error:', e);
|
|
34
|
-
console.error('Failed content:', $(this).html());
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function renderKatexInline(container = document.body) {
|
|
39
|
-
// 支持 \(...\) 和 $...$ 两种行内语法
|
|
40
|
-
// 改进正则表达式,更好地匹配单美元符号
|
|
41
|
-
const inlineRegex = /(\\\((.+?)\\\)|\$([^$]+?)\$)/g;
|
|
42
|
-
|
|
43
|
-
const walker = document.createTreeWalker(
|
|
44
|
-
container,
|
|
45
|
-
NodeFilter.SHOW_TEXT,
|
|
46
|
-
{
|
|
47
|
-
acceptNode: function (node) {
|
|
48
|
-
if (
|
|
49
|
-
node.parentNode &&
|
|
50
|
-
!node.parentNode.closest("pre") &&
|
|
51
|
-
(node.nodeValue.includes("\\(") || node.nodeValue.includes("$"))
|
|
52
|
-
) {
|
|
53
|
-
return NodeFilter.FILTER_ACCEPT;
|
|
54
|
-
}
|
|
55
|
-
return NodeFilter.FILTER_REJECT;
|
|
56
|
-
},
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
const nodesToReplace = [];
|
|
61
|
-
while (walker.nextNode()) {
|
|
62
|
-
nodesToReplace.push(walker.currentNode);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
nodesToReplace.forEach((node) => {
|
|
66
|
-
const text = node.nodeValue;
|
|
67
|
-
const frag = document.createDocumentFragment();
|
|
68
|
-
let lastIndex = 0;
|
|
69
|
-
let match;
|
|
70
|
-
|
|
71
|
-
while ((match = inlineRegex.exec(text))) {
|
|
72
|
-
const fullMatch = match[0];
|
|
73
|
-
const parenContent = match[2]; // \(...\)的内容
|
|
74
|
-
const dollarContent = match[3]; // $...$的内容
|
|
75
|
-
const raw = parenContent || dollarContent;
|
|
76
|
-
const matchStart = match.index;
|
|
77
|
-
|
|
78
|
-
// 添加匹配前文本
|
|
79
|
-
frag.appendChild(document.createTextNode(text.slice(lastIndex, matchStart)));
|
|
80
|
-
|
|
81
|
-
try {
|
|
82
|
-
const span = document.createElement("span");
|
|
83
|
-
// 处理JavaScript字符串中的双反斜杠转义
|
|
84
|
-
const processedRaw = raw.replace(/\\\\/g, '\\');
|
|
85
|
-
// 添加更多选项确保正确渲染
|
|
86
|
-
span.innerHTML = katex.renderToString(processedRaw, {
|
|
87
|
-
displayMode: false,
|
|
88
|
-
throwOnError: false,
|
|
89
|
-
strict: false,
|
|
90
|
-
trust: true
|
|
91
|
-
});
|
|
92
|
-
frag.appendChild(span);
|
|
93
|
-
} catch (e) {
|
|
94
|
-
frag.appendChild(document.createTextNode(fullMatch));
|
|
95
|
-
console.error("Inline render error:", raw, e);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
lastIndex = inlineRegex.lastIndex;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// 剩余文本
|
|
102
|
-
if (lastIndex < text.length) {
|
|
103
|
-
frag.appendChild(document.createTextNode(text.slice(lastIndex)));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
if (frag.hasChildNodes()) {
|
|
107
|
-
node.parentNode.replaceChild(frag, node);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function renderKatexDisplayBlock(container = document.body) {
|
|
113
|
-
// 支持 $$...$$ 和 \[...\] 两种块语法
|
|
114
|
-
const blockRegex = /(\$\$\s*([\s\S]+?)\s*\$\$|\\\[\s*([\s\S]+?)\s*\\\])/g;
|
|
115
|
-
|
|
116
|
-
const walker = document.createTreeWalker(
|
|
117
|
-
container,
|
|
118
|
-
NodeFilter.SHOW_TEXT,
|
|
119
|
-
{
|
|
120
|
-
acceptNode: function (node) {
|
|
121
|
-
if (
|
|
122
|
-
node.parentNode &&
|
|
123
|
-
!node.parentNode.closest("pre") &&
|
|
124
|
-
(node.nodeValue.includes("$$") || node.nodeValue.includes("\\["))
|
|
125
|
-
) {
|
|
126
|
-
return NodeFilter.FILTER_ACCEPT;
|
|
127
|
-
}
|
|
128
|
-
return NodeFilter.FILTER_REJECT;
|
|
129
|
-
},
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
const nodesToReplace = [];
|
|
134
|
-
while (walker.nextNode()) {
|
|
135
|
-
nodesToReplace.push(walker.currentNode);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
nodesToReplace.forEach((node) => {
|
|
139
|
-
const text = node.nodeValue;
|
|
140
|
-
const frag = document.createDocumentFragment();
|
|
141
|
-
let lastIndex = 0;
|
|
142
|
-
let match;
|
|
143
|
-
|
|
144
|
-
while ((match = blockRegex.exec(text))) {
|
|
145
|
-
const fullMatch = match[0];
|
|
146
|
-
const dollarContent = match[2]; // $$...$$的内容
|
|
147
|
-
const bracketContent = match[3]; // \[...\]的内容
|
|
148
|
-
const raw = dollarContent || bracketContent;
|
|
149
|
-
const matchStart = match.index;
|
|
150
|
-
|
|
151
|
-
// 添加匹配前文本
|
|
152
|
-
frag.appendChild(document.createTextNode(text.slice(lastIndex, matchStart)));
|
|
153
|
-
|
|
154
|
-
try {
|
|
155
|
-
const div = document.createElement("div");
|
|
156
|
-
// 处理JavaScript字符串中的双反斜杠转义
|
|
157
|
-
const processedRaw = raw.replace(/\\\\/g, '\\');
|
|
158
|
-
div.innerHTML = katex.renderToString(processedRaw, { displayMode: true });
|
|
159
|
-
frag.appendChild(div);
|
|
160
|
-
} catch (e) {
|
|
161
|
-
frag.appendChild(document.createTextNode(fullMatch));
|
|
162
|
-
console.error("Block render error:", raw, e);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
lastIndex = blockRegex.lastIndex;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// 添加剩余文本
|
|
169
|
-
if (lastIndex < text.length) {
|
|
170
|
-
frag.appendChild(document.createTextNode(text.slice(lastIndex)));
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
node.parentNode.replaceChild(frag, node);
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export function renderKatexAll(container = document.body) {
|
|
178
|
-
renderKatexBlock(".w-latex");
|
|
179
|
-
renderKatexDisplayBlock(container);
|
|
180
|
-
renderKatexInline(container);
|
|
181
|
-
}
|
package/assets/js/macro.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import JX3_MACRO from '@jx3box/jx3box-macro'
|
|
2
|
-
import $ from 'jquery'
|
|
3
|
-
|
|
4
|
-
function macro(selector=".e-jx3macro-area"){
|
|
5
|
-
try {
|
|
6
|
-
$(selector).each(function() {
|
|
7
|
-
let $macro = $(this);
|
|
8
|
-
let macro = new JX3_MACRO($macro.text());
|
|
9
|
-
$macro.html(macro.code);
|
|
10
|
-
});
|
|
11
|
-
} catch (e) {
|
|
12
|
-
console.error(e);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
export default macro
|
|
16
|
-
|
package/assets/js/nextpage.js
DELETED