Skip to content

Commit

Permalink
Issue 205 (#206)
Browse files Browse the repository at this point in the history
* fix: fix pagination and alignment
fix pagination and post list thumb alignment
fix #205
  • Loading branch information
spirit1431007 committed Mar 28, 2020
1 parent df1c5ba commit 7437bfa
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 63 deletions.
10 changes: 6 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1758,11 +1758,13 @@ function DEFAULT_FEATURE_IMAGE()
}

//防止设置置顶文章造成的图片同侧bug
add_action('pre_get_posts', function ($q) {
if ($q->is_home() && $q->is_main_query() && $q->get('paged') > 1) {
$q->set('post__not_in', get_option('sticky_posts'));
add_action( 'pre_get_posts', function( $q ){
if ( $q->is_home() && $q->is_main_query() ){
$q->set( 'posts_per_page', 10 - sizeof(get_option( 'sticky_posts' )) );
if ( $q->get( 'paged' ) > 1 )
$q->set( 'post__not_in', get_option( 'sticky_posts' ) );
}

});

//评论回复
Expand Down
Binary file modified languages/en_US.mo
Binary file not shown.
40 changes: 20 additions & 20 deletions languages/en_US.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-02-13 23:59+0800\n"
"PO-Revision-Date: 2020-02-13 23:59+0800\n"
"POT-Creation-Date: 2020-03-29 00:39+0800\n"
"PO-Revision-Date: 2020-03-29 00:39+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
Expand Down Expand Up @@ -142,74 +142,74 @@ msgstr ""
msgid "Nav Menus"
msgstr ""

#: functions.php:420 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: functions.php:421 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: options.php:121
msgid "Author"
msgstr ""

#: functions.php:420
#: functions.php:421
msgid "Blogger"
msgstr ""

#: functions.php:424
#: functions.php:425
msgid "Location"
msgstr ""

#: functions.php:428
#: functions.php:429
msgid "Private"
msgstr ""

#: functions.php:430
#: functions.php:431
msgid "Yes"
msgstr ""

#: functions.php:432
#: functions.php:433
msgid "No"
msgstr ""

#: functions.php:435
#: functions.php:436
msgid "Edit"
msgstr ""

#: functions.php:524
#: functions.php:525
msgid ""
"Please install pulgin <a href=\"https://wordpress.org/plugins/wp-statistics/"
"\" target=\"_blank\">WP-Statistics</a>"
msgstr ""

#: functions.php:574
#: functions.php:575
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr ""

#: functions.php:1329
#: functions.php:1330
msgid "All expand/collapse"
msgstr ""

#: functions.php:1350 options.php:834
#: functions.php:1351 options.php:834
msgid " "
msgstr ""

#: functions.php:1354
#: functions.php:1355
msgid " post(s)"
msgstr ""

#: functions.php:1377 functions.php:1380 inc/theme_plus.php:478
#: functions.php:1378 functions.php:1381 inc/theme_plus.php:478
msgid "Dashboard"
msgstr ""

#: functions.php:1606
#: functions.php:1607
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""

#: functions.php:1711
#: functions.php:1712
msgid "QQ"
msgstr ""

#: functions.php:1781
#: functions.php:1784
msgid "Sidebar"
msgstr ""

#: functions.php:1893
#: functions.php:1896
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
Expand All @@ -222,7 +222,7 @@ msgstr ""
msgid "page %s "
msgstr ""

#: inc/api.php:301 inc/theme_plus.php:727
#: inc/api.php:304 inc/theme_plus.php:727
msgid "The comment is private"
msgstr ""

Expand Down
38 changes: 19 additions & 19 deletions languages/sakura.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-02-13 23:59+0800\n"
"POT-Creation-Date: 2020-03-29 00:38+0800\n"
"PO-Revision-Date: 2019-11-01 14:27+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -142,73 +142,73 @@ msgstr ""
msgid "Nav Menus"
msgstr ""

#: functions.php:420 inc/theme_plus.php:186 layouts/authorprofile.php:11 options.php:121
#: functions.php:421 inc/theme_plus.php:186 layouts/authorprofile.php:11 options.php:121
msgid "Author"
msgstr ""

#: functions.php:420
#: functions.php:421
msgid "Blogger"
msgstr ""

#: functions.php:424
#: functions.php:425
msgid "Location"
msgstr ""

#: functions.php:428
#: functions.php:429
msgid "Private"
msgstr ""

#: functions.php:430
#: functions.php:431
msgid "Yes"
msgstr ""

#: functions.php:432
#: functions.php:433
msgid "No"
msgstr ""

#: functions.php:435
#: functions.php:436
msgid "Edit"
msgstr ""

#: functions.php:524
#: functions.php:525
msgid ""
"Please install pulgin <a href=\"https://wordpress.org/plugins/wp-statistics/\" target=\"_blank"
"\">WP-Statistics</a>"
msgstr ""

#: functions.php:574
#: functions.php:575
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr ""

#: functions.php:1329
#: functions.php:1330
msgid "All expand/collapse"
msgstr ""

#: functions.php:1350 options.php:834
#: functions.php:1351 options.php:834
msgid " "
msgstr ""

#: functions.php:1354
#: functions.php:1355
msgid " post(s)"
msgstr ""

#: functions.php:1377 functions.php:1380 inc/theme_plus.php:478
#: functions.php:1378 functions.php:1381 inc/theme_plus.php:478
msgid "Dashboard"
msgstr ""

#: functions.php:1606
#: functions.php:1607
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""

#: functions.php:1711
#: functions.php:1712
msgid "QQ"
msgstr ""

#: functions.php:1781
#: functions.php:1784
msgid "Sidebar"
msgstr ""

#: functions.php:1893
#: functions.php:1896
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-permalink.php\"> "
"permalink </a> as plain. To do this, you may need to configure <a href=\"https://www.wpdaxue."
Expand All @@ -220,7 +220,7 @@ msgstr ""
msgid "page %s "
msgstr ""

#: inc/api.php:301 inc/theme_plus.php:727
#: inc/api.php:304 inc/theme_plus.php:727
msgid "The comment is private"
msgstr ""

Expand Down
Binary file modified languages/zh_CN.mo
Binary file not shown.
40 changes: 20 additions & 20 deletions languages/zh_CN.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-02-13 23:59+0800\n"
"PO-Revision-Date: 2020-02-13 23:59+0800\n"
"POT-Creation-Date: 2020-03-29 00:38+0800\n"
"PO-Revision-Date: 2020-03-29 00:38+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
Expand Down Expand Up @@ -142,76 +142,76 @@ msgstr "小工具"
msgid "Nav Menus"
msgstr "导航菜单"

#: functions.php:420 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: functions.php:421 inc/theme_plus.php:186 layouts/authorprofile.php:11
#: options.php:121
msgid "Author"
msgstr "作者"

#: functions.php:420
#: functions.php:421
msgid "Blogger"
msgstr "博主"

#: functions.php:424
#: functions.php:425
msgid "Location"
msgstr "来自"

#: functions.php:428
#: functions.php:429
msgid "Private"
msgstr "私密"

#: functions.php:430
#: functions.php:431
msgid "Yes"
msgstr "是"

#: functions.php:432
#: functions.php:433
msgid "No"
msgstr "否"

#: functions.php:435
#: functions.php:436
msgid "Edit"
msgstr "编辑"

#: functions.php:524
#: functions.php:525
msgid ""
"Please install pulgin <a href=\"https://wordpress.org/plugins/wp-statistics/"
"\" target=\"_blank\">WP-Statistics</a>"
msgstr ""
"请安装插件 <a href=\"https://wordpress.org/plugins/wp-statistics/\" target="
"\"_blank\">WP-Statistics</a>"

#: functions.php:574
#: functions.php:575
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr "这家伙好懒╮(╯▽╰)╭"

#: functions.php:1329
#: functions.php:1330
msgid "All expand/collapse"
msgstr "全部展开/收缩"

#: functions.php:1350 options.php:834
#: functions.php:1351 options.php:834
msgid " "
msgstr ""

#: functions.php:1354
#: functions.php:1355
msgid " post(s)"
msgstr " 篇文章"

#: functions.php:1377 functions.php:1380 inc/theme_plus.php:478
#: functions.php:1378 functions.php:1381 inc/theme_plus.php:478
msgid "Dashboard"
msgstr "管理中心"

#: functions.php:1606
#: functions.php:1607
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""

#: functions.php:1711
#: functions.php:1712
msgid "QQ"
msgstr ""

#: functions.php:1781
#: functions.php:1784
msgid "Sidebar"
msgstr "侧栏"

#: functions.php:1893
#: functions.php:1896
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
Expand All @@ -227,7 +227,7 @@ msgstr ""
msgid "page %s "
msgstr "第 %s 页 "

#: inc/api.php:301 inc/theme_plus.php:727
#: inc/api.php:304 inc/theme_plus.php:727
msgid "The comment is private"
msgstr "该评论为私密评论"

Expand Down

0 comments on commit 7437bfa

Please sign in to comment.