hexo-theme-stellar 1.9.0 → 1.10.0

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.
Files changed (56) hide show
  1. package/_config.yml +47 -19
  2. package/languages/en.yml +0 -5
  3. package/languages/zh-CN.yml +0 -5
  4. package/languages/zh-TW.yml +0 -5
  5. package/layout/404.ejs +1 -1
  6. package/layout/_partial/main/footer.ejs +6 -17
  7. package/layout/_partial/main/header/index.ejs +1 -1
  8. package/layout/_partial/plugins/comments/valine/script.ejs +1 -1
  9. package/layout/_partial/scripts/index.ejs +5 -3
  10. package/layout/_partial/sidebar/index.ejs +3 -1
  11. package/layout/_partial/sidebar/widgets/ghuser.ejs +59 -0
  12. package/layout/_partial/sidebar/widgets/repo_info.ejs +28 -9
  13. package/layout/post.ejs +1 -1
  14. package/layout/wiki.ejs +1 -1
  15. package/package.json +1 -1
  16. package/scripts/tags/about.js +12 -13
  17. package/scripts/tags/friends.js +2 -3
  18. package/scripts/tags/ghcard.js +2 -2
  19. package/scripts/tags/lib/users.js +1 -2
  20. package/scripts/tags/sites.js +2 -3
  21. package/scripts/tags/timeline.js +30 -25
  22. package/source/css/_common/base.styl +2 -9
  23. package/source/css/_common/button.styl +1 -1
  24. package/source/css/_common/device.styl +2 -2
  25. package/source/css/_common/highlight.styl +4 -3
  26. package/source/css/_common/html.styl +2 -0
  27. package/source/css/_common/loading.styl +5 -0
  28. package/source/css/_common/pre.styl +6 -0
  29. package/source/css/_custom.styl +17 -1
  30. package/source/css/_defines/const.styl +1 -0
  31. package/source/css/_defines/theme.styl +1 -1
  32. package/source/css/_layout/layout.styl +2 -2
  33. package/source/css/_layout/main.styl +2 -2
  34. package/source/css/_layout/md.styl +35 -1
  35. package/source/css/_layout/partial/footer.styl +3 -7
  36. package/source/css/_layout/partial/navbar.styl +1 -1
  37. package/source/css/_layout/partial/paginator.styl +4 -0
  38. package/source/css/_layout/partial/related.styl +2 -0
  39. package/source/css/_layout/sidebar/ghuser.styl +80 -0
  40. package/source/css/_layout/sidebar/repo_info.styl +4 -1
  41. package/source/css/_layout/sidebar/sidebar.styl +2 -2
  42. package/source/css/_layout/tag-plugins/about.styl +13 -16
  43. package/source/css/_layout/tag-plugins/common.styl +1 -1
  44. package/source/css/_layout/tag-plugins/friends.styl +3 -6
  45. package/source/css/_layout/tag-plugins/inline-labels.styl +1 -0
  46. package/source/css/_layout/tag-plugins/link.styl +2 -1
  47. package/source/css/_layout/tag-plugins/note.styl +8 -0
  48. package/source/css/_layout/tag-plugins/sites.styl +2 -6
  49. package/source/css/_layout/tag-plugins/tabs.styl +5 -0
  50. package/source/css/_layout/tag-plugins/timeline.styl +85 -2
  51. package/source/css/_layout/tag-plugins/toc.styl +1 -1
  52. package/source/js/main.js +13 -15
  53. package/source/js/plugins/friends.js +1 -2
  54. package/source/js/plugins/ghinfo.js +73 -0
  55. package/source/js/plugins/sites.js +1 -1
  56. package/source/js/plugins/timeline.js +122 -0
@@ -3,13 +3,14 @@ code
3
3
  -moz-osx-font-smoothing: auto
4
4
  color: var(--text-code)
5
5
  font-family: $ff-code
