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.
- package/layout/includes/page/says.pug +1 -1
- package/layout/includes/widgets/page/about/skillsinfo.pug +5 -3
- package/layout/includes/widgets/page/links/banner.pug +12 -12
- package/package.json +1 -1
- package/scripts/helper/page.js +2 -1
- package/source/js/main.js +2 -2
- package/source/js/right_menu.js +2 -2
@@ -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
|
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
|
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
|
-
.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
package/scripts/helper/page.js
CHANGED
@@ -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
|
-
|
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('.
|
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' : '.
|
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();
|
package/source/js/right_menu.js
CHANGED
@@ -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
|
+
})();
|