Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #312

Merged
merged 8 commits into from
Jun 24, 2024
Merged

Dev #312

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ aside:
# Configure information on the home page
index_post_list:
direction: column # row / column
column: 2 #2:2列 3:3列
content: false # 1: post.description / 2: 自动获取description或截取内容(Automatically get descriptions or screenshots) / 3: 只使用截取内容(Use only screenshots) / false: 不显示内容(No content is displayed)
length: 500 # 截取内容的长度 : The length of the screenshot content
cover: both # left: 在左侧 : left / right: 在右侧 : right / both: 两侧 : both
Expand Down
1 change: 1 addition & 0 deletions source/css/_global/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ b, strong
i.solitude
font-size 22px
line-height 1
font-synthesis style

.layout
display: flex
Expand Down
26 changes: 19 additions & 7 deletions source/css/_layout/recent-post.styl
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ if hexo-config('index_post_list.direction') == "column"
cursor pointer
border var(--style-border)

+minWidth1300()
flex-direction column
width 100%
flex 1 1 40%
max-width 50%
box-shadow var(--efu-shadow-border)

+maxWidth1300()
margin-bottom .5rem

Expand Down Expand Up @@ -238,6 +231,25 @@ if hexo-config('index_post_list.direction') == "column"
.sticky
color var(--efu-fontcolor)

if hexo-config('index_post_list.direction') == "column" && hexo-config('index_post_list.column') == 2
#recent-posts
> .recent-post-item
+minWidth1300()
flex-direction column
width 100%
flex 1 1 40%
max-width 50%
box-shadow var(--efu-shadow-border)
else if hexo-config('index_post_list.direction') == "column" && hexo-config('index_post_list.column') == 3
#recent-posts
> .recent-post-item
+minWidth1300()
flex-direction column
width 100%
flex 1 1 33.3%
max-width 32.6%
box-shadow var(--efu-shadow-border)

else if hexo-config('index_post_list.direction') == "row"
#recent-posts
position relative
Expand Down
3 changes: 1 addition & 2 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const sidebarFn = () => {
}
const scrollFn = () => {
const innerHeight = window.innerHeight;
if (document.body.scrollHeight <= innerHeight) return;
let initTop = 0;
const $header = document.getElementById('page-header');
const throttledScroll = utils.throttle((e) => {
Expand Down Expand Up @@ -375,7 +374,7 @@ const sco = {
}
pageText.addEventListener("keydown", (event) => {
if (event.keyCode === 13) {
this.toPage();
sco.toPage();
pjax.loadUrl(pageButton.href);
}
});
Expand Down
Loading