6
- word-break: break-all
6
+
7
+ p>code:not([class]),li>code:not([class])
7
8
  font-size: 85%
8
9
  background: var(--block)
9
10
  padding: .2em .4em
10
11
  border-radius: 4px
11
12
 
12
- article.md .highlight
13
+ article.md .highlight, pre:not([class]):has(>code)
13
14
  margin: var(--gap-p) 0
14
15
  border-radius: $border-block
15
16
  overflow: hidden
@@ -168,7 +169,7 @@ $hl-red = #EE2B29
168
169
  $hl-orange = #FB3F1B
169
170
  $hl-amber = #FD8607
170
171
  $hl-text = var(--text-p1)
171
- pre
172
+ .code>pre
172
173
  .code:before
173
174
  display: none
174
175
  // 行
@@ -5,6 +5,8 @@ html
5
5
  font-size: $fs-root
6
6
  -webkit-text-size-adjust: 100%
7
7
  -ms-text-size-adjust: 100%
8
+ if hexo-config('style.smooth_scroll')
9
+ scroll-behavior: smooth
8
10
  body
9
11
  background: var(--site-bg)
10
12
  margin: 0
@@ -13,3 +13,8 @@ svg.loading
13
13
  transform:rotate(0deg)
14
14
  to
15
15
  transform:rotate(360deg)
16
+
17
+ .loading-wrap
18
+ min-height: 50px
19
+ margin: 2rem 0
20
+ text-align: center
@@ -0,0 +1,6 @@
1
+ pre:not([class]):has(>code)
2
+ display: block
3
+ padding: 1rem
4
+ overflow: scroll
5
+ code
6
+ padding: 0
@@ -38,9 +38,18 @@ $dark-site-bg-mobile = black
38
38
 
39
39
  $ff-body = system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif
40
40
  $ff-code = Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif
41
-
42
41
  $ff-logo = $ff-body
43
42
 
43
+ if hexo-config('style.font-family.body')
44
+ $ff-body = convert(hexo-config('style.font-family.body'))
45
+
46
+ if hexo-config('style.font-family.code')
47
+ $ff-code = convert(hexo-config('style.font-family.code'))
48
+
49
+ if hexo-config('style.font-family.logo')
50
+ $ff-logo = convert(hexo-config('style.font-family.logo'))
51
+
52
+
44
53
  // font size
45
54
  $fs-root = 16px
46
55
  $fs-15 = .9375rem
@@ -76,6 +85,13 @@ $border-image = 6px
76
85
  @media screen and (min-width: $device-4k)
77
86
  --width-main: 860px
78
87
  --gap-l: 64px
88
+ // iPad 竖屏
89
+ @media screen and (max-width: $device-tablet)
90
+ --width-left: 220px
91
+ // iPad 竖屏
92
+ @media screen and (max-width: $device-mobile-max)
93
+ --width-left: 256px
94
+
79
95
 
80
96
 
81
97
  // shadow
@@ -2,6 +2,7 @@
2
2
  $device-mobile-375 = 375px
3
3
  $device-mobile-425 = 425px
4
4
  $device-mobile = 500px
5
+ $device-mobile-max = 667px
5
6
  $device-tablet = 768px
6
7
  $device-laptop = 1024px
7
8
  $device-desktop = 1440px
@@ -30,7 +30,7 @@ set_darkmode()
30
30
  --card: $dark-card
31
31
  --theme-highlight: $color-theme
32
32
  --theme-bg: mix($color-theme, $dark-card, 10)
33
- @media screen and (max-width: $device-tablet)
33
+ @media screen and (max-width: $device-mobile-max)
34
34
  --site-bg: $dark-site-bg-mobile
35
35
  --card: darken($dark-card, 6)
36
36
  --block: darken($dark-block, 4)
@@ -19,8 +19,8 @@
19
19
  max-width: var(--width-main)
20
20
 
21
21
 
