feat: add bibibili bangumi support (#212)

Now you can display your bibibili bangumi status, note: the api is
unofficial, so may be abandoned in the future. Format api.php
close #209
pull/214/head
Spirit 2020-04-05 12:01:11 +08:00 committed by GitHub
parent a90e961e7b
commit 689fc6319d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 664 additions and 256 deletions

View File

@ -65,7 +65,7 @@
<?php wp_nav_menu( array( 'depth' => 2, 'theme_location' => 'primary', 'container' => false ) ); ?>
</div><!-- m-nav-center end -->
<a class="cd-top faa-float animated "></a>
<button onclick="topFunction()" id="moblieGoTop" title="Go to top"><i class="fa fa-chevron-up" aria-hidden="true"></i></button>
<button id="moblieGoTop" title="Go to top"><i class="fa fa-chevron-up" aria-hidden="true"></i></button>
<!-- search start -->
<form class="js-search search-form search-form--modal" method="get" action="<?php echo home_url(); ?>" role="search">
<div class="search-form__inner">

122
inc/api.php 100644 → 100755
View File

@ -32,6 +32,10 @@ add_action('rest_api_init', function () {
'methods' => 'GET',
'callback' => 'get_qq_avatar',
));
register_rest_route('sakura/v1', '/bangumi/bilibili', array(
'methods' => 'POST',
'callback' => 'bgm_bilibili',
));
});
/**
@ -274,45 +278,68 @@ function cache_search_json()
/<\/?[a-zA-Z]+("[^"]*"|'[^']*'|[^'">])*>|begin[\S\s]*\/begin|hermit[\S\s]*\/hermit|img[\S\s]*\/img|{{.*?}}|:.*?:/m
EOS;
$more = 1;
$output = array();
$posts = new WP_Query('posts_per_page=-1&post_status=publish&post_type=post');
while ($posts->have_posts()): $posts->the_post();
$output .= '{"type":"post","link":"' . get_permalink() . '","title":' . json_encode(get_the_title()) . ',"comments":"' . get_comments_number('0', '1', '%') . '","text":' . json_encode(str_replace($vowels, " ", preg_replace($regex, ' ', apply_filters( 'the_content', get_the_content())))) . '},';
$output[] = array(
"type" => "post",
"link" => get_permalink(),
"title" => get_the_title(),
"comments" => get_comments_number('0', '1', '%'),
"text" => str_replace($vowels, " ", preg_replace($regex, ' ', apply_filters( 'the_content', get_the_content())))
);
endwhile;
wp_reset_postdata();
$pages = new WP_Query('posts_per_page=-1&post_status=publish&post_type=page');
while ($pages->have_posts()): $pages->the_post();
$output .= '{"type":"page","link":"' . get_permalink() . '","title":' . json_encode(get_the_title()) . ',"comments":"' . get_comments_number('0', '1', '%') . '","text":' . json_encode(str_replace($vowels, " ", preg_replace($regex, ' ', apply_filters( 'the_content', get_the_content())))) . '},';
$output[] = array(
"type" => "page",
"link" => get_permalink(),
"title" => get_the_title(),
"comments" => get_comments_number('0', '1', '%'),
"text" => str_replace($vowels, " ", preg_replace($regex, ' ', apply_filters( 'the_content', get_the_content())))
);
endwhile;
wp_reset_postdata();
$tags = get_tags();
foreach ($tags as $tag) {
$output .= '{"type":"tag","link":"' . get_term_link($tag) . '","title":' . json_encode($tag->name) . ',"comments":"","text":""},';
$output[] = array(
"type" => "tag",
"link" => get_term_link($tag),
"title" => $tag->name,
"comments" => "",
"text" => ""
);
}
$categories = get_categories();
foreach ($categories as $category) {
$output .= '{"type":"category","link":"' . get_term_link($category) . '","title":' . json_encode($category->name) . ',"comments":"","text":""},';
$output[] = array(
"type" => "category",
"link" => get_term_link($category),
"title" => $category->name,
"comments" => "",
"text" => ""
);
}
if (akina_option('live_search_comment')) {
$comments = get_comments();
foreach ($comments as $comment) {
$is_private = get_comment_meta($comment->comment_ID, '_private', true);
if ($is_private) {
$output .= '{"type":"comment","link":"' . get_comment_link($comment) . '","title":' . json_encode(get_the_title($comment->comment_post_ID)) . ',"comments":"","text":' . json_encode($comment->comment_author . "" . __("The comment is private", "sakura") /*该评论为私密评论*/) . '},';
continue;
} else {
$output .= '{"type":"comment","link":"' . get_comment_link($comment) . '","title":' . json_encode(get_the_title($comment->comment_post_ID)) . ',"comments":"","text":' . json_encode(str_replace($vowels, " ", preg_replace($regex, " ", $comment->comment_author . "" . $comment->comment_content))) . '},';
}
$output[] = array(
"type" => "comment",
"link" => get_comment_link($comment),
"title" => get_the_title($comment->comment_post_ID),
"comments" => "",
"text" => $is_private ? ($comment->comment_author . ": " . __('The comment is private', 'sakura')) : str_replace($vowels, ' ', preg_replace($regex, ' ', $comment->comment_author . "" . $comment->comment_content))
);
}
}
$output = substr($output, 0, strlen($output) - 1);
$data = '[' . $output . ']';
$result = new WP_REST_Response(json_decode($data), 200);
$result = new WP_REST_Response($output, 200);
$result->set_headers(
array(
'Content-Type' => 'application/json',
@ -411,9 +438,13 @@ function get_qq_avatar(){
$imgurl='https://q2.qlogo.cn/headimg_dl?dst_uin='.$matches[0].'&spec=100';
if(akina_option('qq_avatar_link')=='type_2'){
$imgdata = file_get_contents($imgurl);
header("Content-type: image/jpeg");
header("Cache-Control: max-age=86400");
$response = new WP_REST_Response();
$response->set_headers(array(
'Content-Type' => 'image/jpeg',
'Cache-Control' => 'max-age=86400'
));
echo $imgdata;
return $response;
}else{
$response = new WP_REST_Response();
$response->set_status(301);
@ -422,3 +453,62 @@ function get_qq_avatar(){
}
}
}
function get_the_bgm_items($page = 1){
$cookies = akina_option('bilibili_cookie');
$url = 'https://api.bilibili.com/x/space/bangumi/follow/list?type=1&pn=' . $page . '&ps=15&follow_status=0&vmid=' . akina_option('bilibili_id');
$args = array(
'headers' => array(
'Cookie' => $cookies,
'Host' => 'api.bilibili.com',
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97'
)
);
$response = wp_remote_get($url, $args);
$bgmdata = json_decode($response["body"])->data;
return json_encode($bgmdata);
}
function get_bgm_items($page = 1){
$bgm = json_decode(get_the_bgm_items($page),true);
$totalpage = $bgm["total"] / 15;
if($totalpage - $page < 0){
$next = '<span>共追番' . $bgm["total"] .'部,继续加油吧!٩(ˊᗜˋ*)و</span>';
}else{
$next = '<a class="bangumi-next" href="' . rest_url('sakura/v1/bangumi/bilibili') . '?page=' . ++$page . '"><i class="fa fa-bolt" aria-hidden="true"></i> NEXT </a>';
}
$lists = $bgm["list"];
foreach ((array)$lists as $list) {
if(preg_match('/看完/m',$list["progress"], $matches_finish)){
$percent = 100;
}else{
preg_match('/第(\d+)./m',$list['progress'], $matches_progress);
preg_match('/第(\d+)./m',$list["new_ep"]['index_show'], $matches_new);
$progress = is_numeric($matches_progress[1]) ? $matches_progress[1] : 0;
$total = is_numeric($matches_new[1]) ? $matches_new[1] : $list['total_count'];
$percent = $progress / $total * 100;
}
$html .= '<div class="column">
<a class="bangumi-item" href="https://bangumi.bilibili.com/anime/' . $list['season_id'] . '/" target="_blank" rel="nofollow">
<img class="bangumi-image" src="' . str_replace('http://', 'https://', $list['cover']) . '"/>
<div class="bangumi-info">
<h3 class="bangumi-title" title="' . $list['title'] . '">' . $list['title'] . '</h2>
<div class="bangumi-summary"> '. $list['evaluate'] .' </div>
<div class="bangumi-status">
<div class="bangumi-status-bar" style="width: '. $percent .'%"></div>
<p>' . $list['new_ep']['index_show'] . '</p>
</div>
</div>
</a>
</div>';
}
$html .= '</div><br><div id="bangumi-pagination">' . $next .'</div>';
return $html;
}
function bgm_bilibili(){
$page = $_GET["page"] ?: 2;
$html = preg_replace("/\s+|\n+|\r/", ' ', get_bgm_items($page));
return $response = new WP_REST_Response($html,200);
}

View File

@ -17,6 +17,7 @@ mashiro_global.ini = new function () {
coverVideoIni();
checkskinSecter();
scrollBar();
load_bangumi();
}
this.pjax = function () { // pjax reload functions (pjax 重载函数)
pjaxInit();
@ -25,6 +26,7 @@ mashiro_global.ini = new function () {
copy_code_block();
coverVideoIni();
checkskinSecter();
load_bangumi();
}
}
@ -929,27 +931,6 @@ function getqqinfo() {
}
});
}
// $.ajax({
// type: 'get',
// url: mashiro_option.qq_avatar_api_url + '?type=getqqavatar&qq=' + qq,
// dataType: 'jsonp',
// jsonp: 'callback',
// jsonpCallback: 'qqavatarCallBack',
// success: function (data) {
// $('div.comment-user-avatar img').attr('src', data[qq]);
// setCookie('user_avatar', data[qq], 30);
// },
// error: function () {
// cached.filter('#qq,#email,#url').val('');
// if (!cached.filter('#qq').val()) {
// $('.qq-check').css('display', 'none');
// $('.gravatar-check').css('display', 'block');
// setCookie('user_qq', '', 30);
// $('div.comment-user-avatar img').attr('src', get_gravatar(cached.filter('#email').val(), 80));
// setCookie('user_avatar', get_gravatar(cached.filter('#email').val(), 80), 30);
// }
// }
// });
});
if (getCookie('user_avatar') && getCookie('user_email') && getCookie('is_user_qq') == 'no' && !getCookie('user_qq_email')) {
$('div.comment-user-avatar img').attr('src', getCookie('user_avatar'));
@ -1011,6 +992,27 @@ setTimeout(function () {
activate_widget();
}, 100);
function load_bangumi() {
if ($("section").hasClass("bangumi")) {
$('body').on('click', '#bangumi-pagination a', function () {
$("#bangumi-pagination a").addClass("loading").text("");
var xhr = new XMLHttpRequest();
xhr.open('POST', this.href, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
var html = JSON.parse(xhr.responseText);
$("#bangumi-pagination").remove();
$(".row").append(html);
}else{
$("#bangumi-pagination a").removeClass("loading").html('<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> ERROR ');
}
};
xhr.send();
return false;
});
}
}
mashiro_global.ini.normalize();
loadCSS(mashiro_option.jsdelivr_css_src);
loadCSS(mashiro_option.entry_content_theme_src);
@ -1594,7 +1596,7 @@ var home = location.href,
var tempScrollTop = $(window).scrollTop();
$(window).scrollTop(tempScrollTop);
$body.animate({
scrollTop: tempScrollTop + 300
scrollTop: tempScrollTop + 100
}, 666)
} else {
$("#pagination").html("<span>很高兴你翻到这里,但是真的没有了...</span>");
@ -1796,6 +1798,9 @@ var home = location.href,
pc_to_top.onclick = function() {
topFunction();
}
mb_to_top.onclick = function() {
topFunction();
}
}
}
$(function () {

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-04-01 22:52+0800\n"
"PO-Revision-Date: 2020-04-01 22:52+0800\n"
"POT-Creation-Date: 2020-04-05 11:52+0800\n"
"PO-Revision-Date: 2020-04-05 11:52+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
@ -222,7 +222,7 @@ msgstr ""
msgid "page %s "
msgstr ""
#: inc/api.php:304 inc/theme_plus.php:727
#: inc/api.php:337 inc/theme_plus.php:727
msgid "The comment is private"
msgstr ""
@ -923,7 +923,7 @@ msgstr ""
msgid "Whether to turn on the top-feature"
msgstr ""
#: options.php:446 options.php:1092
#: options.php:446 options.php:1104
msgid "Default on"
msgstr ""
@ -1429,128 +1429,149 @@ msgid ""
"(mobile device is invalid)"
msgstr ""
#: options.php:974
msgid "The categories of articles that don't not show on homepage"
#: options.php:973
msgid "Bilibili UID"
msgstr ""
#: options.php:975 options.php:982
msgid "Fill in category ID, multiple IDs are divided by a comma \",\""
#: options.php:974
msgid ""
"Fill in your UID, eg.https://space.bilibili.com/13972644/, only fill in with "
"the number part."
msgstr ""
#: options.php:980
msgid "Bilibili Cookie"
msgstr ""
#: options.php:981
msgid "Images category"
msgid ""
"Fill in your Cookies, go to your bilibili homepage, you can get cookies in "
"brownser network pannel with pressing F12. If left this blank, you'll not "
"get the progress."
msgstr ""
#: options.php:988
msgid "Statistics Interface"
#: options.php:986
msgid "The categories of articles that don't not show on homepage"
msgstr ""
#: options.php:987 options.php:994
msgid "Fill in category ID, multiple IDs are divided by a comma \",\""
msgstr ""
#: options.php:993
msgid "Images category"
msgstr ""
#: options.php:1000
msgid "Statistics Interface"
msgstr ""
#: options.php:1005
msgid ""
"WP-Statistics plugin (Professional statistics, can exclude invalid access)"
msgstr ""
#: options.php:994
#: options.php:1006
msgid "Theme built-in (simple statistics, calculate each page access request)"
msgstr ""
#: options.php:998
#: options.php:1010
msgid "Statistical data display format"
msgstr ""
#: options.php:1003
#: options.php:1015
msgid "23333 Views (default)"
msgstr ""
#: options.php:1004
#: options.php:1016
msgid "23,333 Views (britain)"
msgstr ""
#: options.php:1005
#: options.php:1017
msgid "23 333 Views (french)"
msgstr ""
#: options.php:1006
#: options.php:1018
msgid "23k Views (chinese)"
msgstr ""
#: options.php:1010
#: options.php:1022
msgid "Gravatar avatar proxy"
msgstr ""
#: options.php:1011
#: options.php:1023
msgid ""
"A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it "
"blank if you do not need."
msgstr ""
#: options.php:1017
#: options.php:1029
msgid "Comment image upload API"
msgstr ""
#: options.php:1022
#: options.php:1034
msgid "Imgur (https://imgur.com)"
msgstr ""
#: options.php:1023
#: options.php:1035
msgid "SM.MS (https://sm.ms)"
msgstr ""
#: options.php:1024
#: options.php:1036
msgid "Chevereto (https://chevereto.com)"
msgstr ""
#: options.php:1028
#: options.php:1040
msgid "Imgur Client ID"
msgstr ""
#: options.php:1029
#: options.php:1041
msgid ""
"Register your application <a href=\"https://api.imgur.com/oauth2/addclient"
"\">here</a>, note we only need the Client ID here."
msgstr ""
#: options.php:1035
#: options.php:1047
msgid "SM.MS Secret Token"
msgstr ""
#: options.php:1036
#: options.php:1048
msgid ""
"Register your application <a href=\"https://sm.ms/home/apitoken\">here</a>."
msgstr ""
#: options.php:1042
#: options.php:1054
msgid "Chevereto API v1 key"
msgstr ""
#: options.php:1043
#: options.php:1055
msgid "Get your API key here: "
msgstr ""
#: options.php:1049
#: options.php:1061
msgid "Chevereto URL"
msgstr ""
#: options.php:1050
#: options.php:1062
msgid ""
"Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto."
"com"
msgstr ""
#: options.php:1056
#: options.php:1068
msgid "Comment images proxy"
msgstr ""
#: options.php:1057
#: options.php:1069
msgid ""
"A front-ed proxy for the uploaded images. Leave it blank if you do not need."
msgstr ""
#: options.php:1063
#: options.php:1075
msgid "Imgur upload proxy"
msgstr ""
#: options.php:1064
#: options.php:1076
msgid ""
"A back-ed proxy to upload images. You may set a self hosted proxy with "
"Nginx, following my <a href=\"https://2heng.xin/2018/06/06/javascript-upload-"
@ -1560,151 +1581,151 @@ msgid ""
"a>】"
msgstr ""
#: options.php:1070
#: options.php:1082
msgid "Enable live search"
msgstr ""
#: options.php:1071
#: options.php:1083
msgid ""
"Real-time search in the foreground, call the Rest API to update the cache "
"every hour, you can manually set the cache time in api.php"
msgstr ""
#: options.php:1077
#: options.php:1089
msgid "Include comments in live search"
msgstr ""
#: options.php:1078
#: options.php:1090
msgid ""
"Search for comments in real-time search (not recommended if there are too "
"many comments on the site)"
msgstr ""
#: options.php:1084
#: options.php:1096
msgid "Enable baguetteBox"
msgstr ""
#: options.php:1085
#: options.php:1097
msgid ""
"Default off<a href=\"https://github.com/mashirozx/Sakura/wiki/Fancybox"
"\">please read wiki</a>"
msgstr ""
#: options.php:1091
#: options.php:1103
msgid "Enable lazyload in posts"
msgstr ""
#: options.php:1098
#: options.php:1110
msgid "lazyload spinner"
msgstr ""
#: options.php:1099
#: options.php:1111
msgid "The placeholder to display when the image loads, fill in the image url"
msgstr ""
#: options.php:1105
#: options.php:1117
msgid "Whether to enable the clipboard copyright"
msgstr ""
#: options.php:1106
#: options.php:1118
msgid ""
"Automatically add a copyright to the clipboard when copying more than 30 "
"bytes, which is enabled by default."
msgstr ""
#: options.php:1112
#: options.php:1124
msgid "Email address prefix"
msgstr ""
#: options.php:1113
#: options.php:1125
msgid ""
"For sending system mail, the sender address displayed in the user's mailbox, "
"do not use Chinese, the default system email address is bibi@your_domain_name"
msgstr ""
#: options.php:1119
#: options.php:1131
msgid "Comments reply notification"
msgstr ""
#: options.php:1120
#: options.php:1132
msgid ""
"WordPress will use email to notify users when their comments receive a reply "
"by default. Tick this item allows users to set their own comments reply "
"notification"
msgstr ""
#: options.php:1126
#: options.php:1138
msgid "Administrator comment notification"
msgstr ""
#: options.php:1127
#: options.php:1139
msgid ""
"Whether to use email notification when the administrator's comments receive "
"a reply"
msgstr ""
#: options.php:1133
#: options.php:1145
msgid "Enable private comment"
msgstr ""
#: options.php:1134
#: options.php:1146
msgid "Allow users to set their own comments to be invisible to others"
msgstr ""
#: options.php:1140
#: options.php:1152
msgid "Human verification"
msgstr ""
#: options.php:1141
#: options.php:1153
msgid "Enable human verification"
msgstr ""
#: options.php:1147
#: options.php:1159
msgid "QQ avatar link encryption"
msgstr ""
#: options.php:1148
#: options.php:1160
msgid "Do not display the user's qq avatar links directly."
msgstr ""
#: options.php:1153
#: options.php:1165
msgid "Off (default)"
msgstr ""
#: options.php:1154
#: options.php:1166
msgid "use redirect (general security)"
msgstr ""
#: options.php:1155
#: options.php:1167
msgid "fetch data at backend (high security)"
msgstr ""
#: options.php:1156
#: options.php:1168
msgid "fetch data at backend (high securityslow)"
msgstr ""
#: options.php:1160
#: options.php:1172
msgid "Comment UA infomation"
msgstr ""
#: options.php:1161
#: options.php:1173
msgid ""
"Check to enable, display the user's browser, operating system information"
msgstr ""
#: options.php:1167
#: options.php:1179
msgid "Enable disqus"
msgstr ""
#: options.php:1168
#: options.php:1180
msgid "Enable disqus for comment"
msgstr ""
#: options.php:1174
#: options.php:1186
msgid "Time Zone adjustment"
msgstr ""
#: options.php:1175
#: options.php:1187
msgid ""
"If the comment has a time difference problem adjust here, fill in an "
"integer, the calculation method: actual_time = display_error_time - "
@ -1763,6 +1784,10 @@ msgstr ""
msgid "Attribution-NonCommercial-ShareAlike 4.0 International"
msgstr ""
#: user/page-bangumi.php:27
msgid "Please fill in the Bilibili UID in Sakura Options."
msgstr ""
#: user/page-login.php:18
msgid "Remember Me"
msgstr ""
@ -1827,7 +1852,11 @@ msgstr ""
msgid "Sign up"
msgstr ""
#: user/page-register.php:92
#: user/page-register.php:90
msgid "Success! Redirecting......"
msgstr ""
#: user/page-register.php:95
msgid "Registration is not open yet."
msgstr ""

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-04-01 22:51+0800\n"
"POT-Creation-Date: 2020-04-05 11:50+0800\n"
"PO-Revision-Date: 2019-11-01 14:27+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -220,7 +220,7 @@ msgstr ""
msgid "page %s "
msgstr ""
#: inc/api.php:304 inc/theme_plus.php:727
#: inc/api.php:337 inc/theme_plus.php:727
msgid "The comment is private"
msgstr ""
@ -911,7 +911,7 @@ msgstr ""
msgid "Whether to turn on the top-feature"
msgstr ""
#: options.php:446 options.php:1092
#: options.php:446 options.php:1104
msgid "Default on"
msgstr ""
@ -1406,123 +1406,142 @@ msgid ""
"invalid)"
msgstr ""
#: options.php:974
msgid "The categories of articles that don't not show on homepage"
#: options.php:973
msgid "Bilibili UID"
msgstr ""
#: options.php:975 options.php:982
msgid "Fill in category ID, multiple IDs are divided by a comma \",\""
#: options.php:974
msgid ""
"Fill in your UID, eg.https://space.bilibili.com/13972644/, only fill in with the number part."
msgstr ""
#: options.php:980
msgid "Bilibili Cookie"
msgstr ""
#: options.php:981
msgid "Images category"
msgid ""
"Fill in your Cookies, go to your bilibili homepage, you can get cookies in brownser network "
"pannel with pressing F12. If left this blank, you'll not get the progress."
msgstr ""
#: options.php:988
msgid "Statistics Interface"
#: options.php:986
msgid "The categories of articles that don't not show on homepage"
msgstr ""
#: options.php:987 options.php:994
msgid "Fill in category ID, multiple IDs are divided by a comma \",\""
msgstr ""
#: options.php:993
msgid "WP-Statistics plugin (Professional statistics, can exclude invalid access)"
msgid "Images category"
msgstr ""
#: options.php:994
msgid "Theme built-in (simple statistics, calculate each page access request)"
msgstr ""
#: options.php:998
msgid "Statistical data display format"
msgstr ""
#: options.php:1003
msgid "23333 Views (default)"
msgstr ""
#: options.php:1004
msgid "23,333 Views (britain)"
#: options.php:1000
msgid "Statistics Interface"
msgstr ""
#: options.php:1005
msgid "23 333 Views (french)"
msgid "WP-Statistics plugin (Professional statistics, can exclude invalid access)"
msgstr ""
#: options.php:1006
msgid "23k Views (chinese)"
msgid "Theme built-in (simple statistics, calculate each page access request)"
msgstr ""
#: options.php:1010
msgid "Statistical data display format"
msgstr ""
#: options.php:1015
msgid "23333 Views (default)"
msgstr ""
#: options.php:1016
msgid "23,333 Views (britain)"
msgstr ""
#: options.php:1017
msgid "23 333 Views (french)"
msgstr ""
#: options.php:1018
msgid "23k Views (chinese)"
msgstr ""
#: options.php:1022
msgid "Gravatar avatar proxy"
msgstr ""
#: options.php:1011
#: options.php:1023
msgid ""
"A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it blank if you do not "
"need."
msgstr ""
#: options.php:1017
#: options.php:1029
msgid "Comment image upload API"
msgstr ""
#: options.php:1022
#: options.php:1034
msgid "Imgur (https://imgur.com)"
msgstr ""
#: options.php:1023
#: options.php:1035
msgid "SM.MS (https://sm.ms)"
msgstr ""
#: options.php:1024
#: options.php:1036
msgid "Chevereto (https://chevereto.com)"
msgstr ""
#: options.php:1028
#: options.php:1040
msgid "Imgur Client ID"
msgstr ""
#: options.php:1029
#: options.php:1041
msgid ""
"Register your application <a href=\"https://api.imgur.com/oauth2/addclient\">here</a>, note we "
"only need the Client ID here."
msgstr ""
#: options.php:1035
#: options.php:1047
msgid "SM.MS Secret Token"
msgstr ""
#: options.php:1036
#: options.php:1048
msgid "Register your application <a href=\"https://sm.ms/home/apitoken\">here</a>."
msgstr ""
#: options.php:1042
#: options.php:1054
msgid "Chevereto API v1 key"
msgstr ""
#: options.php:1043
#: options.php:1055
msgid "Get your API key here: "
msgstr ""
#: options.php:1049
#: options.php:1061
msgid "Chevereto URL"
msgstr ""
#: options.php:1050
#: options.php:1062
msgid "Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto.com"
msgstr ""
#: options.php:1056
#: options.php:1068
msgid "Comment images proxy"
msgstr ""
#: options.php:1057
#: options.php:1069
msgid "A front-ed proxy for the uploaded images. Leave it blank if you do not need."
msgstr ""
#: options.php:1063
#: options.php:1075
msgid "Imgur upload proxy"
msgstr ""
#: options.php:1064
#: options.php:1076
msgid ""
"A back-ed proxy to upload images. You may set a self hosted proxy with Nginx, following my <a "
"href=\"https://2heng.xin/2018/06/06/javascript-upload-images-with-imgur-api/\">turtal</a>. "
@ -1531,146 +1550,146 @@ msgid ""
"</a>】"
msgstr ""
#: options.php:1070
#: options.php:1082
msgid "Enable live search"
msgstr ""
#: options.php:1071
#: options.php:1083
msgid ""
"Real-time search in the foreground, call the Rest API to update the cache every hour, you can "
"manually set the cache time in api.php"
msgstr ""
#: options.php:1077
#: options.php:1089
msgid "Include comments in live search"
msgstr ""
#: options.php:1078
#: options.php:1090
msgid ""
"Search for comments in real-time search (not recommended if there are too many comments on the "
"site)"
msgstr ""
#: options.php:1084
#: options.php:1096
msgid "Enable baguetteBox"
msgstr ""
#: options.php:1085
#: options.php:1097
msgid ""
"Default off<a href=\"https://github.com/mashirozx/Sakura/wiki/Fancybox\">please read wiki</a>"
msgstr ""
#: options.php:1091
#: options.php:1103
msgid "Enable lazyload in posts"
msgstr ""
#: options.php:1098
#: options.php:1110
msgid "lazyload spinner"
msgstr ""
#: options.php:1099
#: options.php:1111
msgid "The placeholder to display when the image loads, fill in the image url"
msgstr ""
#: options.php:1105
#: options.php:1117
msgid "Whether to enable the clipboard copyright"
msgstr ""
#: options.php:1106
#: options.php:1118
msgid ""
"Automatically add a copyright to the clipboard when copying more than 30 bytes, which is "
"enabled by default."
msgstr ""
#: options.php:1112
#: options.php:1124
msgid "Email address prefix"
msgstr ""
#: options.php:1113
#: options.php:1125
msgid ""
"For sending system mail, the sender address displayed in the user's mailbox, do not use "
"Chinese, the default system email address is bibi@your_domain_name"
msgstr ""
#: options.php:1119
#: options.php:1131
msgid "Comments reply notification"
msgstr ""
#: options.php:1120
#: options.php:1132
msgid ""
"WordPress will use email to notify users when their comments receive a reply by default. Tick "
"this item allows users to set their own comments reply notification"
msgstr ""
#: options.php:1126
#: options.php:1138
msgid "Administrator comment notification"
msgstr ""
#: options.php:1127
#: options.php:1139
msgid "Whether to use email notification when the administrator's comments receive a reply"
msgstr ""
#: options.php:1133
#: options.php:1145
msgid "Enable private comment"
msgstr ""
#: options.php:1134
#: options.php:1146
msgid "Allow users to set their own comments to be invisible to others"
msgstr ""
#: options.php:1140
#: options.php:1152
msgid "Human verification"
msgstr ""
#: options.php:1141
#: options.php:1153
msgid "Enable human verification"
msgstr ""
#: options.php:1147
#: options.php:1159
msgid "QQ avatar link encryption"
msgstr ""
#: options.php:1148
#: options.php:1160
msgid "Do not display the user's qq avatar links directly."
msgstr ""
#: options.php:1153
#: options.php:1165
msgid "Off (default)"
msgstr ""
#: options.php:1154
#: options.php:1166
msgid "use redirect (general security)"
msgstr ""
#: options.php:1155
#: options.php:1167
msgid "fetch data at backend (high security)"
msgstr ""
#: options.php:1156
#: options.php:1168
msgid "fetch data at backend (high securityslow)"
msgstr ""
#: options.php:1160
#: options.php:1172
msgid "Comment UA infomation"
msgstr ""
#: options.php:1161
#: options.php:1173
msgid "Check to enable, display the user's browser, operating system information"
msgstr ""
#: options.php:1167
#: options.php:1179
msgid "Enable disqus"
msgstr ""
#: options.php:1168
#: options.php:1180
msgid "Enable disqus for comment"
msgstr ""
#: options.php:1174
#: options.php:1186
msgid "Time Zone adjustment"
msgstr ""
#: options.php:1175
#: options.php:1187
msgid ""
"If the comment has a time difference problem adjust here, fill in an integer, the calculation "
"method: actual_time = display_error_time - the_integer_you_entered (unit: hour)"
@ -1724,6 +1743,10 @@ msgstr ""
msgid "Attribution-NonCommercial-ShareAlike 4.0 International"
msgstr ""
#: user/page-bangumi.php:27
msgid "Please fill in the Bilibili UID in Sakura Options."
msgstr ""
#: user/page-login.php:18
msgid "Remember Me"
msgstr ""
@ -1787,6 +1810,10 @@ msgstr ""
msgid "Sign up"
msgstr ""
#: user/page-register.php:92
#: user/page-register.php:90
msgid "Success! Redirecting......"
msgstr ""
#: user/page-register.php:95
msgid "Registration is not open yet."
msgstr ""

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-04-01 22:51+0800\n"
"PO-Revision-Date: 2020-04-01 22:52+0800\n"
"POT-Creation-Date: 2020-04-05 11:52+0800\n"
"PO-Revision-Date: 2020-04-05 11:52+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
@ -227,7 +227,7 @@ msgstr ""
msgid "page %s "
msgstr "第 %s 页 "
#: inc/api.php:304 inc/theme_plus.php:727
#: inc/api.php:337 inc/theme_plus.php:727
msgid "The comment is private"
msgstr "该评论为私密评论"
@ -938,7 +938,7 @@ msgstr "点点"
msgid "Whether to turn on the top-feature"
msgstr "是否开启聚焦"
#: options.php:446 options.php:1092
#: options.php:446 options.php:1104
msgid "Default on"
msgstr "默认开启"
@ -1465,56 +1465,80 @@ msgstr ""
"公告内容文字超出142个字节将会被滚动显示移动端无效一个汉字 = 3字节一"
"个字母 = 1字节自己计算吧"
#: options.php:973
msgid "Bilibili UID"
msgstr ""
#: options.php:974
msgid ""
"Fill in your UID, eg.https://space.bilibili.com/13972644/, only fill in with "
"the number part."
msgstr ""
"填写你的UID,例如https://space.bilibili.com/13972644/,只需填写数字部分。"
#: options.php:980
msgid "Bilibili Cookie"
msgstr ""
#: options.php:981
msgid ""
"Fill in your Cookies, go to your bilibili homepage, you can get cookies in "
"brownser network pannel with pressing F12. If left this blank, you'll not "
"get the progress."
msgstr ""
"填写你的帐号Cookies。F12打开浏览器网络面板前往你的B站主页获取Cookies。如果"
"留空,将不会显示追番进度。"
#: options.php:986
msgid "The categories of articles that don't not show on homepage"
msgstr "首页不显示的分类文章"
#: options.php:975 options.php:982
#: options.php:987 options.php:994
msgid "Fill in category ID, multiple IDs are divided by a comma \",\""
msgstr "填写分类ID多个用英文“ , ”分开"
#: options.php:981
#: options.php:993
msgid "Images category"
msgstr "图片展示分类"
#: options.php:988
#: options.php:1000
msgid "Statistics Interface"
msgstr "统计接口"
#: options.php:993
#: options.php:1005
msgid ""
"WP-Statistics plugin (Professional statistics, can exclude invalid access)"
msgstr "WP-Statistics 插件(专业性统计,可排除无效访问)"
#: options.php:994
#: options.php:1006
msgid "Theme built-in (simple statistics, calculate each page access request)"
msgstr "主题内建(简单的统计,计算每一次页面访问请求)"
#: options.php:998
#: options.php:1010
msgid "Statistical data display format"
msgstr "统计数据显示格式"
#: options.php:1003
#: options.php:1015
msgid "23333 Views (default)"
msgstr "23333 次访问(默认)"
#: options.php:1004
#: options.php:1016
msgid "23,333 Views (britain)"
msgstr "23,333 次访问(英式)"
#: options.php:1005
#: options.php:1017
msgid "23 333 Views (french)"
msgstr "23 333 次访问(法式)"
#: options.php:1006
#: options.php:1018
msgid "23k Views (chinese)"
msgstr "23k 次访问(中式)"
#: options.php:1010
#: options.php:1022
msgid "Gravatar avatar proxy"
msgstr "Gravatar头像代理"
#: options.php:1011
#: options.php:1023
msgid ""
"A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it "
"blank if you do not need."
@ -1522,27 +1546,27 @@ msgstr ""
"填写Gravatar头像的代理地址例如gravatar.2heng.xin/avatar。留空则不使用代"
"理。"
#: options.php:1017
#: options.php:1029
msgid "Comment image upload API"
msgstr "评论上传图片接口"
#: options.php:1022
#: options.php:1034
msgid "Imgur (https://imgur.com)"
msgstr ""
#: options.php:1023
#: options.php:1035
msgid "SM.MS (https://sm.ms)"
msgstr ""
#: options.php:1024
#: options.php:1036
msgid "Chevereto (https://chevereto.com)"
msgstr ""
#: options.php:1028
#: options.php:1040
msgid "Imgur Client ID"
msgstr ""
#: options.php:1029
#: options.php:1041
msgid ""
"Register your application <a href=\"https://api.imgur.com/oauth2/addclient"
"\">here</a>, note we only need the Client ID here."
@ -1550,48 +1574,48 @@ msgstr ""
"在<a href=\"https://api.imgur.com/oauth2/addclient\">这里</a>注册你的 "
"application , 注意此处只需要填写 Client ID."
#: options.php:1035
#: options.php:1047
msgid "SM.MS Secret Token"
msgstr ""
#: options.php:1036
#: options.php:1048
msgid ""
"Register your application <a href=\"https://sm.ms/home/apitoken\">here</a>."
msgstr "在<a href=\"https://sm.ms/home/apitoken\">这里</a>获取 key."
#: options.php:1042
#: options.php:1054
msgid "Chevereto API v1 key"
msgstr ""
#: options.php:1043
#: options.php:1055
msgid "Get your API key here: "
msgstr "在这里获取你的 API key "
#: options.php:1049
#: options.php:1061
msgid "Chevereto URL"
msgstr ""
#: options.php:1050
#: options.php:1062
msgid ""
"Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto."
"com"
msgstr ""
"你的 Chevereto 首页 url, 注意结尾没有 /, 例如https://your.cherverto.com"
#: options.php:1056
#: options.php:1068
msgid "Comment images proxy"
msgstr "评论图片代理"
#: options.php:1057
#: options.php:1069
msgid ""
"A front-ed proxy for the uploaded images. Leave it blank if you do not need."
msgstr "前端显示的图片的代理。"
#: options.php:1063
#: options.php:1075
msgid "Imgur upload proxy"
msgstr "Imgur 上传代理"
#: options.php:1064
#: options.php:1076
msgid ""
"A back-ed proxy to upload images. You may set a self hosted proxy with "
"Nginx, following my <a href=\"https://2heng.xin/2018/06/06/javascript-upload-"
@ -1606,11 +1630,11 @@ msgstr ""
"端显示都需要代理!如果服务器在国外不需要上传代理,此处填写默认值即可:【<a "
"href=\"https://api.imgur.com/3/image/\">https://api.imgur.com/3/image/</a>】"
#: options.php:1070
#: options.php:1082
msgid "Enable live search"
msgstr "启用实时搜索"
#: options.php:1071
#: options.php:1083
msgid ""
"Real-time search in the foreground, call the Rest API to update the cache "
"every hour, you can manually set the cache time in api.php"
@ -1618,21 +1642,21 @@ msgstr ""
"前台实现实时搜索,调用 Rest API 每小时更新一次缓存,可在 api.php 里手动设置缓"
"存时间"
#: options.php:1077
#: options.php:1089
msgid "Include comments in live search"
msgstr "实时搜索包含评论"
#: options.php:1078
#: options.php:1090
msgid ""
"Search for comments in real-time search (not recommended if there are too "
"many comments on the site)"
msgstr "在实时搜索中搜索评论(如果网站评论数量太多不建议开启)"
#: options.php:1084
#: options.php:1096
msgid "Enable baguetteBox"
msgstr "启用 baguetteBox"
#: options.php:1085
#: options.php:1097
msgid ""
"Default off<a href=\"https://github.com/mashirozx/Sakura/wiki/Fancybox"
"\">please read wiki</a>"
@ -1640,33 +1664,33 @@ msgstr ""
"默认禁用,<a href=\"https://github.com/mashirozx/Sakura/wiki/Fancybox\">请阅"
"读说明</a>"
#: options.php:1091
#: options.php:1103
msgid "Enable lazyload in posts"
msgstr "文章内图片启用 lazyload"
#: options.php:1098
#: options.php:1110
msgid "lazyload spinner"
msgstr "lazyload 占位图"
#: options.php:1099
#: options.php:1111
msgid "The placeholder to display when the image loads, fill in the image url"
msgstr "图片加载时要显示的占位图,填写图片 url"
#: options.php:1105
#: options.php:1117
msgid "Whether to enable the clipboard copyright"
msgstr "是否开启剪贴板版权标识"
#: options.php:1106
#: options.php:1118
msgid ""
"Automatically add a copyright to the clipboard when copying more than 30 "
"bytes, which is enabled by default."
msgstr "复制超过30个字节时自动向剪贴板添加版权标识默认开启。"
#: options.php:1112
#: options.php:1124
msgid "Email address prefix"
msgstr "发件地址前缀"
#: options.php:1113
#: options.php:1125
msgid ""
"For sending system mail, the sender address displayed in the user's mailbox, "
"do not use Chinese, the default system email address is bibi@your_domain_name"
@ -1674,11 +1698,11 @@ msgstr ""
"用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件"
"地址为 bibi@你的域名"
#: options.php:1119
#: options.php:1131
msgid "Comments reply notification"
msgstr "邮件回复通知"
#: options.php:1120
#: options.php:1132
msgid ""
"WordPress will use email to notify users when their comments receive a reply "
"by default. Tick this item allows users to set their own comments reply "
@ -1687,78 +1711,78 @@ msgstr ""
"WordPress默认会使用邮件通知用户评论收到回复开启此项允许用户设置自己的评论收"
"到回复时是否使用邮件通知"
#: options.php:1126
#: options.php:1138
msgid "Administrator comment notification"
msgstr "邮件回复通知管理员"
#: options.php:1127
#: options.php:1139
msgid ""
"Whether to use email notification when the administrator's comments receive "
"a reply"
msgstr "当管理员评论收到回复时是否使用邮件通知"
#: options.php:1133
#: options.php:1145
msgid "Enable private comment"
msgstr "允许私密评论"
#: options.php:1134
#: options.php:1146
msgid "Allow users to set their own comments to be invisible to others"
msgstr "允许用户设置自己的评论对其他人不可见"
#: options.php:1140
#: options.php:1152
msgid "Human verification"
msgstr "机器人验证"
#: options.php:1141
#: options.php:1153
msgid "Enable human verification"
msgstr "开启机器人验证"
#: options.php:1147
#: options.php:1159
msgid "QQ avatar link encryption"
msgstr "QQ头像链接加密"
#: options.php:1148
#: options.php:1160
msgid "Do not display the user's qq avatar links directly."
msgstr "不直接暴露用户QQ头像链接"
#: options.php:1153
#: options.php:1165
msgid "Off (default)"
msgstr "关闭(默认)"
#: options.php:1154
#: options.php:1166
msgid "use redirect (general security)"
msgstr "使用重定向(安全性低)"
#: options.php:1155
#: options.php:1167
msgid "fetch data at backend (high security)"
msgstr "后端获取头像数据(安全性高)"
#: options.php:1156
#: options.php:1168
msgid "fetch data at backend (high securityslow)"
msgstr "后端解析QQ头像接口安全性高"
#: options.php:1160
#: options.php:1172
msgid "Comment UA infomation"
msgstr "评论UA信息"
#: options.php:1161
#: options.php:1173
msgid ""
"Check to enable, display the user's browser, operating system information"
msgstr "勾选开启,显示用户的浏览器,操作系统信息"
#: options.php:1167
#: options.php:1179
msgid "Enable disqus"
msgstr "开启多说插件支持"
#: options.php:1168
#: options.php:1180
msgid "Enable disqus for comment"
msgstr "多说已经凉了~~"
#: options.php:1174
#: options.php:1186
msgid "Time Zone adjustment"
msgstr "时区调整"
#: options.php:1175
#: options.php:1187
msgid ""
"If the comment has a time difference problem adjust here, fill in an "
"integer, the calculation method: actual_time = display_error_time - "
@ -1818,6 +1842,10 @@ msgstr ""
msgid "Attribution-NonCommercial-ShareAlike 4.0 International"
msgstr "知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议"
#: user/page-bangumi.php:27
msgid "Please fill in the Bilibili UID in Sakura Options."
msgstr "请在后台设置填写 Bilibili UID 后继续。"
#: user/page-login.php:18
msgid "Remember Me"
msgstr "记住我"
@ -1882,7 +1910,11 @@ msgstr "拖动滑块验证"
msgid "Sign up"
msgstr "注 册"
#: user/page-register.php:92
#: user/page-register.php:90
msgid "Success! Redirecting......"
msgstr "注册成功!正在跳转......"
#: user/page-register.php:95
msgid "Registration is not open yet."
msgstr "暂未开放注册。"

View File

@ -969,7 +969,19 @@ function optionsframework_options()
'id' => 'notice_title',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Bilibili UID', 'sakura'), /*bilibiliUID*/
'desc' => __('Fill in your UID, eg.https://space.bilibili.com/13972644/, only fill in with the number part.', 'sakura'),
'id' => 'bilibili_id',
'std' => '13972644',
'type' => 'text');
$options[] = array(
'name' => __('Bilibili Cookie', 'sakura'), /*Bilibili Cookie*/
'desc' => __('Fill in your Cookies, go to your bilibili homepage, you can get cookies in brownser network pannel with pressing F12. If left this blank, you\'ll not get the progress.', 'sakura'),
'id' => 'bilibili_cookie',
'std' => 'LIVE_BUVID=',
'type' => 'textarea');
$options[] = array(
'name' => __('The categories of articles that don\'t not show on homepage', 'sakura'), /*首页不显示的分类文章*/
'desc' => __('Fill in category ID, multiple IDs are divided by a comma ","', 'sakura'), /*填写分类ID多个用英文“ , ”分开*/

179
style.css
View File

@ -3867,6 +3867,10 @@ li.feature-2 {
z-index: -1
}
@supports (-webkit-touch-callout: none) {
#centerbg: { background-attachment: scroll !important; }
}
@media (max-width:860px) {
#centerbg {
height: 300px;
@ -5010,7 +5014,7 @@ i.iconfont.down {
color: #ADADAD
}
#pagination span {
#pagination span,#bangumi-pagination span {
color: #989898;
font-size: 15px
}
@ -5020,7 +5024,7 @@ i.iconfont.down {
color: orange
}
#pagination .loading {
#pagination .loading,#bangumi-pagination .loading {
background: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/wordpress-rotating-ball-o.svg);
background-position: center;
background-repeat: no-repeat;
@ -8625,3 +8629,174 @@ h1[id*=toc-head]::before,h2[id*=toc-head]::before,h3[id*=toc-head]::before,h4[id
width: 100%;
height: 100%;
}
.bangumi {
margin-top: 40px;
}
.bangumi .row {
display: flex;
margin: 0 -10px -20px;
flex-wrap: wrap;
}
.bangumi .column {
max-width: 50%;
flex: 0 0 50%;
margin-bottom: 30px;
padding: 0 15px;
max-width: 100%;
flex: 0 0 100%;
transition: .5s;
}
.bangumi-item {
height: 0;
color: #fff;
display: block;
overflow: hidden;
text-align: center;
position: relative;
padding-bottom: 130%;
box-shadow: 0 0 10px rgba(0, 0, 0, .1), 0 5px 20px rgba(0, 0, 0, .2);
}
.bangumi-item:hover {
color: #fff;
}
.bangumi-item img {
width: 100%;
user-select: none;
object-fit: cover;
transition: filter 2s;
}
.bangumi-item .bangumi-info {
height: 30%;
top: 0;
left: 0;
right: 0;
padding: 10px;
position: absolute;
background: rgba(0, 0, 0, .5);
transition: transform 1s;
transform: translateY(250%);
}
.bangumi-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-top: 0;
}
.bangumi-summary {
height: 65%;
white-space: normal;
display: none;
font-weight: bold;
}
.bangumi-status-bar {
top: 0;
bottom: 0;
max-width: 100%;
position: absolute;
background: #dc143c;
}
.bangumi-status, .bangumi-status p {
position: relative;
}
.bangumi-status {
background: rgba(0, 0, 0, .6);
}
@media screen and (min-width: 400px) {
.bangumi .column {
max-width: 50%;
flex: 0 0 50%;
}
.bangumi-item .bangumi-info{
height: 50%;
transform: translateY(140%);
}
.bangumi-title {
height: 20%;
}
}
@media screen and (min-width: 600px) {
.bangumi .column {
max-width: 33.3333%;
flex: 0 0 33.3333%;
}
.bangumi-item .bangumi-info{
height: 50%;
transform: translateY(140%);
}
}
@media screen and (min-width: 900px) {
.bangumi .column {
max-width: 25%;
flex: 0 0 25%;
}
.bangumi-item .bangumi-info{
height: 100%;
transform: translateY(85%);
}
.bangumi-item:hover .bangumi-info {
transform: translateY(0);
}
.bangumi-item:hover img{
filter: blur(3px);
}
.bangumi-title {
height: 15%;
}
.bangumi-summary{
display: block;
}
.bangumi-status {
height: 10%;
}
}
@media screen and (min-width: 1200px) {
.bangumi-item .bangumi-info{
height: 75%;
transform: translateY(115%);
}
.bangumi-item:hover .bangumi-info {
transform: translateY(35%);
}
.bangumi-title {
height: 10%;
}
}
#bangumi-pagination {
width: 100%;
margin-top: 80px;
padding: 20px 0;
font-size: 36px;
text-align: center;
}
.bangumi-next{
font-family: sans-serif;
color: #e67474;
position: relative;
padding: 13px 35px;
overflow: hidden;
}
.bangumi-next:before {
content: ' ';
background-color: pink;
bottom: 0;
left: 0;
width: 100%;
height: 0;
position: absolute;
transition: all 5s;
z-index: -1;
}
.bangumi-next.loading:before{
display: none !important;
}
.bangumi-next:hover:before {
height: 100%;
}
.bangumi-next i {
color: orange;
}

