hexo-theme-stellar 1.30.1 → 1.30.2

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 +28 -25
  2. package/layout/_partial/main/article/article_footer.ejs +1 -1
  3. package/layout/_partial/main/post_list/post_card.ejs +4 -3
  4. package/layout/_partial/scripts/utils.ejs +1 -1
  5. package/layout/layout.ejs +1 -1
  6. package/layout/page.ejs +1 -1
  7. package/package.json +1 -1
  8. package/scripts/tags/inline-labels.js +3 -0
  9. package/scripts/tags/lib/okr.js +6 -6
  10. package/scripts/tags/lib/quot.js +16 -15
  11. package/source/css/_common/base.styl +1 -1
  12. package/source/css/_common/blockquote.styl +16 -5
  13. package/source/css/_common/pre.styl +1 -0
  14. package/source/css/_components/list.styl +4 -1
  15. package/source/css/_components/md.styl +3 -46
  16. package/source/css/_components/pages/article-indent.styl +6 -0
  17. package/source/css/_components/pages/article-story.styl +120 -0
  18. package/source/css/_components/pages/article-tech.styl +35 -0
  19. package/source/css/_components/partial/article-banner.styl +12 -7
  20. package/source/css/_components/partial/article-footer.styl +24 -14
  21. package/source/css/_components/partial/related.styl +1 -1
  22. package/source/css/_components/sidebar/sidebar.styl +1 -0
  23. package/source/css/_components/tag-plugins/button.styl +11 -11
  24. package/source/css/_components/tag-plugins/common.styl +7 -4
  25. package/source/css/_components/tag-plugins/friends_posts.styl +2 -2
  26. package/source/css/_components/tag-plugins/inline-labels.styl +5 -0
  27. package/source/css/_components/tag-plugins/link.styl +2 -1
  28. package/source/css/_components/tag-plugins/mark.styl +1 -1
  29. package/source/css/_components/tag-plugins/mdrender.styl +15 -0
  30. package/source/css/_components/tag-plugins/note.styl +4 -1
  31. package/source/css/_components/tag-plugins/poetry.styl +2 -0
  32. package/source/css/_components/tag-plugins/quot.styl +51 -25
  33. package/source/css/_components/tag-plugins/sites.styl +1 -0
  34. package/source/css/_components/tag-plugins/tabs.styl +8 -10
  35. package/source/css/_components/tag-plugins/timeline.styl +12 -20
  36. package/source/css/_components/widgets/ghuser.styl +1 -1
  37. package/source/css/_components/widgets/markdown.styl +4 -3
  38. package/source/css/_components/widgets/related.styl +1 -1
  39. package/source/css/_components/widgets/tagcloud.styl +1 -1
  40. package/source/css/_components/widgets/timeline.styl +1 -1
  41. package/source/css/_custom.styl +6 -2
  42. package/source/css/_defines/const.styl +3 -0
  43. package/source/css/_defines/func.styl +10 -0
  44. package/source/css/_defines/theme.styl +9 -0
  45. package/source/js/services/artalk_latest_comment.js +2 -1
  46. package/source/js/services/fcircle.js +2 -1
  47. package/source/js/services/friends.js +2 -1
  48. package/source/js/services/friends_and_posts.js +2 -1
  49. package/source/js/services/ghinfo.js +2 -1
  50. package/source/js/services/giscus_latest_comment.js +2 -1
  51. package/source/js/services/mdrender.js +5 -2
  52. package/source/js/services/memos.js +2 -1
  53. package/source/js/services/sites.js +2 -1
  54. package/source/js/services/timeline.js +2 -1
  55. package/source/js/services/waline_latest_comment.js +2 -1
  56. package/source/js/services/weibo.js +2 -1