22
- // iPad 竖屏
23
- @media screen and (max-width: $device-tablet)
22
+ // 手机布局
23
+ @media screen and (max-width: $device-mobile-max)
24
24
  .mobile-only
25
25
  display: block !important
26
26
  .l_body
@@ -3,8 +3,8 @@
3
3
  padding-bottom: "calc(1 * %s)" % var(--gap-l)
4
4
  @media screen and (min-width: 1400px)
5
5
  margin-left: "calc(2 * %s)" % var(--gap-l)
6
- margin-right: "calc(2 * %s + %s)" % (var(--gap-l) var(--width-left))
7
- @media screen and (min-width: $device-tablet)
6
+ margin-right: "calc(2 * %s + %s / 2)" % (var(--gap-l) var(--width-left))
7
+ @media screen and (min-width: $device-mobile-max)
8
8
  padding-top: "calc(2 * %s)" % var(--gap-l)
9
9
  header
10
10
  margin: 4rem 1rem 2rem
@@ -25,6 +25,8 @@ article.md.content
25
25
  >p:not([class])
26
26
  text-indent: 'calc(%s * 2)' % $fs-p
27
27
  text-align: justify
28
+ a
29
+ text-indent: 0
28
30
  h1,h2,h3,h4,h5,h6
29
31
  text-align: center
30
32
  >h2:not([class])
@@ -32,7 +34,7 @@ article.md.content
32
34
  border-bottom-style: dashed
33
35
  border-bottom-color: $color-highlight
34
36
  >:first-child
35
- margin-top: 1rem
37
+ margin-top: 0
36
38
  h1:not(:first-child)
37
39
  margin-top: 2em
38
40
  h2:first-child
@@ -129,3 +131,35 @@ article.md img
129
131
  border-radius: $border-image
130
132
  margin: auto
131
133
  display: block
134
+
135
+ article.md
136
+ p:not([class]), li:not([class])
137
+ a:not([class])
138
+ position: relative
139
+ padding: 2px
140
+ text-decoration: none
141
+ display: inline-block
142
+ line-height: 1.2
143
+ &:after
144
+ content: ''
145
+ position: absolute
146
+ border-radius: 2px
147
+ bottom: 1px
148
+ left: 2px
149
+ right: 2px
150
+ height: 1px
151
+ opacity: 0.5
152
+ background: $color-link
153
+ trans1: all
154
+ &:hover
155
+ border-bottom: none
156
+ color: $color-link
157
+ // color: darken($color-hover, 10)
158
+ // background: alpha($color-hover, 0.08)
159
+ &:after
160
+ height: 100%
161
+ opacity: 0.2
162
+ bottom: 0
163
+ left: 0
164
+ right: 0
165
+ // background-color: alpha($color-hover, 0.08)
@@ -34,11 +34,7 @@
34
34
  .page-footer .text
35
35
  p
36
36
  margin: 4px 0
37
- line-height: 1.2
38
- a
37
+ line-height: 1.5
38
+ a:not([class])
39
39
  text-decoration: underline
40
- font-weight: 500
41
- margin: inherit
42
- padding: inherit
43
- &:hover
44
- background: inherit
40
+ font-weight: 500
@@ -54,6 +54,6 @@ nav.cap
54
54
  a+a
55
55
  margin-left: 4px
56
56
 
57
- @media screen and (max-width: $device-tablet)
57
+ @media screen and (max-width: $device-mobile-max)
58
58
  .nav-wrap
59
59
  margin-top: 0
@@ -12,6 +12,10 @@
12
12
  &:hover
13
13
  .paginator
14
14
  text-align: center
15
+ &.next
16
+ border-left: 1px dashed var(--block-border)
17
+ &.prev
18
+ border-right: 1px dashed var(--block-border)
15
19
  .current
16
20
  font-family: $ff-code
17
21
  color: var(--text-p3)
@@ -131,6 +131,8 @@
131
131
  text-decoration: underline
132
132
  &:hover
133
133
  color: $color-hover
