hexo-theme-solitude 2.1.15 → 2.1.16

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.
@@ -55,4 +55,4 @@ if theme.says.enable
55
55
  if theme.says.strip === -1
56
56
  = _p('essay.tip0')
57
57
  else
58
- = _p('essay.tip1').replace('{count}', theme.says.strip)
58
+ = _p('essay.tip1').replace('#{count}', theme.says.strip)
@@ -10,10 +10,12 @@ if skills || careers
10
10
  span.author-content-item-title= skills.subtitle
11
11
  .skills-style-group
12
12
  .tags-group-all
13
- .tags-group-wrapper
13
+ - let times = 4 * (skills.tags.length? Math.ceil(20/skills.tags.length):0)
14
+ - let length = times * skills.tags.length
15
+ - let duration = length * 1200 - 900
16
+ .tags-group-wrapper(style=`animation-duration: ${duration}ms`)
14
17
  - var pair = []
15
- - let times = skills.tags.length? Math.ceil(20/skills.tags.length):0
16
- - for (let i = 0; i < 4 * times; i++)
18
+ - for (let i = 0; i < times; i++)
17
19
  each tag, index in skills.tags
18
20
  - pair.push(tag)
19
21
  if pair.length === 2
@@ -14,18 +14,18 @@
14
14
 
15
15
  - if (site.data.links.swiper !== false)
16
16
  .tags-group-all.nowrapMove
17
- .tags-group-wrapper
18
- - const data = site.data.links.links
19
- - var links = []
20
- each x in data
21
- each y in x.link_list
22
- - links.push(y)
23
- - if (links.length)
24
- - let originalLinks = links
25
- - while (links.length<20)
26
- - links = links.concat(originalLinks)
27
- each i in [1,2]
28
- - links = links.concat(links)
17
+ - const data = site.data.links.links
18
+ - var links = []
19
+ each x in data
20
+ each y in x.link_list
21
+ - links.push(y)
22
+ - let times = 4 * (links.length? Math.ceil(20/links.length):0)
23
+ - let length = times * links.length
24
+ - let duration = length * 1500 - 1400
25
+ - let originalLinks = links
26
+ - for (let i = 1; i < times; i++)
27
+ - links = links.concat(originalLinks)
28
+ .tags-group-wrapper(style=`animation-duration: ${duration}ms`)
29
29
  - var pairs = []
30
30
  each link, index in links
31
31
  if (index % 2 === 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "2.1.15",
3
+ "version": "2.1.16",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -13,5 +13,6 @@ hexo.extend.helper.register('page_description', function () {
13
13
  })
14
14
 
15
15
  hexo.extend.helper.register("urlNoIndex", function (url = null) {
16
- return prettyUrls(url || this.url, { trailing_index: false, trailing_html: true });
16
+ const { config } = this
17
+ return prettyUrls(url || this.url, config.pretty_urls);
17
18
  });
package/source/js/main.js CHANGED
@@ -691,7 +691,7 @@ class tabs {
691
691
  const { expire } = GLOBAL_CONFIG;
692
692
  if (!expire) return;
693
693
  const list = document.querySelectorAll('.post-meta-date time');
694
- const post_date = list.length ? list[list.length - 1] : document.querySelector('.datatime');
694
+ const post_date = list.length ? list[list.length - 1] : document.querySelector('.datetime');
695
695
  if (!post_date) return;
696
696
  const ex = Math.ceil((new Date().getTime() - new Date(post_date.getAttribute('datetime')).getTime()) / 1000 / 60 / 60 / 24);
697
697
  if (expire.time > ex) return;
@@ -734,7 +734,7 @@ const forPostFn = () => {
734
734
  window.refreshFn = () => {
735
735
  const { is_home, is_page, page, is_post } = PAGE_CONFIG;
736
736
  const { runtime, lazyload, lightbox, randomlink, covercolor, post_ai, lure, expire } = GLOBAL_CONFIG;
737
- const timeSelector = (is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datatime') + ', .webinfo-item time';
737
+ const timeSelector = (is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datetime') + ', .webinfo-item time';
738
738
  document.body.setAttribute('data-type', page);
739
739
  sco.changeTimeFormat(document.querySelectorAll(timeSelector));
740
740
  runtime && sco.addRuntime();
@@ -123,7 +123,7 @@ window.oncontextmenu = (ele) => {
123
123
 
124
124
  rm.menuItems.copy.style.display = selectTextNow && window.getSelection() ? "flex" : "none";
125
125
  GLOBAL_CONFIG.comment && (rm.menuItems.comment.style.display = selectTextNow && window.getSelection() ? "flex" : "none");
126
- rm.menuItems.search.style.display = selectTextNow && window.getSelection() ? "flex" : "none";
126
+ rm.menuItems.search && (rm.menuItems.search.style.display = selectTextNow && window.getSelection() ? "flex" : "none");
127
127
 
128
128
  rm.menuItems.new.style.display = link ? "flex" : "none";
129
129
  rm.menuItems.copyLink.style.display = link ? "flex" : "none";
@@ -198,4 +198,4 @@ window.oncontextmenu = (ele) => {
198
198
  addEventListener(rm.menuItems.downloadImg, "click", () => rm.downloadImage() && rm.hideRightMenu());
199
199
  addEventListener(rm.menuItems.copyImg, "click", () => rm.copyImage() && rm.hideRightMenu());
200
200
  addEventListener(rm.menuItems.copyLink, "click", () => rm.copyText(rm.domhref) && rm.hideRightMenu());
201
- })();
201
+ })();