Skip to content

Commit

Permalink
Merge pull request #273 from valor-x/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
everfu authored May 7, 2024
2 parents 0011792 + a494253 commit 89cbf69
Show file tree
Hide file tree
Showing 23 changed files with 53 additions and 59 deletions.
2 changes: 1 addition & 1 deletion layout/category.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ block content
.recent-posts#recent-posts
each post,index in page.posts.find({ parent: { $exists: false } }).data
include includes/widgets/home/postList
include includes/mixins/pagination
include includes/mixins/pagination
include includes/widgets/aside/aside
4 changes: 4 additions & 0 deletions layout/includes/inject/body.pug
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ div
!= item

.js-pjax
if page.type === 'says' && theme.says.enable
script.
GLOBAL_CONFIG.lightbox && utils.lightbox(document.querySelectorAll(".bber-content-img img"));
sco.changeTimeFormat(document.querySelectorAll('.bber-info-time time'))
if comment_js
include ../widgets/third-party/comments/js
if theme.mermaid
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/inject/head.pug
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include ../head/pwa.pug

script.
console.log(
"%c Program: Hexo %c Theme: Solitude %c Version: v1.10.3",
"%c Program: Hexo %c Theme: Solitude %c Version: v1.10.4",
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
"padding: 5px 10px;color:white;background:#3e9f50;",
"padding: 5px 10px;color:white;background:#0084ff;border-radius:0 5px 5px 0",
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/widgets/aside/asideAdsense.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if theme.google_adsense.enable
if theme.google_adsense.enable && !theme.google_adsense.auto_ads && theme.google_adsense.aside_card
.card-widget.card-adsense
ins.adsbygoogle(style="display:block; text-align:center; min-height:120px; min-width: 100%", data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
script.
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/widgets/nav/right.pug
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ each item in custom
if theme.nav.right.random
.nav-button#randomPost_button
a.site-page(onclick="toRandomPost()", title=_p('nav.randompost'), href="javascript:void(0);")
i.solitude.st-signal-tower-fill
i.solitude.st-dice-line
if theme.search.enable
.nav-button#search-button
a.site-page.social-icon.search(href="javascript:void(0);", title=_p('nav.search'))
Expand Down
15 changes: 8 additions & 7 deletions layout/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ block content
if theme.hometop.enable && is_home_first_page()
include ./includes/widgets/home/hometop
main.layout#content-inner
.recent-posts#recent-posts
if theme.carousel && is_home_first_page()
include ./includes/widgets/home/carousel.pug
#home
#category-bar
include ./includes/widgets/home/categoryBar
for post, index in page.posts.sort("-sticky" || "-date").data
include ./includes/widgets/home/postList
.recent-posts#recent-posts
if theme.carousel && is_home_first_page()
include ./includes/widgets/home/carousel.pug
for post, index in page.posts.sort("-sticky" || "-date").data
include ./includes/widgets/home/postList

// pagination
include ./includes/mixins/pagination
// pagination
include ./includes/mixins/pagination
// aside
include ./includes/widgets/aside/aside
2 changes: 1 addition & 1 deletion layout/post.pug
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ block content
a.social-share-ico.icon-facebook(href=`https://www.facebook.com/sharer/sharer.php?u=${encodedPath}` title="Facebook")
when 'twitter'
a.social-share-ico.icon-twitter(href=`https://twitter.com/intent/tweet?url=${encodedPath}&text=${encodedTitle}` title="Twitter")
if theme.google_adsense.enable && theme.google_adsense.post_content
if theme.google_adsense.enable && !theme.google_adsense.auto_ads && theme.google_adsense.post_content
div.google-ads-warp
ins.adsbygoogle(style="display:block; text-align:center; height:284px", data-ad-layout="in-article", data-ad-format="fluid", hide-unfilled="true", data-ad-client=theme.google_adsense.client, data-ad-slot=theme.google_adsense.slot)
script.
Expand Down
2 changes: 1 addition & 1 deletion layout/tag.pug
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ block content
.recent-posts#recent-posts
each post,index in page.posts.find({ parent: { $exists: false } }).data
include includes/widgets/home/postList
include includes/mixins/pagination
include includes/mixins/pagination
include includes/widgets/aside/aside
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": "1.10.3",
"version": "1.10.4",
"description": "A beautiful, powerful, and efficient Hexo theme developed by EverFu.",
"main": "package.json",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion source/css/_comments/twikoo.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#twikoo
.tk-submit
margin-top 0
.tk-admin-config-group-title
margin-top 0
line-height normal
Expand Down Expand Up @@ -261,7 +263,6 @@

.tk-comments-container
min-height 0 !important
margin-top .5rem

.tk-replies
> .tk-comment
Expand Down
4 changes: 2 additions & 2 deletions source/css/_global/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ i.solitude
.layout
display: flex
margin: 0 auto
padding: 1rem 1.5rem
padding: 0 1.5rem
max-width: 1200px
+maxWidth768()
padding 0
Expand All @@ -391,7 +391,7 @@ i.solitude
+maxWidth1200()
width 100%

> div:first-child:not(.recent-posts,.aside-content)
> #post,#category,#tag,#archive
box-shadow var(--efu-shadow-border)
padding 1rem 2rem
border-radius 12px
Expand Down
8 changes: 4 additions & 4 deletions source/css/_layout/aside.styl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
+minWidth1300()
animation slide-in .6s .3s backwards
if hexo-config('aside.position') == 0
padding-right 1rem
padding-right .5rem
else
padding-left 1rem
padding-left .5rem

.item-headline
padding-bottom 0
Expand Down Expand Up @@ -44,7 +44,7 @@
border-radius 12px
position relative
overflow hidden
margin-top 1rem
margin-top .5rem
padding 1rem 1.2rem

&:hover
Expand All @@ -57,7 +57,7 @@
margin-top 0

.sticky_layout
top calc(60px + 1rem)
top calc(60px + .5rem)
position sticky
transition: top .3s ease 0s

Expand Down
3 changes: 1 addition & 2 deletions source/css/_layout/console.styl
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,13 @@

.card-archive-list-link
border-radius 8px
margin-top 8px
display flex
flex-direction column
align-content space-between
border var(--style-border)
transition all .3s ease 0s
background var(--efu-maskbgdeep)
padding 8px 16px
padding 12px 16px

&:hover
background var(--efu-main)
Expand Down
2 changes: 0 additions & 2 deletions source/css/_layout/pagination.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pagination
width 100%
+minWidth1300()
margin-top .25rem
+minWidth768()
overflow visible
+maxWidth768()
Expand Down
23 changes: 8 additions & 15 deletions source/css/_layout/recent-post.styl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ if hexo-config('index_post_list.direction') == "column"
+minWidth1300()
display flex
flex-wrap wrap
justify-content space-between
align-items flex-start
align-content flex-start
user-select none
gap .5rem
transition width .3s

+maxWidth768()
Expand All @@ -34,19 +31,19 @@ if hexo-config('index_post_list.direction') == "column"
border-radius 12px
cursor pointer
border var(--style-border)
margin 1rem 0 1rem

+minWidth1300()
flex-direction column
width calc(100% / 2 - .5rem)
margin-top .25rem
margin-bottom .75rem
width 100%
flex 1 1 40%
max-width 50%
box-shadow var(--efu-shadow-border)

+maxWidth1300()
margin-bottom .5rem

+maxWidth768()
margin 1.5rem 0
border-radius 12px
margin-top 0.5rem
border var(--style-border-always)
box-shadow var(--efu-shadow-border)
display block
Expand Down Expand Up @@ -250,6 +247,7 @@ else if hexo-config('index_post_list.direction') == "row"
align-items flex-start
align-content flex-start
user-select none
gap .5rem
transition width .3s

+maxWidth768()
Expand All @@ -266,17 +264,12 @@ else if hexo-config('index_post_list.direction') == "row"
border-radius 12px
cursor pointer
border var(--style-border)
margin 1rem 0 1rem
flex-direction row
width 100%
margin-top .25rem
margin-bottom .75rem
box-shadow var(--efu-shadow-border)

+maxWidth768()
margin 1.5rem 0
border-radius 12px
margin-top 0.5rem
border var(--style-border-always)
box-shadow var(--efu-shadow-border)
flex-direction column
Expand Down
12 changes: 5 additions & 7 deletions source/css/_page/_home/category-bar.styl
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,29 @@
display flex
white-space nowrap
overflow hidden
margin-bottom 1rem
border var(--style-border)
transition 0.3s
height 50px
width 100%
justify-content space-between
user-select none
align-items center

+maxWidth1300()
margin-bottom 1rem
animation slide-in .6s 0s backwards
margin-bottom .5rem

+minWidth1300()
margin-bottom .75rem
&:hover
border var(--style-border-hover)
box-shadow var(--efu-shadow-main)

+minWidth1200()
animation: slide-in .6s .3s backwards;

+maxWidth768()
margin-bottom 0
margin-top 0
border-radius 0
background var(--efu-background)
padding 0.5rem 0
padding 0 1rem
border none

.category-bar-right
Expand Down
8 changes: 5 additions & 3 deletions source/css/_page/_home/home-top.styl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
flex-wrap nowrap
width 100%
overflow-x scroll
gap .5rem

+maxWidth1200()
gap 0

&::-webkit-scrollbar
display none
Expand All @@ -24,7 +28,6 @@
display flex
+minWidth1201()
width calc(50% - .25rem)
margin-right 1rem
height calc(328px + .5rem)
display flex
flex-direction column
Expand Down Expand Up @@ -53,7 +56,6 @@
display none
+maxWidth768()
min-width 130px
margin-bottom .5rem
margin-left 1rem
max-height 164px
overflow hidden
Expand Down Expand Up @@ -313,7 +315,7 @@

.banner-button-group
bottom: 1rem

+maxWidth768()
margin-right 1rem

Expand Down
4 changes: 2 additions & 2 deletions source/css/_page/_home/home.styl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
if hexo-config('hometop.enable') || hexo-config('says.enable')
#home_top
max-width 1400px
margin .5rem auto auto
padding 0 1.5rem
margin 0 auto
padding .5rem 1.5rem

+maxWidth768()
padding 0
Expand Down
3 changes: 1 addition & 2 deletions source/css/_page/category.styl
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@
font-size 2em

.tag-cloud-list
gap .5rem
a
display flex
width fit-content
color var(--efu-fontcolor)
font-size 1.4em
padding 0.2em 0.5em
background var(--efu-card-bg)
margin 0.5em 0.5em
border-radius 12px
border var(--style-border-always)
box-shadow var(--efu-shadow-border)
Expand All @@ -90,7 +90,6 @@
transition none

&:hover
transform scale(1.1)
background var(--efu-main) !important
box-shadow var(--efu-shadow-blue)
color var(--efu-white) !important
Expand Down
4 changes: 2 additions & 2 deletions source/css/_page/message.styl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.switch_message
display flex
justify-content center
margin 2rem 0
gap 1rem
margin 1rem 0
gap .5rem
button
background-color var(--efu-main)
border var(--style-border-always)
Expand Down
1 change: 0 additions & 1 deletion source/css/_page/other.styl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ div#banners
+minWidth1201()
display flex
width 100%
height 100%
background var(--efu-card-bg)
border var(--style-border)
border-radius 12px
Expand Down
2 changes: 1 addition & 1 deletion source/css/_page/tag.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#tag
+minWidth1300()
padding: 4rem 2rem 1rem 2rem
padding: 4rem 2rem 1rem 2rem!important
overflow hidden

+maxWidth768()
Expand Down
2 changes: 1 addition & 1 deletion source/css/_tags/note.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $colors = {

.note
position relative
margin 1rem 0
margin .5rem 0
padding 15px
border-radius 3px

Expand Down

0 comments on commit 89cbf69

Please sign in to comment.