134
+ &:after
135
+ display: none
134
136
  div.cmt-body
135
137
  min-height: 150px
136
138
  position: relative
@@ -0,0 +1,80 @@
1
+ .widget-wrap#github-user
2
+ .widget-header+.widget-body
3
+ margin: 0.75rem 0
4
+ .widget-wrap#github-user .widget-body
5
+ text-align: center
6
+ background: var(--card)
7
+ border-radius: $border-card
8
+ padding: 1rem
9
+
10
+ .widget-wrap#github-user .widget-body .avatar
11
+ display: block
12
+ border-radius: 100%
13
+ margin: 1rem auto 1.25rem auto
14
+ max-width: 75%
15
+ overflow: hidden
16
+ img
17
+ display: block
18
+ @media screen and (max-width: $device-tablet)
19
+ max-width: 50%
20
+
21
+ .widget-wrap#github-user .widget-body .username
22
+ font-weight: 900
23
+ font-size: $fs-h2
24
+ color: var(--text-p0)
25
+ margin: 0.5rem 0
26
+
27
+ .widget-wrap#github-user .widget-body .bio
28
+ font-size: $fs-13
29
+ margin: 0.5rem 0
30
+
31
+ .widget-wrap#github-user .widget-body .follow
32
+ font-weight: 500
33
+ border-radius: 64px
34
+ padding: 0.5rem 1rem
35
+ background: $color-theme
36
+ color: var(--card)
37
+ font-size: 1rem
38
+ align-self: stretch
39
+ text-align: center
40
+ line-height: 1.5
41
+ display: flex
42
+ align-items: center
43
+ justify-content: center
44
+ trans1: background
45
+ svg
46
+ margin-right: 6px
47
+ &:hover
48
+ background: $color-hover
49
+
50
+
51
+
52
+ .widget-wrap#github-user .widget-body .buttons
53
+ margin: 1rem 0
54
+ align-self: stretch
55
+ display: grid
56
+ grid-gap: 2px
57
+ grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 2px)
58
+
59
+ .widget-wrap#github-user .widget-body .btn
60
+ display: flex
61
+ flex-direction: column
62
+ align-items: center
63
+ color: inherit
64
+ border: 1px solid transparent
65
+ border-radius: 4px
66
+ padding: 0.25rem 0
67
+ trans1: background
68
+ &:hover
69
+ background: var(--block)
70
+
71
+
72
+ .widget-wrap#github-user .widget-body .buttons .btn .title
73
+ font-size: 1rem
74
+ font-weight: 700
75
+
76
+
77
+ .widget-wrap#github-user .widget-body .buttons .btn .desc
78
+ font-size: $fs-12
79
+ color: var(--text-p3)
80
+ font-weight: 500
@@ -20,9 +20,12 @@
20
20
  padding: 0.5rem .5rem
21
21
  font-size: $fs-13
22
22
  justify-content: space-between
23
- flex-direction: row-reverse
24
23
  svg
25
24
  width: 1em
26
25
  height: 1em
26
+ margin-left: 4px
27
+ div
28
+ display: flex
29
+ align-items: center
27
30
  a:hover
28
31
  background: var(--block-hover)
@@ -6,14 +6,14 @@
6
6
  padding: var(--gap-l)
7
7
  padding-top: "calc(2 * %s)" % var(--gap-l)
8
8
  height: "calc(100vh - 3 * %s)" % var(--gap-l)
9
- @media screen and (max-width: $device-tablet)
9
+ @media screen and (max-width: $device-mobile-max)
10
10
  padding-top: "calc(1 * %s)" % var(--gap-l)
11
11
  height: "calc(100% - 2 * %s)" % var(--gap-l)
12
12
 
13
13
  .l_left[layout=wiki]
14
14
  padding-bottom: 0
15
15
  height: "calc(100vh - 2 * %s)" % var(--gap-l)
