hexo-theme-volantis 4.2.0 → 5.0.0-alpha.112
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/README.md +7 -5
- package/_config.yml +651 -234
- package/languages/en.yml +7 -0
- package/languages/zh-CN.yml +13 -2
- package/languages/zh-TW.yml +7 -0
- package/layout/404.ejs +1 -2
- package/layout/_meta/author.ejs +4 -4
- package/layout/_meta/category.ejs +11 -8
- package/layout/_meta/counter.ejs +51 -2
- package/layout/_meta/date.ejs +1 -1
- package/layout/_meta/music.ejs +1 -1
- package/layout/_meta/share.ejs +1 -1
- package/layout/_meta/tags.ejs +3 -0
- package/layout/_meta/thumbnail.ejs +3 -1
- package/layout/_meta/updated.ejs +1 -1
- package/layout/_meta/{valinecount.ejs → walinecount.ejs} +16 -15
- package/layout/{_cover → _partial/_cover}/blank.ejs +0 -0
- package/layout/{_cover → _partial/_cover}/dock.ejs +1 -1
- package/layout/{_cover → _partial/_cover}/featured.ejs +1 -1
- package/layout/{_cover → _partial/_cover}/focus.ejs +1 -1
- package/layout/_partial/_cover/layout.ejs +8 -0
- package/layout/{_cover → _partial/_cover}/search.ejs +2 -2
- package/layout/_partial/archive.ejs +2 -2
- package/layout/_partial/article.ejs +21 -13
- package/layout/_partial/categories.ejs +1 -1
- package/layout/_partial/cover.ejs +10 -30
- package/layout/_partial/footer.ejs +19 -11
- package/layout/_partial/head.ejs +70 -110
- package/layout/_partial/header.ejs +17 -11
- package/layout/_partial/meta.ejs +18 -4
- package/layout/_partial/post.ejs +35 -9
- package/layout/_partial/scripts/_ctrl/cdnCtrl.ejs +126 -0
- package/layout/_partial/scripts/{coverCtrl.ejs → _ctrl/coverCtrl.ejs} +22 -26
- package/layout/_partial/scripts/_ctrl.ejs +2 -0
- package/layout/_partial/scripts/content-visibility-scroll-fix.ejs +88 -0
- package/layout/_partial/scripts/global.ejs +423 -0
- package/layout/_partial/scripts/index.ejs +89 -73
- package/layout/_partial/scripts/toc.ejs +98 -68
- package/layout/_partial/side.ejs +4 -1
- package/layout/_plugins/_page_plugins/artitalk/index.ejs +15 -0
- package/layout/_plugins/_page_plugins/bbtalk/index.ejs +10 -0
- package/layout/_plugins/_page_plugins/fcircle/index.ejs +12 -0
- package/layout/_plugins/_page_plugins/gitter/index.ejs +14 -0
- package/layout/_plugins/_page_plugins/indent/index.ejs +16 -0
- package/layout/_plugins/_page_plugins/index.ejs +27 -0
- package/layout/_plugins/_page_plugins/katex/index.ejs +13 -0
- package/layout/{_third-party/math/mathjax/script.ejs → _plugins/_page_plugins/mathjax/index.ejs} +2 -2
- package/layout/_plugins/_page_plugins/snackbar/index.ejs +55 -0
- package/layout/{_partial/scripts/counter.ejs → _plugins/analytics/LCCounter.ejs} +0 -0
- package/layout/_plugins/analytics/script.ejs +74 -0
- package/layout/{_third-party → _plugins}/aplayer/layout.ejs +0 -0
- package/layout/_plugins/aplayer/script.ejs +74 -0
- package/layout/_plugins/chat/gitter/script.ejs +17 -0
- package/layout/_plugins/chat/index.ejs +1 -0
- package/layout/_plugins/chat/tidio/script.ejs +1 -0
- package/layout/_plugins/comments/artalk/script.ejs +59 -0
- package/layout/_plugins/comments/beaudar/script.ejs +61 -0
- package/layout/_plugins/comments/discuss/script.ejs +30 -0
- package/layout/_plugins/comments/disqus/script.ejs +98 -0
- package/layout/_plugins/comments/disqusjs/script.ejs +35 -0
- package/layout/_plugins/comments/giscus/script.ejs +47 -0
- package/layout/_plugins/comments/gitalk/script.ejs +24 -0
- package/layout/_plugins/comments/hashover/script.ejs +5 -0
- package/layout/{_third-party → _plugins}/comments/index.ejs +10 -3
- package/layout/_plugins/comments/isso/script.ejs +27 -0
- package/layout/_plugins/comments/livere/script.ejs +15 -0
- package/layout/_plugins/comments/twikoo/script.ejs +40 -0
- package/layout/_plugins/comments/utterances/script.ejs +43 -0
- package/layout/_plugins/comments/vssue/script.ejs +37 -0
- package/layout/_plugins/comments/waline/script.ejs +62 -0
- package/layout/_plugins/comments/z-custom/script.ejs +1 -0
- package/layout/_plugins/darkmode/script.ejs +114 -0
- package/layout/_plugins/end-of-support/script.ejs +62 -0
- package/layout/_plugins/github-api/script.ejs +27 -0
- package/layout/_plugins/highlight/highlightjs/script.ejs +26 -0
- package/layout/_plugins/highlight/prismjs/script.ejs +25 -0
- package/layout/_plugins/highlight/script.ejs +1 -0
- package/layout/{_third-party → _plugins}/lazyload/script.ejs +1 -1
- package/layout/_plugins/nodewaves/script.ejs +12 -0
- package/layout/_plugins/parallax/script.ejs +74 -0
- package/layout/{_third-party → _plugins}/pjax/animate.ejs +31 -26
- package/layout/_plugins/pjax/index.ejs +73 -0
- package/layout/_plugins/pjax/pdata.ejs +56 -0
- package/layout/_plugins/preload/script.ejs +14 -0
- package/layout/_plugins/rightmenu/layout.ejs +119 -0
- package/layout/_plugins/rightmenus/layout.ejs +137 -0
- package/layout/_plugins/scrollreveal/script.ejs +25 -0
- package/layout/_plugins/search/script.ejs +50 -0
- package/layout/{_third-party → _plugins}/share/layout.ejs +0 -0
- package/layout/_plugins/swiper/script.ejs +37 -0
- package/layout/_pre.ejs +2 -2
- package/layout/_widget/_pre.ejs +5 -0
- package/layout/_widget/blogger.ejs +1 -1
- package/layout/_widget/category.ejs +2 -2
- package/layout/_widget/copyright.ejs +1 -1
- package/layout/_widget/grid.ejs +3 -3
- package/layout/_widget/lastupdate.ejs +27 -0
- package/layout/_widget/list.ejs +2 -2
- package/layout/_widget/load.ejs +18 -0
- package/layout/_widget/music.ejs +3 -2
- package/layout/_widget/page.ejs +1 -1
- package/layout/_widget/qrcode.ejs +1 -1
- package/layout/_widget/related_posts.ejs +1 -1
- package/layout/_widget/tagcloud.ejs +1 -1
- package/layout/_widget/text.ejs +1 -1
- package/layout/_widget/toc.ejs +6 -2
- package/layout/_widget/webinfo.ejs +13 -76
- package/layout/archive.ejs +4 -4
- package/layout/category.ejs +9 -4
- package/layout/docs.ejs +1 -1
- package/layout/friends.ejs +6 -25
- package/layout/index.ejs +1 -1
- package/layout/layout.ejs +40 -24
- package/layout/list.ejs +1 -1
- package/layout/page.ejs +1 -1
- package/layout/post.ejs +1 -1
- package/layout/tag.ejs +8 -3
- package/package.json +6 -2
- package/scripts/events/index.js +13 -0
- package/scripts/events/lib/check-configuration.js +43 -0
- package/scripts/events/lib/check-environment.js +74 -0
- package/scripts/events/lib/config.js +35 -10
- package/scripts/events/lib/render-stylus.js +78 -0
- package/scripts/events/lib/stellar-tag-utils.js +76 -0
- package/scripts/filters/content-visibility.js +25 -0
- package/scripts/{render → filters}/img.js +1 -1
- package/scripts/filters/replace.js +15 -0
- package/scripts/{z-lazyload/lib/process.js → filters/z-lazyload.js} +18 -15
- package/scripts/helpers/custom-files.js +165 -0
- package/scripts/helpers/first-style.js +19 -0
- package/scripts/helpers/head/autoCanonical.js +15 -0
- package/scripts/helpers/head/generate_preload_fontfamily.js +22 -0
- package/scripts/helpers/head/generate_seo.js +24 -0
- package/scripts/helpers/head/generate_title__keywords__description.js +101 -0
- package/scripts/{related_posts/index.js → helpers/related-posts.js} +9 -9
- package/scripts/helpers/revisioned.js +158 -0
- package/scripts/helpers/structured-data/index.js +2 -0
- package/scripts/helpers/structured-data/lib/blogposting.js +77 -0
- package/scripts/helpers/structured-data/lib/breadcrumblist.js +152 -0
- package/scripts/helpers/structured-data/lib/config.js +31 -0
- package/scripts/helpers/structured-data/lib/index.js +30 -0
- package/scripts/helpers/structured-data/lib/organization.js +15 -0
- package/scripts/helpers/structured-data/lib/person.js +16 -0
- package/scripts/helpers/structured-data/lib/website.js +42 -0
- package/scripts/tags/btn.js +31 -26
- package/scripts/tags/btns.js +18 -13
- package/scripts/tags/checkbox.js +32 -22
- package/scripts/tags/contributors.js +100 -0
- package/scripts/tags/dropmenu.js +50 -35
- package/scripts/tags/fancybox.js +44 -10
- package/scripts/tags/folding.js +14 -9
- package/scripts/tags/frame.js +8 -3
- package/scripts/tags/friends.js +99 -0
- package/scripts/tags/ghcard.js +11 -6
- package/scripts/tags/image.js +18 -6
- package/scripts/tags/link.js +15 -10
- package/scripts/tags/md.js +59 -0
- package/scripts/tags/media.js +32 -8
- package/scripts/tags/note.js +41 -8
- package/scripts/tags/site.js +87 -51
- package/scripts/tags/span.js +16 -6
- package/scripts/tags/swiper.js +38 -0
- package/scripts/tags/table.js +1 -1
- package/scripts/tags/tabs.js +33 -3
- package/scripts/tags/timeline.js +9 -4
- package/source/css/Readme.md +28 -0
- package/source/css/_defines/AutoPrefixCSS.styl +347 -0
- package/source/css/_defines/Readme.md +3 -0
- package/source/css/_defines/color.styl +41 -1
- package/source/css/_defines/effect.styl +0 -13
- package/source/css/_defines/fonts.styl +17 -18
- package/source/css/_defines/func.styl +12 -30
- package/source/css/_first/base_first.styl +118 -0
- package/source/css/_first/{cover.styl → cover_first.styl} +113 -87
- package/source/css/_first/dark_first.styl +76 -0
- package/source/css/_first/fontfamily_first.styl +17 -0
- package/source/css/_first/{navbar.styl → navbar_first.styl} +4 -10
- package/source/css/_first/search_first.styl +12 -0
- package/source/css/{_base/index.styl → _style/_base/base.styl} +9 -93
- package/source/css/_style/_base/fontfamily_async.styl +8 -0
- package/source/css/{_layout → _style/_layout}/archive.styl +0 -0
- package/source/css/{_layout → _style/_layout}/article.styl +3 -30
- package/source/css/{_layout → _style/_layout}/footer.styl +0 -0
- package/source/css/_style/_layout/friends-simpleuser.styl +23 -0
- package/source/css/_style/_layout/friends-traditional.styl +81 -0
- package/source/css/{_layout → _style/_layout}/img.styl +0 -0
- package/source/css/_style/_layout/loading.styl +14 -0
- package/source/css/{_layout → _style/_layout}/main.styl +20 -7
- package/source/css/{_layout → _style/_layout}/md.styl +0 -0
- package/source/css/{_layout → _style/_layout}/pagination.styl +1 -1
- package/source/css/{_layout → _style/_layout}/posts.styl +2 -0
- package/source/css/{_first → _style/_layout}/search.styl +0 -103
- package/source/css/{_layout → _style/_layout}/sidebar.styl +23 -3
- package/source/css/{_layout → _style/_layout}/snackbar.styl +2 -1
- package/source/css/{_layout → _style/_layout}/toc.styl +3 -3
- package/source/css/{_layout → _style/_layout}/video.styl +0 -0
- package/source/css/_style/_plugins/_dark/dark_async.styl +41 -0
- package/source/css/_style/_plugins/_dark/dark_plugins.styl +136 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/clipboard.styl +36 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/color.styl +96 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/index.styl +102 -0
- package/source/css/_style/_plugins/_highlight/highlightjs/language.styl +63 -0
- package/source/css/_style/_plugins/_highlight/index.styl +1 -0
- package/source/css/_style/_plugins/_highlight/prismjs/clipboard.styl +33 -0
- package/source/css/_style/_plugins/_highlight/prismjs/index.styl +8 -0
- package/source/css/_style/_plugins/_highlight/prismjs/language.styl +63 -0
- package/source/css/_style/_plugins/_rightmenu/reading.styl +56 -0
- package/source/css/{_plugins → _style/_plugins/_rightmenu}/rightmenu.styl +22 -2
- package/source/css/{_plugins → _style/_plugins}/aplayer.styl +11 -0
- package/source/css/{_plugins → _style/_plugins}/cursor.styl +49 -19
- package/source/css/_style/_plugins/fontcolor.styl +84 -0
- package/source/css/{_plugins → _style/_plugins}/gitalk.styl +0 -0
- package/source/css/_style/_plugins/index.styl +24 -0
- package/source/css/{_plugins → _style/_plugins}/mathjax.styl +0 -0
- package/source/css/_style/_plugins/message.styl +14 -0
- package/source/css/{_plugins → _style/_plugins}/pjaxanimate.styl +0 -0
- package/source/css/_style/_tag-plugins/Readme.md +6 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/btns.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/checkbox.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/dropmenu.styl +0 -0
- package/source/css/{_plugins → _style/_tag-plugins}/fancybox.styl +8 -9
- package/source/css/{_tag-plugins → _style/_tag-plugins}/folding.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/frame.styl +0 -0
- package/source/css/_style/_tag-plugins/friends.styl +72 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/ghcard.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/image.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/link.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/media.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/note.styl +0 -0
- package/source/css/_style/_tag-plugins/sites.styl +87 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/span.styl +0 -0
- package/source/css/_style/_tag-plugins/swiper.styl +44 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/table.styl +0 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/tabs.styl +0 -0
- package/source/css/_style/_tag-plugins/tag.json +35 -0
- package/source/css/_style/_tag-plugins/text.styl +31 -0
- package/source/css/{_tag-plugins → _style/_tag-plugins}/timeline.styl +0 -0
- package/source/css/_style/index.styl +8 -0
- package/source/css/first.styl +17 -6
- package/source/css/style.styl +9 -7
- package/source/js/app.js +1128 -359
- package/source/js/plugins/aplayer.js +186 -0
- package/source/js/plugins/parallax.js +191 -0
- package/source/js/plugins/rightMenu.js +577 -0
- package/source/js/plugins/rightMenus.js +616 -0
- package/source/js/plugins/tags/contributors.js +92 -0
- package/source/js/plugins/tags/friends.js +93 -0
- package/source/js/plugins/tags/sites.js +96 -0
- package/source/js/search/hexo.js +180 -378
- package/layout/_partial/rightmenu.ejs +0 -204
- package/layout/_partial/scripts/cover.ejs +0 -45
- package/layout/_partial/scripts/darkmode.ejs +0 -96
- package/layout/_partial/scripts/import.ejs +0 -3
- package/layout/_partial/scripts/loadfunction.ejs +0 -72
- package/layout/_partial/scripts/search.ejs +0 -62
- package/layout/_partial/snackbar.ejs +0 -22
- package/layout/_third-party/analytics/script.ejs +0 -24
- package/layout/_third-party/aplayer/script.ejs +0 -24
- package/layout/_third-party/clipboard/script.ejs +0 -53
- package/layout/_third-party/comments/disqus/layout.ejs +0 -5
- package/layout/_third-party/comments/disqus/script.ejs +0 -93
- package/layout/_third-party/comments/gitalk/layout.ejs +0 -1
- package/layout/_third-party/comments/gitalk/script.ejs +0 -29
- package/layout/_third-party/comments/hashover/layout.ejs +0 -2
- package/layout/_third-party/comments/hashover/script.ejs +0 -1
- package/layout/_third-party/comments/isso/layout.ejs +0 -1
- package/layout/_third-party/comments/isso/script.ejs +0 -1
- package/layout/_third-party/comments/livere/layout.ejs +0 -3
- package/layout/_third-party/comments/livere/script.ejs +0 -10
- package/layout/_third-party/comments/minivaline/layout.ejs +0 -3
- package/layout/_third-party/comments/minivaline/script.ejs +0 -29
- package/layout/_third-party/comments/twikoo/layout.ejs +0 -3
- package/layout/_third-party/comments/twikoo/script.ejs +0 -17
- package/layout/_third-party/comments/valine/layout.ejs +0 -3
- package/layout/_third-party/comments/valine/script.ejs +0 -75
- package/layout/_third-party/comments/vssue/layout.ejs +0 -1
- package/layout/_third-party/comments/vssue/script.ejs +0 -22
- package/layout/_third-party/fancybox/script.ejs +0 -50
- package/layout/_third-party/issues/script.ejs +0 -15
- package/layout/_third-party/pjax/index.ejs +0 -143
- package/layout/_third-party/pjax/pdata.ejs +0 -47
- package/layout/_third-party/scrollreveal/script.ejs +0 -15
- package/layout/artitalk.ejs +0 -48
- package/scripts/tags/issues.js +0 -41
- package/scripts/z-lazyload/index.js +0 -4
- package/source/css/_highlight/index.styl +0 -316
- package/source/css/_layout/friends.styl +0 -79
- package/source/css/_plugins/clipboard.styl +0 -37
- package/source/css/_plugins/dark.styl +0 -149
- package/source/css/_plugins/darkmode.styl +0 -9
- package/source/css/_plugins/index.styl +0 -16
- package/source/css/_plugins/valine.styl +0 -173
- package/source/css/_tag-plugins/simpleuser.styl +0 -21
- package/source/css/_tag-plugins/site-card.styl +0 -70
- package/source/js/aplayer.js +0 -161
- package/source/js/issues.js +0 -186
- package/source/js/search/algolia.js +0 -348
- package/source/js/search/azure.js +0 -359
- package/source/js/search/baidu.js +0 -342
- package/source/js/search/google.js +0 -343
- package/source/js/twikoo.js +0 -13
- package/source/js/valine.js +0 -5265
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
article#comments
|
|
2
|
-
position: relative
|
|
3
|
-
a
|
|
4
|
-
border-bottom: none
|
|
5
|
-
#valine_container
|
|
6
|
-
>i
|
|
7
|
-
display: block
|
|
8
|
-
margin: $gap auto
|
|
9
|
-
img
|
|
10
|
-
display: inline
|
|
11
|
-
.vwrap
|
|
12
|
-
border-radius: $border-card
|
|
13
|
-
border-style: dashed
|
|
14
|
-
border: 1px dashed alpha($color-text, 30%)
|
|
15
|
-
trans()
|
|
16
|
-
&:hover
|
|
17
|
-
border: 1px dashed $color-theme
|
|
18
|
-
.cancel-reply
|
|
19
|
-
margin-top: 0
|
|
20
|
-
margin-bottom: 0
|
|
21
|
-
.vheader
|
|
22
|
-
.vinput
|
|
23
|
-
border-radius: 0
|
|
24
|
-
border-bottom: 1px dashed alpha($color-text, 30%)
|
|
25
|
-
&:hover
|
|
26
|
-
border-bottom: 1px dashed $color-theme
|
|
27
|
-
&:focus
|
|
28
|
-
border-bottom: 1px solid $color-theme
|
|
29
|
-
.vedit
|
|
30
|
-
.vicon
|
|
31
|
-
height: 22px
|
|
32
|
-
.vemojis,.vpreview
|
|
33
|
-
background: var(--color-block)
|
|
34
|
-
border-radius: var(--border-codeblock)
|
|
35
|
-
padding: $gap * 0.5
|
|
36
|
-
scrollbar()
|
|
37
|
-
.vemoji
|
|
38
|
-
max-height: 22px
|
|
39
|
-
max-width: 100px
|
|
40
|
-
i
|
|
41
|
-
width: auto
|
|
42
|
-
padding: 8px
|
|
43
|
-
border-radius: 4px
|
|
44
|
-
transition: box-shadow .2s ease-out, background .2s ease-out
|
|
45
|
-
if luminosity($color-block) > 0.5
|
|
46
|
-
&:hover
|
|
47
|
-
background: lighten($color-block, 2)
|
|
48
|
-
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1), -1px -1px 2px rgba(255, 255, 255, 0.5), inset 8px 8px 16px rgba(0, 0, 0, 0.05), inset -8px -8px 16px rgba(255, 255, 255, 0.4)
|
|
49
|
-
&:active
|
|
50
|
-
background: darken($color-block, 2)
|
|
51
|
-
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.1), -0px -0px 0px rgba(255, 255, 255, 0.8), inset 2px 2px 4px rgba(0, 0, 0, 0.1), inset -2px -2px 4px rgba(255, 255, 255, 1), inset -8px -8px 16px rgba(255, 255, 255, 0.4)
|
|
52
|
-
.vedit
|
|
53
|
-
.vctrl span
|
|
54
|
-
padding: 0
|
|
55
|
-
margin: 10px
|
|
56
|
-
span
|
|
57
|
-
fill: var(--color-p)
|
|
58
|
-
&.actived
|
|
59
|
-
fill: $color-theme
|
|
60
|
-
.vcount
|
|
61
|
-
color: var(--color-p)
|
|
62
|
-
font-size: $fontsize-meta
|
|
63
|
-
padding: 0
|
|
64
|
-
font-weight: inherit
|
|
65
|
-
.vnum
|
|
66
|
-
color: var(--color-p)
|
|
67
|
-
font-size: $fontsize-h2
|
|
68
|
-
|
|
69
|
-
button
|
|
70
|
-
border: none
|
|
71
|
-
padding: 4px 2rem
|
|
72
|
-
border-radius: $border-button
|
|
73
|
-
background: darken($color-block, 2)
|
|
74
|
-
color: var(--color-text)
|
|
75
|
-
line-height: 2
|
|
76
|
-
font-size: 14px
|
|
77
|
-
trans()
|
|
78
|
-
&:hover
|
|
79
|
-
color: $color-hover
|
|
80
|
-
background: bgcolor($color-hover)
|
|
81
|
-
&.vmore
|
|
82
|
-
width: 100%
|
|
83
|
-
padding: 8px 2rem
|
|
84
|
-
.vcards
|
|
85
|
-
margin-top: $gap * 0.5
|
|
86
|
-
>.vcard
|
|
87
|
-
border-radius: $border-card
|
|
88
|
-
border: 1px dashed alpha($color-text, .3)
|
|
89
|
-
padding: $gap
|
|
90
|
-
margin-bottom: $gap
|
|
91
|
-
.vh
|
|
92
|
-
border-bottom: none
|
|
93
|
-
.vquote
|
|
94
|
-
border-left: none
|
|
95
|
-
.vimg
|
|
96
|
-
border: 1px solid white
|
|
97
|
-
padding: 0
|
|
98
|
-
background: var(--color-block)
|
|
99
|
-
.vcontent.expand
|
|
100
|
-
&:before
|
|
101
|
-
background: linear-gradient(180deg, alpha($color-card, .9), alpha($color-block, .9));
|
|
102
|
-
&:after
|
|
103
|
-
background: alpha($color-block, .9)
|
|
104
|
-
color: var(--color-text)
|
|
105
|
-
.vhead
|
|
106
|
-
span
|
|
107
|
-
&.vnick
|
|
108
|
-
color: lighten($color-p, 10)
|
|
109
|
-
cursor: default
|
|
110
|
-
a
|
|
111
|
-
&.vnick
|
|
112
|
-
color: #ff9800
|
|
113
|
-
font-weight: bold
|
|
114
|
-
&:hover
|
|
115
|
-
color: $color-hover
|
|
116
|
-
.vsys
|
|
117
|
-
margin: 2px
|
|
118
|
-
padding: 1px 8px
|
|
119
|
-
background-color: var(--color-block)
|
|
120
|
-
.vmeta
|
|
121
|
-
.vat
|
|
122
|
-
font-weight: bold
|
|
123
|
-
color: $color-link
|
|
124
|
-
trans()
|
|
125
|
-
&:hover
|
|
126
|
-
color: $color-hover
|
|
127
|
-
.vcontent
|
|
128
|
-
padding-top: 0
|
|
129
|
-
blockquote
|
|
130
|
-
padding-top: $gap-p
|
|
131
|
-
padding-bottom: $gap-p
|
|
132
|
-
background: var(--color-block)
|
|
133
|
-
border-left: $border-codeblock solid $color-theme
|
|
134
|
-
border-radius: $border-codeblock
|
|
135
|
-
trans()
|
|
136
|
-
code
|
|
137
|
-
color: var(--color-p)
|
|
138
|
-
font-family: $fontfamily-code
|
|
139
|
-
pre
|
|
140
|
-
background: var(--color-codeblock)
|
|
141
|
-
code
|
|
142
|
-
border: none
|
|
143
|
-
a
|
|
144
|
-
color: $color-link
|
|
145
|
-
line-height: inherit
|
|
146
|
-
trans()
|
|
147
|
-
&:hover
|
|
148
|
-
color: $color-hover
|
|
149
|
-
text-decoration: underline
|
|
150
|
-
p
|
|
151
|
-
color: var(--color-p)
|
|
152
|
-
margin-top: $gap-p
|
|
153
|
-
margin-bottom: $gap-p
|
|
154
|
-
line-height: inherit
|
|
155
|
-
.vemoji
|
|
156
|
-
max-height: 24px
|
|
157
|
-
border-radius: 0
|
|
158
|
-
margin-top: -10px
|
|
159
|
-
max-width: 100px
|
|
160
|
-
.vempty
|
|
161
|
-
color: var(--color-meta)
|
|
162
|
-
.vpower
|
|
163
|
-
&,a
|
|
164
|
-
font-size: $fontsize-footnote
|
|
165
|
-
a
|
|
166
|
-
color: var(--color-p)
|
|
167
|
-
&:hover
|
|
168
|
-
text-decoration: underline
|
|
169
|
-
color: $color-hover
|
|
170
|
-
.vinput
|
|
171
|
-
color: var(--color-text)
|
|
172
|
-
p
|
|
173
|
-
color: var(--color-text)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.md .simpleuser-group
|
|
2
|
-
margin: 0
|
|
3
|
-
display: grid
|
|
4
|
-
grid-template-columns: repeat(auto-fill, 112px)
|
|
5
|
-
.md .simpleuser
|
|
6
|
-
text-align: center
|
|
7
|
-
padding: 1em .5em
|
|
8
|
-
border-radius: 4px
|
|
9
|
-
img
|
|
10
|
-
display: block
|
|
11
|
-
width: 50px
|
|
12
|
-
height 50px
|
|
13
|
-
border-radius: 50px
|
|
14
|
-
object-fit: cover
|
|
15
|
-
img+span
|
|
16
|
-
display: block
|
|
17
|
-
font-size: $fontsize-meta
|
|
18
|
-
line-height: 1.2
|
|
19
|
-
color: var(--color-text)
|
|
20
|
-
&:hover
|
|
21
|
-
background: var(--color-site-bg)
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
.site-card-group
|
|
2
|
-
display: flex
|
|
3
|
-
flex-wrap: wrap
|
|
4
|
-
justify-content: flex-start
|
|
5
|
-
margin: -0.5 * $gap
|
|
6
|
-
align-items: stretch
|
|
7
|
-
.site-card
|
|
8
|
-
margin: $gap * 0.5
|
|
9
|
-
width: "calc(100% / 4 - %s)" % $gap
|
|
10
|
-
@media screen and (min-width: $device-2k)
|
|
11
|
-
width: "calc(100% / 5 - %s)" % $gap
|
|
12
|
-
@media screen and (max-width: $device-tablet)
|
|
13
|
-
width: "calc(100% / 3 - %s)" % $gap
|
|
14
|
-
@media screen and (max-width: $device-mobile)
|
|
15
|
-
width: "calc(100% / 2 - %s)" % $gap
|
|
16
|
-
display: block
|
|
17
|
-
line-height: 1.4
|
|
18
|
-
height 100%
|
|
19
|
-
.img
|
|
20
|
-
width: 100%
|
|
21
|
-
height 120px
|
|
22
|
-
@media screen and (max-width: $device-mobile)
|
|
23
|
-
height 100px
|
|
24
|
-
overflow: hidden
|
|
25
|
-
border-radius: $border-card * 0.5
|
|
26
|
-
box-shadow: 0 1px 2px 0px rgba(0, 0, 0, 0.2)
|
|
27
|
-
background: var(--color-block)
|
|
28
|
-
img
|
|
29
|
-
width: 100%
|
|
30
|
-
height 100%
|
|
31
|
-
// trans(.75s)
|
|
32
|
-
transition: transform 2s ease
|
|
33
|
-
object-fit: cover
|
|
34
|
-
|
|
35
|
-
.info
|
|
36
|
-
margin-top: $gap * 0.5
|
|
37
|
-
img
|
|
38
|
-
width: 32px
|
|
39
|
-
height: 32px
|
|
40
|
-
border-radius: 16px
|
|
41
|
-
float: left
|
|
42
|
-
margin-right: 8px
|
|
43
|
-
margin-top: 2px
|
|
44
|
-
span
|
|
45
|
-
display: block
|
|
46
|
-
.title
|
|
47
|
-
font-weight: 600
|
|
48
|
-
font-size: $fontsize-list
|
|
49
|
-
color: var(--color-p)
|
|
50
|
-
display: -webkit-box
|
|
51
|
-
-webkit-box-orient: vertical
|
|
52
|
-
overflow: hidden
|
|
53
|
-
-webkit-line-clamp: 1
|
|
54
|
-
trans()
|
|
55
|
-
.desc
|
|
56
|
-
font-size: $fontsize-footnote
|
|
57
|
-
word-wrap: break-word;
|
|
58
|
-
line-height: 1.2
|
|
59
|
-
color: var(--color-meta)
|
|
60
|
-
display: -webkit-box
|
|
61
|
-
-webkit-box-orient: vertical
|
|
62
|
-
overflow: hidden
|
|
63
|
-
-webkit-line-clamp: 2
|
|
64
|
-
.img
|
|
65
|
-
trans()
|
|
66
|
-
&:hover
|
|
67
|
-
.img
|
|
68
|
-
box-shadow: $boxshadow-float, $boxshadow-card-float
|
|
69
|
-
.info .title
|
|
70
|
-
color: $color-hover
|
package/source/js/aplayer.js
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
// 检查 Aplayer 对象状态
|
|
2
|
-
function checkAPlayer() {
|
|
3
|
-
if (APlayerController.player == undefined) {
|
|
4
|
-
setAPlayerObject();
|
|
5
|
-
} else {
|
|
6
|
-
if (APlayerController.observer == undefined) {
|
|
7
|
-
setAPlayerObserver();
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// 设置全局播放器所对应的 aplyer 对象
|
|
13
|
-
function setAPlayerObject() {
|
|
14
|
-
document.querySelectorAll('meting-js').forEach((item, index)=>{
|
|
15
|
-
if (item.meta.id == APlayerController.id) {
|
|
16
|
-
if (document.querySelectorAll('meting-js')[index].aplayer != undefined) {
|
|
17
|
-
APlayerController.player = document.querySelectorAll('meting-js')[index].aplayer;
|
|
18
|
-
setAPlayerObserver();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// 事件监听
|
|
25
|
-
function setAPlayerObserver() {
|
|
26
|
-
try {
|
|
27
|
-
APlayerController.player.on('play', function (e) {
|
|
28
|
-
updateAPlayerControllerStatus();
|
|
29
|
-
});
|
|
30
|
-
APlayerController.player.on('pause', function (e) {
|
|
31
|
-
updateAPlayerControllerStatus();
|
|
32
|
-
});
|
|
33
|
-
APlayerController.player.on('volumechange', function (e) {
|
|
34
|
-
onUpdateAPlayerVolume();
|
|
35
|
-
});
|
|
36
|
-
APlayerController.player.on('loadstart', function (e) {
|
|
37
|
-
// 跳到下一曲时更新标题
|
|
38
|
-
updateTitle();
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// 监听音量手势
|
|
42
|
-
APlayerController.volumeBarWrap = document.getElementsByClassName('nav volume')[0].children[0];
|
|
43
|
-
APlayerController.volumeBar = APlayerController.volumeBarWrap.children[0]
|
|
44
|
-
function updateAPlayerVolume(e) {
|
|
45
|
-
let percentage = ((e.clientX || e.changedTouches[0].clientX) - APlayerController.volumeBar.getBoundingClientRect().left) / APlayerController.volumeBar.clientWidth;
|
|
46
|
-
percentage = Math.max(percentage, 0);
|
|
47
|
-
percentage = Math.min(percentage, 1);
|
|
48
|
-
APlayerController.player.volume(percentage);
|
|
49
|
-
}
|
|
50
|
-
const thumbMove = (e) => {
|
|
51
|
-
updateAPlayerVolume(e);
|
|
52
|
-
};
|
|
53
|
-
const thumbUp = (e) => {
|
|
54
|
-
APlayerController.volumeBarWrap.classList.remove('aplayer-volume-bar-wrap-active');
|
|
55
|
-
document.removeEventListener('mouseup', thumbUp);
|
|
56
|
-
document.removeEventListener('mousemove', thumbMove);
|
|
57
|
-
updateAPlayerVolume(e);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
APlayerController.volumeBarWrap.addEventListener('mousedown', () => {
|
|
61
|
-
APlayerController.volumeBarWrap.classList.add('aplayer-volume-bar-wrap-active');
|
|
62
|
-
document.addEventListener('mousemove', thumbMove);
|
|
63
|
-
document.addEventListener('mouseup', thumbUp);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
// 设置完监听就立即更新一次
|
|
68
|
-
updateAPlayerControllerStatus();
|
|
69
|
-
onUpdateAPlayerVolume();
|
|
70
|
-
APlayerController.observer = true;
|
|
71
|
-
console.log('APlayerController ready!');
|
|
72
|
-
|
|
73
|
-
} catch (error) {
|
|
74
|
-
delete APlayerController.observer;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// 更新控制器状态
|
|
79
|
-
function updateAPlayerControllerStatus() {
|
|
80
|
-
try {
|
|
81
|
-
if (APlayerController.player.audio.paused) {
|
|
82
|
-
document.getElementsByClassName('nav toggle')[0].children[0].classList.add("fa-play");
|
|
83
|
-
document.getElementsByClassName('nav toggle')[0].children[0].classList.remove("fa-pause");
|
|
84
|
-
} else {
|
|
85
|
-
document.getElementsByClassName('nav toggle')[0].children[0].classList.remove("fa-play");
|
|
86
|
-
document.getElementsByClassName('nav toggle')[0].children[0].classList.add("fa-pause");
|
|
87
|
-
}
|
|
88
|
-
} catch (error) {
|
|
89
|
-
console.log(error);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function onUpdateAPlayerVolume() {
|
|
93
|
-
try {
|
|
94
|
-
APlayerController.volumeBar.children[0].style.width = APlayerController.player.audio.volume * 100 + '%'
|
|
95
|
-
} catch (error) {
|
|
96
|
-
console.log(error);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// 播放/暂停
|
|
101
|
-
function aplayerToggle() {
|
|
102
|
-
checkAPlayer();
|
|
103
|
-
try {
|
|
104
|
-
APlayerController.player.toggle();
|
|
105
|
-
} catch (error) {
|
|
106
|
-
console.log(error);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// 上一曲
|
|
111
|
-
function aplayerBackward() {
|
|
112
|
-
checkAPlayer();
|
|
113
|
-
try {
|
|
114
|
-
APlayerController.player.skipBack();
|
|
115
|
-
APlayerController.player.play();
|
|
116
|
-
} catch (error) {
|
|
117
|
-
console.log(error);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// 下一曲
|
|
122
|
-
function aplayerForward() {
|
|
123
|
-
checkAPlayer();
|
|
124
|
-
try {
|
|
125
|
-
APlayerController.player.skipForward();
|
|
126
|
-
APlayerController.player.play();
|
|
127
|
-
} catch (error) {
|
|
128
|
-
console.log(error);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// 调节音量
|
|
133
|
-
function aplayerVolume(percent) {
|
|
134
|
-
checkAPlayer();
|
|
135
|
-
try {
|
|
136
|
-
APlayerController.player.volume(percent);
|
|
137
|
-
} catch (error) {
|
|
138
|
-
console.log(error);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// 更新音乐标题
|
|
143
|
-
function updateTitle() {
|
|
144
|
-
checkAPlayer();
|
|
145
|
-
try {
|
|
146
|
-
let index = APlayerController.player.list.index;
|
|
147
|
-
let obj = APlayerController.player.list.audios[index];
|
|
148
|
-
document.getElementsByClassName('nav music-title')[0].innerHTML = obj.title;
|
|
149
|
-
} catch (error) {
|
|
150
|
-
console.log(error);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
var checkrightmenu = setInterval(function () {
|
|
154
|
-
console.log(0)
|
|
155
|
-
if (!document.querySelectorAll('meting-js')[0].meta) return
|
|
156
|
-
if (!document.querySelectorAll('meting-js')[0].meta.id) return
|
|
157
|
-
clearInterval(checkrightmenu)
|
|
158
|
-
checkAPlayer();
|
|
159
|
-
console.log(1)
|
|
160
|
-
}, 1000)
|
|
161
|
-
|
package/source/js/issues.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
const IssuesAPI = {
|
|
2
|
-
requestIssuesAPI(url, callback, timeout) {
|
|
3
|
-
let retryTimes = 10;
|
|
4
|
-
function request() {
|
|
5
|
-
return new Promise((resolve, reject) => {
|
|
6
|
-
let status = 0; // 0 等待 1 完成 2 超时
|
|
7
|
-
let timer = setTimeout(() => {
|
|
8
|
-
if (status === 0) {
|
|
9
|
-
status = 2;
|
|
10
|
-
timer = null;
|
|
11
|
-
reject("请求超时");
|
|
12
|
-
if (retryTimes == 0) {
|
|
13
|
-
timeout();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}, 5000);
|
|
17
|
-
fetch(url).then(function(response) {
|
|
18
|
-
if (status !== 2) {
|
|
19
|
-
clearTimeout(timer);
|
|
20
|
-
resolve(response);
|
|
21
|
-
timer = null;
|
|
22
|
-
status = 1;
|
|
23
|
-
}
|
|
24
|
-
if(response.ok) {
|
|
25
|
-
return response.json();
|
|
26
|
-
}
|
|
27
|
-
throw new Error('Network response was not ok.');
|
|
28
|
-
}).then(function(data) {
|
|
29
|
-
retryTimes = 0;
|
|
30
|
-
callback(data);
|
|
31
|
-
}).catch(function(error) {
|
|
32
|
-
if (retryTimes > 0) {
|
|
33
|
-
retryTimes -= 1;
|
|
34
|
-
setTimeout(() => {
|
|
35
|
-
request();
|
|
36
|
-
}, 5000);
|
|
37
|
-
} else {
|
|
38
|
-
timeout();
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
request();
|
|
44
|
-
},
|
|
45
|
-
parseIssueStrToJson(str) {
|
|
46
|
-
let jsonStr = str.match(/```json[\s|\S]*```/);
|
|
47
|
-
if (jsonStr && jsonStr.length > 0) {
|
|
48
|
-
jsonStr = jsonStr[0];
|
|
49
|
-
}
|
|
50
|
-
if (jsonStr) {
|
|
51
|
-
jsonStr = jsonStr.split('```json')[1].split('```')[0];
|
|
52
|
-
if (jsonStr) {
|
|
53
|
-
return JSON.parse(jsonStr);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return undefined;
|
|
57
|
-
},
|
|
58
|
-
groupIssuesData(cfg, data) {
|
|
59
|
-
var groups = new Object();
|
|
60
|
-
if (data.length > 0) {
|
|
61
|
-
if (cfg.group != undefined) {
|
|
62
|
-
let arr = cfg.group.split(':');
|
|
63
|
-
if (arr.length > 1) {
|
|
64
|
-
let groupKey = arr[0];
|
|
65
|
-
let groupList = arr[1];
|
|
66
|
-
if (groupKey && groupList) {
|
|
67
|
-
groupList = groupList.split(',');
|
|
68
|
-
}
|
|
69
|
-
cfg.group = groupList;
|
|
70
|
-
for (i = 0; i < data.length; i++) {
|
|
71
|
-
let obj = this.parseIssueStrToJson(data[i].body);
|
|
72
|
-
if (obj && (groupKey in obj)) {
|
|
73
|
-
let tmp = obj[groupKey];
|
|
74
|
-
tmp = tmp.replace(', ', ',').split(',');
|
|
75
|
-
for (var j = 0; j < tmp.length; j++) {
|
|
76
|
-
if (groupList.includes(tmp[j])) {
|
|
77
|
-
let arr = groups[tmp[j]];
|
|
78
|
-
if (arr == undefined) {
|
|
79
|
-
arr = new Array();
|
|
80
|
-
}
|
|
81
|
-
arr.push(obj);
|
|
82
|
-
groups[tmp[j]] = arr;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
} else {
|
|
89
|
-
cfg.group = [''];
|
|
90
|
-
for (i = 0; i < data.length; i++) {
|
|
91
|
-
let obj = this.parseIssueStrToJson(data[i].body);
|
|
92
|
-
if (obj) {
|
|
93
|
-
let arr = groups[''];
|
|
94
|
-
if (arr == undefined) {
|
|
95
|
-
arr = new Array();
|
|
96
|
-
}
|
|
97
|
-
arr.push(obj);
|
|
98
|
-
groups[''] = arr;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return groups;
|
|
104
|
-
},
|
|
105
|
-
getIssuesAPIForSites(cfg) {
|
|
106
|
-
let el = $(cfg.el)[0];
|
|
107
|
-
$(el).append('<div class="loading"><i class="fa fa-cog fa-2x fa-spin"></i><p>正在加载</p></div>');
|
|
108
|
-
this.requestIssuesAPI(cfg.api, function(data){
|
|
109
|
-
$(el).find('.loading').remove();
|
|
110
|
-
let dt = IssuesAPI.groupIssuesData(cfg, data);
|
|
111
|
-
let groupTitles = Object.keys(dt);
|
|
112
|
-
cfg.group.forEach((groupTitle, i) => {
|
|
113
|
-
let issues = dt[groupTitle];
|
|
114
|
-
if (issues && issues.length > 0) {
|
|
115
|
-
if (groupTitle.length > 0) {
|
|
116
|
-
$(el).append('<h2>' + groupTitle + '</h2>');
|
|
117
|
-
} else if (name == '' && groupTitles.length > 1) {
|
|
118
|
-
$(el).append('<h2>' + '未分组' + '</h2>');
|
|
119
|
-
}
|
|
120
|
-
$(el).append('<div class="site-card-group ' + i + '"></div>');
|
|
121
|
-
// layout items
|
|
122
|
-
for (j = 0; j < issues.length; j++) {
|
|
123
|
-
let issue = issues[j];
|
|
124
|
-
let imgTag = '';
|
|
125
|
-
if (issue.screenshot && issue.screenshot.length > 0) {
|
|
126
|
-
imgTag = '<div class="img"><img src="' + issue.screenshot + '" onerror="javascript:this.src=\'https://image.thum.io/get/width/1024/crop/768/' + issue.url + '\';"/></div>';
|
|
127
|
-
} else {
|
|
128
|
-
imgTag = '<div class="img"></div>';
|
|
129
|
-
}
|
|
130
|
-
let infoTag = '<div class="info">';
|
|
131
|
-
if (issue.avatar && issue.avatar.length > 0) {
|
|
132
|
-
infoTag += '<img src="' + issue.avatar + '" onerror="javascript:this.src=\'https://image.thum.io/get/width/1024/crop/768/' + issue.url + '\';"/>';
|
|
133
|
-
}
|
|
134
|
-
infoTag += '<span class="title">' + issue.title + '</span><span class="desc">' + issue.description + '</span></div>';
|
|
135
|
-
let cardTag = "<a class='site-card' target='_blank' href='" + issue.url + "'>" + imgTag + infoTag + "</a>";
|
|
136
|
-
$(el).find('.site-card-group.' + i).append(cardTag);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
}, function() {
|
|
141
|
-
$(el).find('.loading i').remove();
|
|
142
|
-
$(el).find('.loading p').text('加载失败,请稍后重试。');
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
getIssuesAPIForTimeline(cfg) {
|
|
146
|
-
let el = $(cfg.el)[0];
|
|
147
|
-
$(el).append('<div class="loading"><i class="fa fa-cog fa-2x fa-spin"></i><p>正在加载</p></div>');
|
|
148
|
-
this.requestIssuesAPI(cfg.api, function(data){
|
|
149
|
-
$(el).find('.loading').remove();
|
|
150
|
-
if (data.length > 0) {
|
|
151
|
-
for (i = 0; i < data.length; i++) {
|
|
152
|
-
let a = ' <a class="comments" target="_blank" href="' + data[i].html_url + '"><i class="fa fa-comment-dots fa-fw"></i>' + data[i].comments + '</a>';
|
|
153
|
-
let meta = '<div class="meta"><p></p><p>' + data[i].title + a + '</p><p></p></div>';
|
|
154
|
-
let body = '<div class="body"><p>' + data[i].body + '</p></div>';
|
|
155
|
-
let tag = '<div class="timenode">' + meta + body + '</div>';
|
|
156
|
-
$(el).append(tag);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}, function() {
|
|
160
|
-
$(el).find('.loading i').remove();
|
|
161
|
-
$(el).find('.loading p').text('加载失败,请稍后重试。');
|
|
162
|
-
});
|
|
163
|
-
},
|
|
164
|
-
request() {
|
|
165
|
-
let els = document.getElementsByClassName('issues-api');
|
|
166
|
-
for (var i = 0; i < els.length; i++) {
|
|
167
|
-
let el = els[i];
|
|
168
|
-
let api = el.getAttribute('api');
|
|
169
|
-
let group = el.getAttribute('group');
|
|
170
|
-
var cfg = new Object();
|
|
171
|
-
cfg.class = el.getAttribute('class');
|
|
172
|
-
cfg.el = el;
|
|
173
|
-
cfg.api = api;
|
|
174
|
-
cfg.group = group;
|
|
175
|
-
if (cfg.class.split(' ').includes('sites')) {
|
|
176
|
-
this.getIssuesAPIForSites(cfg);
|
|
177
|
-
} else if (cfg.class.split(' ').includes('timeline')) {
|
|
178
|
-
this.getIssuesAPIForTimeline(cfg);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
IssuesAPI.request();
|
|
184
|
-
document.addEventListener('pjax:complete', function () {
|
|
185
|
-
IssuesAPI.request();
|
|
186
|
-
});
|