@@ -9,7 +9,8 @@ utils.jq(() => {
9
9
  }
10
10
  const default_avatar = def.avatar;
11
11
  // layout
12
- utils.request(el, api, function(data) {
12
+ utils.request(el, api, async resp => {
13
+ const data = await resp.json();
13
14
  const arr = data.article_data || [];
14
15
  const limit = el.getAttribute('limit');
15
16
  arr.forEach((item, i) => {
@@ -9,7 +9,8 @@ utils.jq(() => {
9
9
  }
10
10
  const default_avatar = def.avatar;
11
11
  // layout
12
- utils.request(el, api, function(data) {
12
+ utils.request(el, api, async resp => {
13
+ const data = await resp.json();
13
14
  for (let item of (data.content || data)) {
14
15
  var cell = `<div class="grid-cell user-card">`;
15
16
  cell += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.html_url || item.url}">`;;
@@ -9,7 +9,8 @@ utils.jq(() => {
9
9
  }
10
10
  const default_avatar = def.avatar;
11
11
  // layout
12
- utils.request(el, api, function(data) {
12
+ utils.request(el, api, async resp => {
13
+ const data = await resp.json();
13
14
  for (let item of (data.content || data)) {
14
15
  var cell = `<div class="grid-cell user-post-card">`;
15
16
  cell += `<div class="avatar-box">`;
@@ -8,7 +8,8 @@ utils.jq(() => {
8
8
  continue;
9
9
  }
10
10
  // layout
11
- utils.request(null, api, function(data) {
11
+ utils.request(null, api, async resp => {
12
+ const data = await resp.json();
12
13
  function fill(data) {
13
14
  for (let key of Object.keys(data)) {
14
15
  $(el).find("[type=text]#" + key).text(data[key]);
@@ -9,7 +9,8 @@ utils.jq(() => {
9
9
  }
10
10
  const default_avatar = def.avatar;
11
11
  // layout
12
- utils.request(el, api, function(data) {
12
+ utils.request(el, api, async resp => {
13
+ const data = await resp.json();
13
14
  const limit = el.getAttribute('limit');
14
15
  data.forEach((item, i) => {
15
16
  if (limit && i >= limit) {
@@ -3,8 +3,11 @@ utils.jq(() => {
3
3
  for (var i = 0; i < els.length; i++) {
4
4
  const el = els[i];
5
5
  const src = `${el.getAttribute('src')}?t=${new Date().getTime()}`;
6
- utils.request(el, src, function(data) {
7
- el.innerHTML = marked.parse(resp.data);
6
+ console.log('src', src);
7
+
8
+ utils.request(el, src, async resp => {
9
+ const data = await resp.text();
10
+ el.innerHTML = marked.parse(data);
8
11
  });
9
12
  }
10
13
  });
@@ -9,7 +9,8 @@ utils.jq(() => {
9
9
  const limit = el.getAttribute('limit');
10
10
  const host = api.match(/https:\/\/(.*?)\/(.*)/i)[1];
11
11
 
12
- utils.request(el, api, async data => {
12
+ utils.request(el, api, async resp => {
13
+ const data = await resp.json();
13
14
  let memos = versionHandlers.identify(data);
14
15
  if (memos.version === "feature" )return;
15
16
 
@@ -10,7 +10,8 @@ utils.jq(() => {
10
10
  const default_avatar = def.avatar;
11
11
  const default_cover = def.cover;
12
12
  // layout
13
- utils.request(el, api, function(data) {
13
+ utils.request(el, api, async resp => {
14
+ const data = await resp.json();
14
15
  for (let item of data.content) {
15
16
  var cell = `<div class="grid-cell site-card">`;
16
17
  cell += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`;
@@ -18,7 +18,8 @@ utils.jq(() => {
18
18
  continue;
19
19
  }
20
20
  // layout
21
- utils.request(el, api, function(data) {
21
+ utils.request(el, api, async resp => {
22
+ const data = await resp.json();
22
23
  const query = new URL(api).search;
23
24
  const arr = data.content || data;
24
25
  var users = [];
@@ -10,7 +10,8 @@ utils.jq(() => {
10
10
  }
11
11
  const api = apiBase + '/comment?type=recent&count=' + limit;
12
12
  const default_avatar = def.avatar;
13
- utils.request(el, api, function(data) {
13
+ utils.request(el, api, async resp => {
14
+ const data = await resp.json();
14
15
  data.forEach((item, i) => {
15
16
  var cell = '<div class="timenode" index="' + i + '">';
16
17
  cell += '<div class="header">';
@@ -9,7 +9,8 @@ utils.jq(() => {
9
9
  }
10
10
  const default_avatar = el.getAttribute('avatar') || def.avatar;
11
11
  // layout
12
- utils.request(el, api, function(data) {
12
+ utils.request(el, api, async resp => {
13
+ const data = await resp.json();
13
14
  const arr = data.tweets || [];
14
15
  const limit = el.getAttribute('limit');
15
16
  arr.forEach((item, i) => {