16
- @media screen and (max-width: $device-tablet)
16
+ @media screen and (max-width: $device-mobile-max)
17
17
  height: "calc(100% - 1 * %s)" % var(--gap-l)
18
18
  .widgets >:last-child
19
19
  margin-bottom: 6rem
@@ -1,12 +1,12 @@
1
1
  .tag-plugin.about
2
2
  background: var(--block)
3
- border-radius: $border-block
3
+ border-radius: $border-card
4
4
  padding: 2rem
5
5
  .about-header
6
6
  display flex
7
- flex-direction: row-reverse
8
- justify-content: space-between
7
+ justify-content: center
9
8
  flex-wrap: wrap
9
+ margin: 1.5rem 0 3rem
10
10
  img
11
11
  object-fit: contain
12
12
  >img
@@ -28,28 +28,25 @@
28
28
  >p
29
29
  line-height: 1.5
30
30
  .tag-plugin.navbar:last-child
31
+ text-align: center
31
32
  nav.cap
32
33
  margin-top: 1rem
34
+ background: var(--card)
35
+ box-shadow: $boxshadow-button
33
36
  a
34
- margin: 0
35
- color: $color-link
36
- background: var(--block-hover)
37
- &.active
38
- background: none
37
+ color: var(--text-p2)
39
38
  &:hover
40
- color: $color-hover
41
- background: var(--block-border)
42
- a+a
43
- margin-left: .5rem
39
+ background: var(--block)
40
+ &.active
41
+ background: var(--block)
42
+ box-shadow: none
44
43
  .about-header+.about-body
45
44
  margin-top: 1.5rem
46
45
 
47
46
  @media screen and (max-width: $device-mobile)
48
47
  .tag-plugin.about
49
- padding: 1rem
48
+ padding: 1.5rem 1rem
50
49
  .about-header
51
- flex-direction: column
52
- .avatar
53
- margin: 1rem auto
50
+ margin: 2.5rem 0 3rem
54
51
  p
55
52
  width 100%
@@ -81,7 +81,7 @@ if hexo-config('style.darkmode') == 'auto'
81
81
  .tag-plugin[color='light']
82
82
  --theme-border: white
83
83
  --theme-bg: #ddd
84
- color: var(--site-bg) !important
84
+ color: var(--card) !important
85
85
 
86
86
  .tag-plugin[color='dark']
87
87
  --theme-border: black
@@ -15,12 +15,9 @@
15
15
  align-items: stretch
16
16
  &+.group-header
17
17
  margin-top: 2rem
18
- .friendsjs-wrap
18
+ .stellar-friends-api
19
19
  display: block
20
- .loading-wrap
21
- min-height: 50px
22
- margin: 2rem 0
23
- text-align: center
20
+
24
21
 
25
22
  .users-wrap .user-card
26
23
  flex-shrink: 1
@@ -33,7 +30,7 @@
33
30
  width: 16.66%
34
31
  @media screen and (max-width: 820px)
35
32
  width: 20%
36
- @media screen and (max-width: $device-tablet)
33
+ @media screen and (max-width: $device-mobile-max)
37
34
  width: 16.66%
38
35
  @media screen and (max-width: $device-mobile)
39
36
  width: 25%
@@ -3,6 +3,7 @@
3
3
  text-decoration: none
4
4
  border-bottom: 2px solid $color-hover
5
5
  emp
6
+ width: fit-content
6
7
  text-decoration: none
7
8
  border-bottom: 4px dotted $color-hover
8
9
  wavy
@@ -3,7 +3,7 @@
3
3
  margin: 1em auto
4
4
  display: flex
5
5
  justify-content: center
6
- @media screen and (max-width: $device-mobile-375)
6
+ @media screen and (max-width: $device-mobile-425)
7
7
  width: 100%
8
8
 
9
9
  .md .link-card
@@ -32,6 +32,7 @@
32
32
  flex-direction: column
33
33
  align-items: stretch
34
34
  width: 400px
