fix: fix alignment

fix post list thumb alignment
fix #205
pull/206/head
Spirit 2020-03-29 00:39:58 +08:00
parent 3c33180289
commit af30e9a19b
7 changed files with 31 additions and 22 deletions

View File

@ -1757,6 +1757,16 @@ function DEFAULT_FEATURE_IMAGE()
return rest_url('sakura/v1/image/feature') . '?' . rand(1, 1000);
}
//防止设置置顶文章造成的图片同侧bug
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' ) );
}
});
//评论回复
function sakura_comment_notify($comment_id)
{

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-03-28 10:35+0800\n"
"PO-Revision-Date: 2020-03-28 10:35+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"
@ -205,11 +205,11 @@ msgstr ""
msgid "QQ"
msgstr ""
#: functions.php:1774
#: functions.php:1784
msgid "Sidebar"
msgstr ""
#: functions.php:1886
#: 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 "
@ -1710,17 +1710,17 @@ msgstr "Search result: %s"
msgid "NOTHING"
msgstr ""
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:57
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56
#: tpl/content.php:34
msgid "Comment"
msgstr ""
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:57
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56
#: tpl/content.php:34
msgid "Comments"
msgstr ""
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:56
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:55
#: tpl/content.php:37
msgid "Hit"
msgid_plural "Hits"

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-03-28 10:34+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"
@ -204,11 +204,11 @@ msgstr ""
msgid "QQ"
msgstr ""
#: functions.php:1774
#: functions.php:1784
msgid "Sidebar"
msgstr ""
#: functions.php:1886
#: 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."
@ -1675,15 +1675,15 @@ msgstr ""
msgid "NOTHING"
msgstr ""
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:57 tpl/content.php:34
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56 tpl/content.php:34
msgid "Comment"
msgstr ""
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:57 tpl/content.php:34
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56 tpl/content.php:34
msgid "Comments"
msgstr ""
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:56 tpl/content.php:37
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:55 tpl/content.php:37
msgid "Hit"
msgid_plural "Hits"
msgstr[0] ""

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-03-28 10:34+0800\n"
"PO-Revision-Date: 2020-03-28 10:35+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"
@ -207,11 +207,11 @@ msgstr ""
msgid "QQ"
msgstr ""
#: functions.php:1774
#: functions.php:1784
msgid "Sidebar"
msgstr "侧栏"
#: functions.php:1886
#: 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 "
@ -1764,17 +1764,17 @@ msgstr "关于 %s 的搜索结果:"
msgid "NOTHING"
msgstr "啥也没有呀"
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:57
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56
#: tpl/content.php:34
msgid "Comment"
msgstr "条评论"
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:57
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56
#: tpl/content.php:34
msgid "Comments"
msgstr "条评论"
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:56
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:55
#: tpl/content.php:37
msgid "Hit"
msgid_plural "Hits"

View File

@ -10,8 +10,7 @@
// return substr($excerpt, 0, 120);
//}
//add_filter('the_excerpt', 'custom_short_excerpt');
$i=0; $sticky_count=sizeof(get_option( 'sticky_posts' )); while ( have_posts() ) : the_post(); $i++;
if( $sticky_count %2 != 0 && !is_paged() && is_sticky() && ($i == 1) ) $i++;
$i=0; while ( have_posts() ) : the_post(); $i++;
switch (akina_option('feature_align')) {
case "left":
$class = 'post-list-thumb-left';