View File

@ -0,0 +1,35 @@
<?php
/**
Template Name: Bangumi
*/
get_header();
?>
<meta name="referrer" content="same-origin">
<style>
#content,.comments,.site-footer{max-width:1200px;}
.comments{display: none}
</style>
</head>
<?php while(have_posts()) : the_post(); ?>
<?php if(akina_option('patternimg') || !get_post_thumbnail_id(get_the_ID())) { ?>
<span class="linkss-title"><?php the_title();?></span>
<?php } ?>
<article <?php post_class("post-item"); ?>>
<?php the_content(); ?>
<section class="bangumi">
<?php if (akina_option('bilibili_id') ):?>
<div class="row">
<?php echo get_bgm_items(); ?>
<?php else: ?>
<div class="row">
<p> <?php _e("Please fill in the Bilibili UID in Sakura Options.","sakura"); ?></p>
</div>
<?php endif; ?>
</section>
</article>
<?php endwhile; ?>
<?php
get_footer();

View File

@ -86,7 +86,10 @@ if( !empty($_POST['register_reg']) ) {
<?php }else{
$loadurl = akina_option('exlogin_url') ? akina_option('exlogin_url') : get_bloginfo('url');
?>
<script>//window.location.href='<?php echo $loadurl; ?>';</script>
<div class="ex-register-title">
<h3><?php _e("Success! Redirecting......","sakura")/*注册成功!正在跳转...*/?></h3>
</div>
<script>window.location.href='<?php echo $loadurl; ?>';</script>
<?php } ?>
<?php else : ?>
<div class="register-close"><p><?php _e("Registration is not open yet.","sakura")/*暂未开放注册。*/?></p></div>