35
+ text-align: justify
35
36
 
36
37
  .md .link-card
37
38
  line-height: 1.2
@@ -44,5 +44,13 @@
44
44
  >.tabs
45
45
  margin-top: .5rem
46
46
 
47
+ .md .tag-plugin.note[child=iframe]
48
+ overflow: hidden
49
+ padding: 0
50
+ >.body
51
+ margin: 0
52
+ iframe
53
+ margin: 0
54
+
47
55
  .md .tag-plugin .tag-plugin.note
48
56
  --gap-p: 1rem
@@ -11,12 +11,8 @@
11
11
  width: 100%
12
12
  &+.group-header
13
13
  margin-top: 2rem
14
- .sitesjs-wrap
14
+ .stellar-sites-api
15
15
  display: block
16
- .loading-wrap
17
- min-height: 50px
18
- margin: 2rem 0
19
- text-align: center
20
16
 
21
17
  .sites-wrap .group-body
22
18
  display: grid
@@ -26,7 +22,7 @@
26
22
  grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
27
23
  @media screen and (max-width: 900px)
28
24
  grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
29
- @media screen and (max-width: $device-tablet)
25
+ @media screen and (max-width: $device-mobile-max)
30
26
  grid-template-columns: repeat(auto-fill, "calc((100% - 2 * %s) / 3)" % 1rem)
31
27
  @media screen and (max-width: $device-mobile)
32
28
  grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 1rem)
@@ -79,3 +79,8 @@
79
79
  display: none
80
80
  &.active
81
81
  display: block
82
+
83
+ .md.indent .tag-plugin.tabs .tab-content p:not([class])
84
+ text-indent: 'calc(%s * 2)' % $fs-p
85
+ a
86
+ text-indent: 0
@@ -1,6 +1,9 @@
1
- .tag-plugin.timeline
1
+ .md .tag-plugin.folding .body:has(.timeline)
2
+ background: var(--site-bg)
3
+
4
+ .md .tag-plugin.timeline
2
5
  position: relative
3
- margin: 1rem 0
6
+ margin-top: 0
4
7
  padding-left: 16px
5
8
  &:before
6
9
  content: ''
@@ -12,6 +15,10 @@
12
15
  border-radius: 8px
13
16
  top: .5rem
14
17
  bottom: 0
18
+ &:has(.loading-wrap)
19
+ padding-left: 0
20
+ &:before
21
+ display: none
15
22
 
16
23
  .tag-plugin.timeline .timenode
17
24
  position: relative
@@ -45,6 +52,7 @@
45
52
  color: var(--text-p3)
46
53
  font-family: $ff-code
47
54
  trans1 color
55
+ opacity: 0.75
48
56
  a
49
57
  color: inherit
50
58
  font-weight: inherit
@@ -74,3 +82,78 @@
74
82
  margin: .5rem 0
75
83
  .tag-plugin.copy
76
84
  width: 240px
