Skip to content

Commit

Permalink
Merge pull request #469 from everfu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
everfu authored Jan 3, 2025
2 parents 5086a42 + d7e7796 commit 3a8f1d0
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion layout/includes/page/says.pug
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ if theme.says.enable
if theme.says.strip === -1
= _p('essay.tip0')
else
= _p('essay.tip1').replace('{count}', theme.says.strip)
= _p('essay.tip1').replace('#{count}', theme.says.strip)
8 changes: 5 additions & 3 deletions layout/includes/widgets/page/about/skillsinfo.pug
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ if skills || careers
span.author-content-item-title= skills.subtitle
.skills-style-group
.tags-group-all
.tags-group-wrapper
- let times = 4 * (skills.tags.length? Math.ceil(20/skills.tags.length):0)
- let length = times * skills.tags.length
- let duration = length * 1200 - 900
.tags-group-wrapper(style=`animation-duration: ${duration}ms`)
- var pair = []
- let times = skills.tags.length? Math.ceil(20/skills.tags.length):0
- for (let i = 0; i < 4 * times; i++)
- for (let i = 0; i < times; i++)
each tag, index in skills.tags
- pair.push(tag)
if pair.length === 2
Expand Down
24 changes: 12 additions & 12 deletions layout/includes/widgets/page/links/banner.pug
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@

- if (site.data.links.swiper !== false)
.tags-group-all.nowrapMove
.tags-group-wrapper
- const data = site.data.links.links
- var links = []
each x in data
each y in x.link_list
- links.push(y)
- if (links.length)
- let originalLinks = links
- while (links.length<20)
- links = links.concat(originalLinks)
each i in [1,2]
- links = links.concat(links)
- const data = site.data.links.links
- var links = []
each x in data
each y in x.link_list
- links.push(y)
- let times = 4 * (links.length? Math.ceil(20/links.length):0)
- let length = times * links.length
- let duration = length * 1500 - 1400
- let originalLinks = links
- for (let i = 1; i < times; i++)
- links = links.concat(originalLinks)
.tags-group-wrapper(style=`animation-duration: ${duration}ms`)
- var pairs = []
each link, index in links
if (index % 2 === 0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-solitude",
"version": "2.1.15",
"version": "2.1.16",
"description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
"main": "package.json",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion scripts/helper/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ hexo.extend.helper.register('page_description', function () {
})

hexo.extend.helper.register("urlNoIndex", function (url = null) {
return prettyUrls(url || this.url, { trailing_index: false, trailing_html: true });
const { config } = this
return prettyUrls(url || this.url, config.pretty_urls);
});
4 changes: 2 additions & 2 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ class tabs {
const { expire } = GLOBAL_CONFIG;
if (!expire) return;
const list = document.querySelectorAll('.post-meta-date time');
const post_date = list.length ? list[list.length - 1] : document.querySelector('.datatime');
const post_date = list.length ? list[list.length - 1] : document.querySelector('.datetime');
if (!post_date) return;
const ex = Math.ceil((new Date().getTime() - new Date(post_date.getAttribute('datetime')).getTime()) / 1000 / 60 / 60 / 24);
if (expire.time > ex) return;
Expand Down Expand Up @@ -734,7 +734,7 @@ const forPostFn = () => {
window.refreshFn = () => {
const { is_home, is_page, page, is_post } = PAGE_CONFIG;
const { runtime, lazyload, lightbox, randomlink, covercolor, post_ai, lure, expire } = GLOBAL_CONFIG;
const timeSelector = (is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datatime') + ', .webinfo-item time';
const timeSelector = (is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datetime') + ', .webinfo-item time';
document.body.setAttribute('data-type', page);
sco.changeTimeFormat(document.querySelectorAll(timeSelector));
runtime && sco.addRuntime();
Expand Down
4 changes: 2 additions & 2 deletions source/js/right_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ window.oncontextmenu = (ele) => {

rm.menuItems.copy.style.display = selectTextNow && window.getSelection() ? "flex" : "none";
GLOBAL_CONFIG.comment && (rm.menuItems.comment.style.display = selectTextNow && window.getSelection() ? "flex" : "none");
rm.menuItems.search.style.display = selectTextNow && window.getSelection() ? "flex" : "none";
rm.menuItems.search && (rm.menuItems.search.style.display = selectTextNow && window.getSelection() ? "flex" : "none");

rm.menuItems.new.style.display = link ? "flex" : "none";
rm.menuItems.copyLink.style.display = link ? "flex" : "none";
Expand Down Expand Up @@ -198,4 +198,4 @@ window.oncontextmenu = (ele) => {
addEventListener(rm.menuItems.downloadImg, "click", () => rm.downloadImage() && rm.hideRightMenu());
addEventListener(rm.menuItems.copyImg, "click", () => rm.copyImage() && rm.hideRightMenu());
addEventListener(rm.menuItems.copyLink, "click", () => rm.copyText(rm.domhref) && rm.hideRightMenu());
})();
})();

0 comments on commit 3a8f1d0

Please sign in to comment.