diff --git a/README.md b/README.md index 23cd4093..3fb3f5d1 100644 --- a/README.md +++ b/README.md @@ -81,4 +81,6 @@ Check out the [Documentation](https://solitude.js.org/) for more information. ## License -[MIT](./LICENSE) License © 2023-PRESENT [Ever Fu](https://github.com/everfu) +[MIT](./LICENSE) License © 2023-PRESENT [一小只托尼](https://github.com/everfu) + +[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude?ref=badge_large) diff --git a/README_zh-Hans.md b/README_zh-Hans.md index ee32f7b5..1f4bc5c5 100644 --- a/README_zh-Hans.md +++ b/README_zh-Hans.md @@ -82,6 +82,6 @@ ## 版权 -[MIT](./LICENSE) License © 2023-至今 [EverFu](https://github.com/efuo) +[MIT](./LICENSE) License © 2023-至今 [一小只托尼](https://github.com/efuo) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude?ref=badge_large) diff --git a/README_zh-Hant.md b/README_zh-Hant.md index ee679cd9..d35576f8 100644 --- a/README_zh-Hant.md +++ b/README_zh-Hant.md @@ -79,4 +79,6 @@ ## 版權 -[MIT](./LICENSE) License © 2023-至今 [Efu](https://github.com/everfu) +[MIT](./LICENSE) License © 2023-至今 [一小只托尼](https://github.com/everfu) + +[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fvalor-x%2Fhexo-theme-solitude?ref=badge_large) diff --git a/languages/default.yml b/languages/default.yml index 0cf159c7..8e1db061 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -219,7 +219,6 @@ about: tj: tip: Data title: Access statistics - post_tip: 'Stats from:' personalities: tip1: At tip2: 'Learn more:' diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index ecfa274d..d3a6b31c 100755 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -219,7 +219,6 @@ about: tj: tip: 数据 title: 访问统计 - post_tip: 统计信息来自 personalities: tip1: 在 tip2: 了解更多关于 diff --git a/layout/includes/head/page_config.pug b/layout/includes/head/page_config.pug index 85dc7468..29f33687 100644 --- a/layout/includes/head/page_config.pug +++ b/layout/includes/head/page_config.pug @@ -6,5 +6,6 @@ script#config-diff. page: '!{page.type}', toc: !{!!page.toc}, comment: !{!!page.comment}, - ai_text: !{is_post && page.ai_text ? "'"+ page.ai_text+"'" : false} + ai_text: !{is_post && page.ai_text ? "'"+ page.ai_text+"'" : false}, + color: !{page.color ? "'"+ page.color+"'" : false}, } \ No newline at end of file diff --git a/layout/includes/page/says.pug b/layout/includes/page/says.pug index 5babc456..abce6540 100644 --- a/layout/includes/page/says.pug +++ b/layout/includes/page/says.pug @@ -42,7 +42,7 @@ if theme.says.enable time.datetime(datetime=moment(item.date).format()) if item.location .bber-info-location - i.solitude.fa-solid.fa-map + i.solitude.fas.fa-location-dot = item.location if item.link a.bber-content-link(href=url_for(item.link) target="_blank") diff --git a/layout/includes/widgets/page/about/other.pug b/layout/includes/widgets/page/about/other.pug index f4a6277a..6e3d89d7 100644 --- a/layout/includes/widgets/page/about/other.pug +++ b/layout/includes/widgets/page/about/other.pug @@ -9,13 +9,7 @@ if tj || oneself .author-content-item-tips=_p('about.other.tj.tip') span.author-content-item-title=_p('about.other.tj.title') #statistic - .post-tips - = _p('about.other.tj.post_tip') - case tj.provider - when '51la' - a(href="https://v6.51.la/") 51la网站统计 - when 'baidu' - a(href="https://tongji.baidu.com/") 百度统计 + .post-tips!= _p(tj.desc) if tj.button .banner-button-group a.banner-button(href=url_for(tj.button_link)) @@ -42,7 +36,7 @@ if tj || oneself } s.innerHTML = html; }); - when 'baidu' + when 'custom' script. fetch("#{tj.url}") .then(res => res.json()) diff --git a/layout/includes/widgets/post/postInfo.pug b/layout/includes/widgets/post/postInfo.pug index 2d8da22a..ea8cd8fe 100644 --- a/layout/includes/widgets/post/postInfo.pug +++ b/layout/includes/widgets/post/postInfo.pug @@ -35,7 +35,7 @@ span= min2read(page.content) + " min" if theme.post.meta.locate span.post-meta-position(title=_p('post.ip') + page.locate) - i.post-meta-icon.solitude.fa-solid.fa-map + i.post-meta-icon.solitude.fas.fa-location-dot span= page.locate if theme.post.meta.pv a.post-meta-pv(href=url_for(page.path), title=_p('post.pv')) diff --git a/package.json b/package.json index 27983826..4d214f14 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-solitude", - "version": "2.0.12-rc.1", + "version": "2.0.12", "description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.", "main": "package.json", "scripts": { diff --git a/source/css/_comments/comment.styl b/source/css/_comments/comment.styl index c4efa942..712bb1c8 100644 --- a/source/css/_comments/comment.styl +++ b/source/css/_comments/comment.styl @@ -55,7 +55,9 @@ #post-comment .post & - padding 0 2rem + padding 0 2rem .5rem + +maxWidth768() + padding 0 .5rem .5rem > div.comment-head > div.comment-privacy display block diff --git a/source/css/_layout/fullpage.styl b/source/css/_layout/fullpage.styl index dbab864b..e597453d 100644 --- a/source/css/_layout/fullpage.styl +++ b/source/css/_layout/fullpage.styl @@ -21,6 +21,7 @@ if hexo-config('loading.fullpage') .loading-img width 100px + height 100px margin auto animation-duration 0.2s animation-name loadingAction diff --git a/source/css/_post/copyright.styl b/source/css/_post/copyright.styl index 098cc648..608d71b6 100644 --- a/source/css/_post/copyright.styl +++ b/source/css/_post/copyright.styl @@ -12,6 +12,7 @@ +maxWidth768() box-shadow var(--efu-shadow-border) padding: 1rem 1.3rem; + margin .5rem .post-copyright__author_group .post-copyright__author_img diff --git a/source/css/_post/meta.styl b/source/css/_post/meta.styl index 4732448b..fc882200 100644 --- a/source/css/_post/meta.styl +++ b/source/css/_post/meta.styl @@ -206,7 +206,7 @@ transition all .3s ease-out 0s i - font-size 16px + font-size 13px margin-right 4px > div diff --git a/source/css/_post/tools.styl b/source/css/_post/tools.styl index 4490d817..d9ea069a 100644 --- a/source/css/_post/tools.styl +++ b/source/css/_post/tools.styl @@ -204,6 +204,8 @@ justify-content: space-between flex-wrap: wrap padding 0 2rem + +maxWidth768() + padding: 0 .5rem .tag_share .post-meta__tag-list diff --git a/source/js/covercolor/api.js b/source/js/covercolor/api.js index bada6df7..7cb0b0b7 100644 --- a/source/js/covercolor/api.js +++ b/source/js/covercolor/api.js @@ -1,4 +1,9 @@ const coverColor = () => { + const page_color = PAGE_CONFIG.color + if (page_color){ + setThemeColors(page_color); + return; + } const path = document.getElementById("post-cover")?.src; path ? handleApiColor(path) : setDefaultThemeColors(); } diff --git a/source/js/covercolor/ave.js b/source/js/covercolor/ave.js index cc80095a..5bc31fc5 100644 --- a/source/js/covercolor/ave.js +++ b/source/js/covercolor/ave.js @@ -1,4 +1,9 @@ const coverColor = () => { + const page_color = PAGE_CONFIG.color + if (page_color){ + setThemeColors(page_color); + return; + } const path = document.getElementById("post-cover")?.src; path ? handleApiColor(path) : setDefaultThemeColors(); } diff --git a/source/js/covercolor/local.js b/source/js/covercolor/local.js index a9980868..228d4548 100644 --- a/source/js/covercolor/local.js +++ b/source/js/covercolor/local.js @@ -1,4 +1,9 @@ const coverColor = () => { + const page_color = PAGE_CONFIG.color + if (page_color){ + setThemeColors(page_color); + return; + } const path = document.getElementById("post-cover")?.src; path ? localColor(path) : setDefaultThemeColors(); } diff --git a/source/js/main.js b/source/js/main.js index 918252d1..af29c7bf 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -154,10 +154,10 @@ const sco = { $console.classList.toggle("on", this.musicPlaying); if (this.musicPlaying) { $meting.aplayer.play(); - (typeof rm !== 'undefined') && rm?.menuItems.music[0] && ($rm_text.textContent = GLOBAL_CONFIG.right_menu.music.stop) && ($rm_icon.className = 'solitude st-pause-fill') + (typeof rm !== 'undefined') && rm?.menuItems.music[0] && ($rm_text.textContent = GLOBAL_CONFIG.right_menu.music.stop) && ($rm_icon.className = 'solitude fas fa-pause') } else { $meting.aplayer.pause(); - (typeof rm !== 'undefined') && rm?.menuItems.music[0] && ($rm_text.textContent = GLOBAL_CONFIG.right_menu.music.start) && ($rm_icon.className = 'solitude st-play-fill') + (typeof rm !== 'undefined') && rm?.menuItems.music[0] && ($rm_text.textContent = GLOBAL_CONFIG.right_menu.music.start) && ($rm_icon.className = 'solitude fas fa-play') } }, switchCommentBarrage() { diff --git a/source/js/right_menu.js b/source/js/right_menu.js index 008d3290..84c21aa4 100644 --- a/source/js/right_menu.js +++ b/source/js/right_menu.js @@ -108,7 +108,7 @@ window.oncontextmenu = (ele) => { if (document.body.clientWidth <= 768) return; let x = ele.clientX + 10; let y = ele.clientY; - Array.from(rm.menuItems.other).forEach((item) => (item.style.display = "block")); + Array.from(rm.menuItems.other).forEach((item) => (item.style.display = "flex")); rm.globalEvent = ele; let display = false; @@ -117,9 +117,9 @@ window.oncontextmenu = (ele) => { if (selectTextNow && window.getSelection()) { display = true; - rm.menuItems.copy.style.display = "block"; - GLOBAL_CONFIG.comment && (rm.menuItems.comment.style.display = "block"); - rm.menuItems.search && (rm.menuItems.search.style.display = "block"); + rm.menuItems.copy.style.display = "flex"; + GLOBAL_CONFIG.comment && (rm.menuItems.comment.style.display = "flex"); + rm.menuItems.search && (rm.menuItems.search.style.display = "flex"); } else { rm.menuItems.copy.style.display = "none"; GLOBAL_CONFIG.comment && (rm.menuItems.comment.style.display = "none"); @@ -128,8 +128,8 @@ window.oncontextmenu = (ele) => { if (link) { display = true; - rm.menuItems.new.style.display = "block"; - rm.menuItems.copyLink.style.display = "block"; + rm.menuItems.new.style.display = "flex"; + rm.menuItems.copyLink.style.display = "flex"; rm.domhref = link; } else { rm.menuItems.new.style.display = "none"; @@ -138,8 +138,8 @@ window.oncontextmenu = (ele) => { if (src) { display = true; - rm.menuItems.copyImg.style.display = "block"; - rm.menuItems.downloadImg.style.display = "block"; + rm.menuItems.copyImg.style.display = "flex"; + rm.menuItems.downloadImg.style.display = "flex"; rm.domsrc = src; } else { rm.menuItems.copyImg.style.display = "none"; @@ -149,14 +149,14 @@ window.oncontextmenu = (ele) => { let tagName = ele.target.tagName.toLowerCase(); if (tagName === "input" || tagName === "textarea") { display = true; - rm.menuItems.paste.style.display = "block"; + rm.menuItems.paste.style.display = "flex"; } else { rm.menuItems.paste.style.display = "none"; } if (tagName === "meting-js") { display = true; - rm.menuItems.music.forEach((item) => (item.style.display = "block")); + rm.menuItems.music.forEach((item) => (item.style.display = "flex")); } else { rm.menuItems.music[0] && rm.menuItems.music.forEach((item) => (item.style.display = "none"));