85
+
86
+
87
+ .tag-plugin.timeline.stellar-timeline-api .body
88
+ max-height: convert(hexo-config('tag_plugins.timeline.max-height'))
89
+ overflow: scroll
90
+ p
91
+ font-size: $fs-14
92
+ p.title
93
+ font-size: 1rem
94
+ font-weight: 500
95
+ margin: 0
96
+ padding: 0.5rem 0 0.75rem
97
+ line-height: 1.25
98
+ border-bottom: 1px dashed var(--block-border)
99
+ pre code
100
+ font-size: $fs-12
101
+
102
+ .tag-plugin.timeline.stellar-timeline-api .body .footer
103
+ padding: 0.5rem 0 1rem
104
+ margin-bottom: -0.5rem
105
+ user-select: none
106
+ font-weight: 500
107
+ display: flex
108
+ flex-wrap: wrap
109
+ justify-content: space-between
110
+ align-items: stretch
111
+ position: sticky
112
+ position: -webkit-sticky
113
+ bottom: -0.5rem
114
+ background: var(--card)
115
+ span
116
+ line-height: 1.8
117
+ &:empty
118
+ display: none
119
+ a.comments
120
+ margin-right: 0
121
+
122
+
123
+ .tag-plugin.timeline.stellar-timeline-api .body .footer .flex
124
+ display: flex
125
+ flex-wrap: wrap
126
+ font-size: $fs-12
127
+ align-items: stretch
128
+ .reaction
129
+ border-color: var(--block)
130
+ border-style: dashed
131
+ .item
132
+ border-width: 1px
133
+ border-style: solid
134
+ margin: 2px
135
+ border-radius: 4px
136
+ padding: 0 0.5rem
137
+ display: flex
138
+ align-items: center
139
+ &.comments
140
+ border-width: 0
141
+ &:first-child
142
+ margin-left: 0
143
+ &:last-child
144
+ margin-right: 0
145
+ .key
146
+ margin-right: 4px
147
+
148
+ .tag-plugin.timeline.stellar-timeline-api .body .footer a.comments
149
+ border-radius: 4px
150
+ padding: 0 0.5rem
151
+ color: white
152
+ trans1: all
153
+ margin-left: 2px
154
+ background: $color-theme
155
+ .key
156
+ margin-right: 4px
157
+ &:hover
158
+ background: $color-hover
159
+
@@ -33,6 +33,6 @@ details.toc[open] >div.body
33
33
  margin-top: 0
34
34
 
35
35
 
36
- @media screen and (max-width: $device-tablet)
36
+ @media screen and (max-width: $device-mobile-max)
37
37
  .tag-plugin.toc[display=mobile]
38
38
  display: block !important
package/source/js/main.js CHANGED
@@ -213,21 +213,19 @@ if (stellar.plugins.lazyload) {
213
213
  });
214
214
  }
215
215
 
216
- // issuesjs
217
- if (stellar.plugins.sitesjs) {
218
- const issues_api = document.getElementById('sites-api');
219
- if (issues_api != undefined) {
220
- stellar.jQuery(() => {
221
- stellar.loadScript(stellar.plugins.sitesjs, { defer: true })
222
- })
223
- }
224
- }
225
- if (stellar.plugins.friendsjs) {
226
- const issues_api = document.getElementById('friends-api');
227
- if (issues_api != undefined) {
228
- stellar.jQuery(() => {
229
- stellar.loadScript(stellar.plugins.friendsjs, { defer: true })
230
- })
216
+ // stellar js
217
+ if (stellar.plugins.stellar) {
218
+ for (let key of Object.keys(stellar.plugins.stellar)) {
219
+ let js = stellar.plugins.stellar[key];
220
+ const els = document.getElementsByClassName('stellar-' + key + '-api');
221
+ if (els != undefined && els.length > 0) {
222
+ stellar.jQuery(() => {
223
+ stellar.loadScript(js, { defer: true });
224
+ if (key == 'timeline') {
225
+ stellar.loadScript(stellar.plugins.marked);
226
+ }
227
+ })
228
+ }
231
229
  }
232
230
  }
233
231
 
@@ -48,7 +48,6 @@ const friendsjs = {
48
48
  friendsjs.requestAPI(cfg.api, function(data) {
49
49
  $(el).find('.loading-wrap').remove();
50
50
  const arr = data.content || data;
51
- console.log(data);
52
51
  arr.forEach((item, i) => {
53
52
  var user = '<div class="user-card">';
54
53
  user += '<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer"';
@@ -67,7 +66,7 @@ const friendsjs = {
67
66
  }
68
67
 
69
68
  $(function () {
70
- const els = document.getElementsByClassName('friendsjs-wrap');
69
+ const els = document.getElementsByClassName('stellar-friends-api');
71
70
  for (var i = 0; i < els.length; i++) {
72
71
  const el = els[i];
73
72
  const api = el.getAttribute('api');