Compare commits

...

24 Commits
v3.3.8 ... 3.x

Author SHA1 Message Date
imgbot[bot] 9a7a597ac1
[ImgBot] Optimize images (#307)
*Total -- 2,005.66kb -> 1,447.46kb (27.83%)

/images/smilies/bili/tuxue.png -- 24.83kb -> 8.07kb (67.5%)
/images/smilies/bili/xieyanxiao.png -- 25.61kb -> 8.86kb (65.41%)
/images/smilies/bili/qinqin.png -- 28.16kb -> 11.01kb (60.89%)
/images/smilies/bili/doge.png -- 28.77kb -> 11.70kb (59.35%)
/images/smilies/bili/shengqi.png -- 29.09kb -> 12.44kb (57.24%)
/images/smilies/bili/guzhang.png -- 29.65kb -> 12.68kb (57.24%)
/images/smilies/bili/huaixiao.png -- 37.33kb -> 18.09kb (51.53%)
/images/smilies/bili/baiyan.png -- 34.27kb -> 16.73kb (51.18%)
/images/smilies/bili/yun.png -- 37.94kb -> 18.67kb (50.78%)
/images/smilies/bili/daku.png -- 34.48kb -> 17.04kb (50.58%)
/images/smilies/bili/weixiao.png -- 40.23kb -> 20.01kb (50.25%)
/images/smilies/bili/yiwen.png -- 38.27kb -> 19.47kb (49.12%)
/images/smilies/bili/dianzan.png -- 34.15kb -> 17.70kb (48.18%)
/images/smilies/bili/fadai.png -- 42.36kb -> 22.18kb (47.64%)
/images/smilies/bili/nanguo.png -- 47.20kb -> 26.09kb (44.71%)
/images/smilies/bili/outu.png -- 42.76kb -> 23.69kb (44.61%)
/images/smilies/bili/se.png -- 37.86kb -> 21.10kb (44.25%)
/images/smilies/bili/wunai.png -- 48.69kb -> 27.46kb (43.61%)
/images/smilies/bili/haixiu.png -- 50.82kb -> 29.35kb (42.25%)
/images/smilies/bili/xiaoku.png -- 46.64kb -> 28.31kb (39.31%)
/images/smilies/bili/weiqu.png -- 46.17kb -> 28.25kb (38.81%)
/images/smilies/bili/koubi.png -- 55.59kb -> 34.16kb (38.55%)
/images/smilies/bili/jingxia.png -- 64.71kb -> 40.09kb (38.04%)
/images/smilies/bili/zaijian.png -- 50.89kb -> 31.81kb (37.49%)
/images/logo.png -- 3.23kb -> 2.15kb (33.54%)
/images/avatar.jpeg -- 1.29kb -> 0.88kb (31.97%)
/images/smilies/bili/shuizhao.png -- 57.47kb -> 39.34kb (31.55%)
/images/mashiro-logo-s.png -- 3.05kb -> 2.13kb (30.19%)
/images/smilies/bili/sikao.png -- 66.25kb -> 46.90kb (29.21%)
/images/smilies/bili/fanu.png -- 70.29kb -> 55.68kb (20.78%)
/manifest/icon.png -- 50.43kb -> 41.17kb (18.36%)
/manifest/jpeg/e9f33c2c502ab43804964ce7edd431f9.jpeg -- 43.23kb -> 37.48kb (13.3%)
/manifest/jpeg/783bf161f47b32882f0e962fd4064de7.th.jpeg -- 20.50kb -> 18.90kb (7.8%)
/screenshot.jpg -- 102.79kb -> 94.89kb (7.69%)
/manifest/jpeg/19313b0d62b27c8ba022f60fbfedd5ee.jpeg -- 101.61kb -> 94.64kb (6.86%)
/images/avatar.jpg -- 14.53kb -> 13.55kb (6.72%)
/manifest/jpeg/e9f33c2c502ab43804964ce7edd431f9.th.jpeg -- 9.71kb -> 9.07kb (6.56%)
/images/temp.jpg -- 31.91kb -> 29.87kb (6.39%)
/manifest/jpeg/783bf161f47b32882f0e962fd4064de7.jpeg -- 200.07kb -> 190.98kb (4.55%)
/images/random/d-1.jpg -- 14.69kb -> 14.07kb (4.25%)
/images/random/d-4.jpg -- 15.12kb -> 14.51kb (4.06%)
/images/random/d-10.jpg -- 15.05kb -> 14.45kb (4.05%)
/images/random/d-8.jpg -- 14.89kb -> 14.31kb (3.92%)
/images/random/d-9.jpg -- 14.92kb -> 14.33kb (3.91%)
/images/random/d-2.jpg -- 15.01kb -> 14.43kb (3.88%)
/images/random/d-5.jpg -- 15.39kb -> 14.80kb (3.83%)
/images/random/d-3.jpg -- 15.13kb -> 14.55kb (3.83%)
/manifest/jpeg/19313b0d62b27c8ba022f60fbfedd5ee.th.jpeg -- 16.88kb -> 16.25kb (3.76%)
/images/random/d-6.jpg -- 15.26kb -> 14.69kb (3.74%)
/images/random/d-7.jpg -- 15.75kb -> 15.16kb (3.7%)
/inc/fonts/iconfont.svg -- 32.47kb -> 31.52kb (2.93%)
/inc/fonts/SAKURASO.old/sakuraso.svg -- 7.84kb -> 7.62kb (2.78%)
/inc/fonts/SAKURASO.old/sakuraso-symbol.svg -- 7.66kb -> 7.61kb (0.61%)
/images/smilies/bili/mudengkoudai.png -- 2.09kb -> 2.07kb (0.61%)
/manifest/gallary/海の空(56993195)_by_夏T.jpg -- 54.69kb -> 54.50kb (0.34%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2023-02-07 10:55:36 +08:00
migftw 233d0356c9
Update README-en.md (#301) 2022-10-09 13:48:00 +08:00
migftw 8bea22e9da
Update README.md (#302) 2022-09-21 14:43:44 +08:00
Mashiro 0128ba483b
fix: remove unused code 2022-06-01 14:47:16 +08:00
TershiXia 8842caf739
Add Feature: Traditional Chinese Support (#287) 2022-03-06 17:33:49 +08:00
琥珀 a0950f1a5c
fix:timeline behavior (#279) 2021-11-13 18:34:05 +08:00
Mashiro 6e56d0ba42
Update README.md 2021-10-21 22:04:31 +08:00
Spirit b73c45f022
perf: update to v3.4.0 (#273)
* fix: bug fix
update Meting API, add ipv6 support, fix icon
close #255,#243

* style: add some variable definitions
support php8

* perf: update to v3.4.0

* docs: update screenshot
2021-08-01 13:04:09 +08:00
aierlma 8a46b8545f
修改gravatar镜像 (#272) 2021-07-22 14:49:30 +08:00
Mashiro 77722ed4d7
Merge pull request #240 from mashirozx/dev
update to v3.3.9
2020-08-09 17:01:40 +08:00
Spirit a831ae70e1
Merge pull request #239 from mashirozx/issue-237
Issue 237
2020-08-09 14:57:50 +08:00
Spirit 34fdb5d215 perf: update to v3.3.9
close #237
2020-08-09 14:49:16 +08:00
Spirit a063060ad9 perf: update jQuery
update jQuery to the lastest, fix some little bugs
issue #237
2020-08-08 00:02:36 +08:00
Spirit 69b68c00c0 feat: make feature image separate
only for the post without feature image in the home page
issue #237
2020-08-06 17:52:27 +08:00
Spirit 00e2a2f390 fix: fix pagination and alignment
issue #237, fix #224
2020-08-06 17:14:46 +08:00
Spirit fad1d9f30f feat: add comment location option
now you can choose whether to enable comment location in the comment
fields, besides, Comment become a new group in Sakura Options
issue #237
2020-08-06 16:55:02 +08:00
Spirit a0d8f8a6cf fix: fix mail notify
fix wrong position of comment text in mail notify
issue #237
2020-08-04 17:51:07 +08:00
Spirit f829ab4b60
Merge pull request #236 from mashirozx/issue-235
Issue 230 234 235
2020-08-03 23:08:08 +08:00
Spirit c9a041eee3 fix: fix comment link
disable auto linking of URLs in comments
fix #230
2020-08-03 14:01:19 +08:00
Spirit 9d5e0a598b
Merge pull request #232 from Jkkoi/patch-1
404 页面添加网页图标
2020-08-03 13:16:31 +08:00
Spirit e15bbeb896 fix: fix webp image covver
fix #234
2020-08-02 22:35:08 +08:00
Spirit 7a96dd7549 fix: fix code block data-rel
fix #235
2020-08-02 22:31:35 +08:00
Jkkoi 663768b37a
404 页面添加网页图标 2020-06-14 23:21:36 +08:00
Spirit 467818c5f6 perf: optimize
bug fix, update darkmode option
2020-04-19 00:43:35 +08:00
81 changed files with 4687 additions and 2863 deletions

View File

@ -12,6 +12,7 @@
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="<?php echo akina_option('favicon_link', ''); ?>"/>
<title itemprop="name"><?php global $page, $paged;wp_title( '-', true, 'right' );
bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( 'page %s'), max( $paged, $page ) );/*第 %s 页*/?>

View File

@ -1,12 +1,12 @@
Sakura🌸: A Wonderful WordPress Theme
===
[中文](README.md) | Engilsh
[中文](README.md) | English
![Sakura](https://view.moezx.cc/images/2018/05/26/sakura.png)
![Sakura](screenshot.jpg)
![PHP version](https://img.shields.io/badge/PHP-7.1+-4F5B93.svg?style=flat-square)
![WP version](https://img.shields.io/badge/WordPress-5.0+-0073aa.svg?style=flat-square)
![PHP version](https://img.shields.io/badge/PHP-7.1+-4F5B93.svg?style=flat-square&logo=php)
![WP version](https://img.shields.io/badge/WordPress-5.3-0073aa.svg?style=flat-square&logo=wordpress)
[![GitHub release](https://img.shields.io/github/release/mashirozx/Sakura.svg?style=flat-square)](https://github.com/mashirozx/Sakura/releases/latest)
[![Github commits (since latest release)](https://img.shields.io/github/commits-since/mashirozx/Sakura/latest/dev.svg?style=flat-square)](https://github.com/mashirozx/Sakura/commits/dev)
[![](https://data.jsdelivr.com/v1/package/gh/moezx/cdn/badge)](https://www.jsdelivr.com/package/gh/moezx/cdn)

View File

@ -1,12 +1,12 @@
Sakura🌸: 樱花庄的白猫博客主题
===
中文 | [Engilsh](README-en.md)
中文 | [English](README-en.md)
![Sakura](https://view.moezx.cc/images/2018/05/26/sakura.png)
![Sakura](screenshot.jpg)
![PHP version](https://shader.2heng.xin/badge/PHP-7.1+-4F5B93.svg?style=flat-square&logo=php)
![WP version](https://shader.2heng.xin/badge/WordPress-5.3-0073aa.svg?style=flat-square&logo=wordpress)
![PHP version](https://img.shields.io/badge/PHP-7.1+-4F5B93.svg?style=flat-square&logo=php)
![WP version](https://img.shields.io/badge/WordPress-5.3-0073aa.svg?style=flat-square&logo=wordpress)
[![GitHub release](https://img.shields.io/github/v/release/mashirozx/Sakura.svg?style=flat-square&logo=github)](https://github.com/mashirozx/Sakura/releases/latest)
[![Github commits (since latest release)](https://img.shields.io/github/commits-since/mashirozx/Sakura/latest/dev.svg?style=flat-square&logo=git&color=important)](https://github.com/mashirozx/Sakura/commits/dev)
[![](https://data.jsdelivr.com/v1/package/gh/moezx/cdn/badge)](https://www.jsdelivr.com/package/gh/moezx/cdn)
@ -21,7 +21,7 @@
主题使用说明见:<https://2heng.xin/theme-sakura/>
本仓库国内镜像:<https://gitee.com/mashirozx/Sakura>
本仓库国内镜像:<https://git.moezx.cc/mirrors/sakura>
主题交流群860262481

File diff suppressed because one or more lines are too long

4
cdn/js/src/01.jquery.min.js vendored 100644 → 100755

File diff suppressed because one or more lines are too long

View File

@ -48,7 +48,7 @@
<?php endif; ?>
<?php
$robot_comments = '';
if(comments_open()){
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>'.__('I\'m not a robot', 'sakura').'</label>';
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>'.__('Comment in private', 'sakura').'</label>' : '';

View File

@ -188,7 +188,7 @@ function sakura_scripts()
wp_enqueue_style('saukra_css', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/style.min.css', array(), SAKURA_VERSION);
wp_enqueue_script('app', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/js/sakura-app.min.js', array(), SAKURA_VERSION, true);
}
wp_enqueue_script('github_card', 'https://cdn.jsdelivr.net/github-cards/latest/widget.js', array(), SAKURA_VERSION, true);
//wp_enqueue_script('github_card', 'https://cdn.jsdelivr.net/github-cards/latest/widget.js', array(), SAKURA_VERSION, true);
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
@ -204,7 +204,7 @@ function sakura_scripts()
// }
//拦截移动端
version_compare($GLOBALS['wp_version'], '5.1', '>=') ? $reply_link_version = 'new' : $reply_link_version = 'old';
$gravatar_url = akina_option('gravatar_proxy') ?: 'secure.gravatar.com/avatar';
$gravatar_url = akina_option('gravatar_proxy') ?: 'dn-qiniu-avatar.qbox.me/avatar';
wp_localize_script('app', 'Poi', array(
'pjax' => akina_option('poi_pjax'),
'movies' => $movies,
@ -249,149 +249,160 @@ require get_template_directory() . '/inc/categories-images.php';
function convertip($ip)
{
error_reporting(E_ALL ^ E_NOTICE);
$dat_path = dirname(__FILE__) . '/inc/QQWry.Dat';
if (!$fd = @fopen($dat_path, 'rb')) {
return 'IP date file not exists or access denied';
}
$ip = explode('.', $ip);
$ipNum = intval($ip[0]) * 16777216 + intval($ip[1]) * 65536 + intval($ip[2]) * 256 + intval($ip[3]);
$DataBegin = fread($fd, 4);
$DataEnd = fread($fd, 4);
$ipbegin = implode('', unpack('L', $DataBegin));
if ($ipbegin < 0) {
$ipbegin += pow(2, 32);
}
$ipend = implode('', unpack('L', $DataEnd));
if ($ipend < 0) {
$ipend += pow(2, 32);
}
$ipAllNum = ($ipend - $ipbegin) / 7 + 1;
$BeginNum = 0;
$EndNum = $ipAllNum;
while ($ip1num > $ipNum || $ip2num < $ipNum) {
$Middle = intval(($EndNum + $BeginNum) / 2);
fseek($fd, $ipbegin + 7 * $Middle);
$ipData1 = fread($fd, 4);
if (strlen($ipData1) < 4) {
fclose($fd);
return 'System Error';
}
$ip1num = implode('', unpack('L', $ipData1));
if ($ip1num < 0) {
$ip1num += pow(2, 32);
}
if ($ip1num > $ipNum) {
$EndNum = $Middle;
continue;
}
$DataSeek = fread($fd, 3);
if (strlen($DataSeek) < 3) {
fclose($fd);
return 'System Error';
}
$DataSeek = implode('', unpack('L', $DataSeek . chr(0)));
fseek($fd, $DataSeek);
$ipData2 = fread($fd, 4);
if (strlen($ipData2) < 4) {
fclose($fd);
return 'System Error';
}
$ip2num = implode('', unpack('L', $ipData2));
if ($ip2num < 0) {
$ip2num += pow(2, 32);
}
if ($ip2num < $ipNum) {
if ($Middle == $BeginNum) {
fclose($fd);
return 'Unknown';
}
$BeginNum = $Middle;
}
}
$ipFlag = fread($fd, 1);
if ($ipFlag == chr(1)) {
$ipSeek = fread($fd, 3);
if (strlen($ipSeek) < 3) {
fclose($fd);
return 'System Error';
}
$ipSeek = implode('', unpack('L', $ipSeek . chr(0)));
fseek($fd, $ipSeek);
$ipFlag = fread($fd, 1);
}
if ($ipFlag == chr(2)) {
$AddrSeek = fread($fd, 3);
if (strlen($AddrSeek) < 3) {
fclose($fd);
return 'System Error';
}
$ipFlag = fread($fd, 1);
if ($ipFlag == chr(2)) {
$AddrSeek2 = fread($fd, 3);
if (strlen($AddrSeek2) < 3) {
fclose($fd);
return 'System Error';
}
$AddrSeek2 = implode('', unpack('L', $AddrSeek2 . chr(0)));
fseek($fd, $AddrSeek2);
if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === false) {
$file_contents = file_get_contents('http://ip.taobao.com/outGetIpInfo?accessKey=alibaba-inc&ip='.$ip);
$result = json_decode($file_contents,true);
if ($result['data']['country'] != '中国') {
return $result['data']['country'];
} else {
fseek($fd, -1, SEEK_CUR);
return $result['data']['region'].'&nbsp;·&nbsp;'.$result['data']['city'].'&nbsp;·&nbsp;'.$result['data']['isp'];
}
while (($char = fread($fd, 1)) != chr(0)) {
$ipAddr2 .= $char;
}
$AddrSeek = implode('', unpack('L', $AddrSeek . chr(0)));
fseek($fd, $AddrSeek);
while (($char = fread($fd, 1)) != chr(0)) {
$ipAddr1 .= $char;
}
} else {
fseek($fd, -1, SEEK_CUR);
while (($char = fread($fd, 1)) != chr(0)) {
$ipAddr1 .= $char;
$dat_path = dirname(__FILE__) . '/inc/QQWry.Dat';
if (!$fd = @fopen($dat_path, 'rb')) {
return 'IP date file not exists or access denied';
}
$ip = explode('.', $ip);
$ipNum = intval($ip[0]) * 16777216 + intval($ip[1]) * 65536 + intval($ip[2]) * 256 + intval($ip[3]);
$DataBegin = fread($fd, 4);
$DataEnd = fread($fd, 4);
$ipbegin = implode('', unpack('L', $DataBegin));
if ($ipbegin < 0) {
$ipbegin += pow(2, 32);
}
$ipFlag = fread($fd, 1);
if ($ipFlag == chr(2)) {
$AddrSeek2 = fread($fd, 3);
if (strlen($AddrSeek2) < 3) {
$ipend = implode('', unpack('L', $DataEnd));
if ($ipend < 0) {
$ipend += pow(2, 32);
}
$ipAllNum = ($ipend - $ipbegin) / 7 + 1;
$BeginNum = 0;
$EndNum = $ipAllNum;
$ip1num = $ip2num = $ipAddr1 = $ipAddr2 = '';
while ($ip1num > $ipNum || $ip2num < $ipNum) {
$Middle = intval(($EndNum + $BeginNum) / 2);
fseek($fd, $ipbegin + 7 * $Middle);
$ipData1 = fread($fd, 4);
if (strlen($ipData1) < 4) {
fclose($fd);
return 'System Error';
}
$AddrSeek2 = implode('', unpack('L', $AddrSeek2 . chr(0)));
fseek($fd, $AddrSeek2);
$ip1num = implode('', unpack('L', $ipData1));
if ($ip1num < 0) {
$ip1num += pow(2, 32);
}
if ($ip1num > $ipNum) {
$EndNum = $Middle;
continue;
}
$DataSeek = fread($fd, 3);
if (strlen($DataSeek) < 3) {
fclose($fd);
return 'System Error';
}
$DataSeek = implode('', unpack('L', $DataSeek . chr(0)));
fseek($fd, $DataSeek);
$ipData2 = fread($fd, 4);
if (strlen($ipData2) < 4) {
fclose($fd);
return 'System Error';
}
$ip2num = implode('', unpack('L', $ipData2));
if ($ip2num < 0) {
$ip2num += pow(2, 32);
}
if ($ip2num < $ipNum) {
if ($Middle == $BeginNum) {
fclose($fd);
return 'Unknown';
}
$BeginNum = $Middle;
}
}
$ipFlag = fread($fd, 1);
if ($ipFlag == chr(1)) {
$ipSeek = fread($fd, 3);
if (strlen($ipSeek) < 3) {
fclose($fd);
return 'System Error';
}
$ipSeek = implode('', unpack('L', $ipSeek . chr(0)));
fseek($fd, $ipSeek);
$ipFlag = fread($fd, 1);
}
if ($ipFlag == chr(2)) {
$AddrSeek = fread($fd, 3);
if (strlen($AddrSeek) < 3) {
fclose($fd);
return 'System Error';
}
$ipFlag = fread($fd, 1);
if ($ipFlag == chr(2)) {
$AddrSeek2 = fread($fd, 3);
if (strlen($AddrSeek2) < 3) {
fclose($fd);
return 'System Error';
}
$AddrSeek2 = implode('', unpack('L', $AddrSeek2 . chr(0)));
fseek($fd, $AddrSeek2);
} else {
fseek($fd, -1, SEEK_CUR);
}
while (($char = fread($fd, 1)) != chr(0)) {
$ipAddr2 .= $char;
}
$AddrSeek = implode('', unpack('L', $AddrSeek . chr(0)));
fseek($fd, $AddrSeek);
while (($char = fread($fd, 1)) != chr(0)) {
$ipAddr1 .= $char;
}
} else {
fseek($fd, -1, SEEK_CUR);
while (($char = fread($fd, 1)) != chr(0)) {
$ipAddr1 .= $char;
}
$ipFlag = fread($fd, 1);
if ($ipFlag == chr(2)) {
$AddrSeek2 = fread($fd, 3);
if (strlen($AddrSeek2) < 3) {
fclose($fd);
return 'System Error';
}
$AddrSeek2 = implode('', unpack('L', $AddrSeek2 . chr(0)));
fseek($fd, $AddrSeek2);
} else {
fseek($fd, -1, SEEK_CUR);
}
while (($char = fread($fd, 1)) != chr(0)) {
$ipAddr2 .= $char;
}
}
while (($char = fread($fd, 1)) != chr(0)) {
$ipAddr2 .= $char;
fclose($fd);
if (preg_match('/http/i', $ipAddr2)) {
$ipAddr2 = '';
}
}
fclose($fd);
if (preg_match('/http/i', $ipAddr2)) {
$ipAddr2 = '';
}
$ipaddr = "$ipAddr1 $ipAddr2";
$ipaddr = preg_replace('/CZ88.Net/is', '', $ipaddr);
$ipaddr = preg_replace('/^s*/is', '', $ipaddr);
$ipaddr = preg_replace('/s*$/is', '', $ipaddr);
if (preg_match('/http/i', $ipaddr) || $ipaddr == '') {
$ipaddr = 'Unknown';
}
$ipaddr = iconv('gbk', 'utf-8//IGNORE', $ipaddr);
if ($ipaddr != ' ') {
$ipaddr = "$ipAddr1 $ipAddr2";
$ipaddr = preg_replace('/CZ88.Net/is', '', $ipaddr);
$ipaddr = preg_replace('/^s*/is', '', $ipaddr);
$ipaddr = preg_replace('/s*$/is', '', $ipaddr);
if (preg_match('/http/i', $ipaddr) || $ipaddr == '') {
$ipaddr = 'Unknown';
}
$ipaddr = iconv('gbk', 'utf-8//IGNORE', $ipaddr);
if ($ipaddr != ' ') {
return $ipaddr;
} else {
$ipaddr = 'Unknown';
}
return $ipaddr;
} else {
$ipaddr = 'Unknown';
}
return $ipaddr;
}
//Comment Location End
@ -424,10 +435,11 @@ if (!function_exists('akina_comment_format')) {
</div>
<?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));?>
<div class="right">
<div class="info"><time datetime="<?php comment_date('Y-m-d');?>"><?php echo poi_time_since(strtotime($comment->comment_date_gmt), true); //comment_date(get_option('date_format')); ?></time><?php echo siren_get_useragent($comment->comment_agent); ?><?php echo mobile_get_useragent_icon($comment->comment_agent); ?>&nbsp;<?php _e('Location', 'sakura'); /*来自*/?>: <?php echo convertip(get_comment_author_ip()); ?>
<div class="info"><time datetime="<?php comment_date('Y-m-d');?>"><?php echo poi_time_since(strtotime($comment->comment_date_gmt), true); //comment_date(get_option('date_format')); ?></time><?php echo siren_get_useragent($comment->comment_agent); ?><?php echo mobile_get_useragent_icon($comment->comment_agent); ?>&nbsp;<?php if(akina_option('open_location')){ _e('Location', 'sakura'); /*来自*/?>: <?php echo convertip(get_comment_author_ip());} ?>
<?php if (current_user_can('manage_options') and (wp_is_mobile() == false)) {
$comment_ID = $comment->comment_ID;
$i_private = get_comment_meta($comment_ID, '_private', true);
$flag = '';
$flag .= ' <i class="fa fa-snowflake-o" aria-hidden="true"></i> <a href="javascript:;" data-actionp="set_private" data-idp="' . get_comment_id() . '" id="sp" class="sm" style="color:rgba(0,0,0,.35)">' . __("Private", "sakura") . ': <span class="has_set_private">';
if (!empty($i_private)) {
$flag .= __("Yes", "sakura") . ' <i class="fa fa-lock" aria-hidden="true"></i>';
@ -611,7 +623,7 @@ function get_link_items()
*/
function gravatar_cn($url)
{
$gravatar_url = array('0.gravatar.com/avatar','1.gravatar.com/avatar','2.gravatar.com/avatar','secure.gravatar.com/avatar');
$gravatar_url = array('dn-qiniu-avatar.qbox.me/avatar','cdn.v2ex.com/gravatar','gravatar.loli.net/avatar','gravatar.zeruns.tech/avatar');
//return str_replace($gravatar_url, 'cn.gravatar.com', $url);
//官方服务器近期大陆访问 429建议使用镜像
return str_replace( $gravatar_url, akina_option('gravatar_proxy'), $url );
@ -801,7 +813,7 @@ function custom_login()
//echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('template_directory') . '/inc/login.css" />'."\n";
echo '<link rel="stylesheet" type="text/css" href="' . get_template_directory_uri() . '/inc/login.css?' . SAKURA_VERSION . '" />' . "\n";
//echo '<script type="text/javascript" src="'.get_bloginfo('template_directory').'/js/jquery.min.js"></script>'."\n";
echo '<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/jquery/jquery@1.8.2/jquery.min.js"></script>' . "\n";
echo '<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/jquery/jquery@1.9.0/jquery.min.js"></script>' . "\n";
}
add_action('login_head', 'custom_login');
@ -969,11 +981,11 @@ function comment_mail_notify($comment_id)
<h3>您有一条来自<a style="text-decoration: none;color: orange " target="_blank" href="' . home_url() . '/">' . get_option("blogname") . '</a>的回复</h3>
<br>
<p style="font-size: 14px;">您在文章《' . get_the_title($comment->comment_post_ID) . '》上发表的评论:</p>
<p style="border-bottom:#ddd 1px solid;border-left:#ddd 1px solid;padding-bottom:20px;background-color:#eee;margin:15px 0px;padding-left:20px;padding-right:20px;border-top:#ddd 1px solid;border-right:#ddd 1px solid;padding-top:20px">'
. trim(get_comment($parent_id)->comment_content) . '</p>
<div style="border-bottom:#ddd 1px solid;border-left:#ddd 1px solid;padding-bottom:20px;background-color:#eee;margin:15px 0px;padding-left:20px;padding-right:20px;border-top:#ddd 1px solid;border-right:#ddd 1px solid;padding-top:20px">'
. trim(get_comment($parent_id)->comment_content) . '</div>
<p style="font-size: 14px;">' . trim($comment->comment_author) . ' 给您的回复如下:</p>
<p style="border-bottom:#ddd 1px solid;border-left:#ddd 1px solid;padding-bottom:20px;background-color:#eee;margin:15px 0px;padding-left:20px;padding-right:20px;border-top:#ddd 1px solid;border-right:#ddd 1px solid;padding-top:20px">'
. trim($comment->comment_content) . '</p>
<div style="border-bottom:#ddd 1px solid;border-left:#ddd 1px solid;padding-bottom:20px;background-color:#eee;margin:15px 0px;padding-left:20px;padding-right:20px;border-top:#ddd 1px solid;border-right:#ddd 1px solid;padding-top:20px">'
. trim($comment->comment_content) . '</div>
<div style="text-align: center;">
<img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.4/img/other/hr.png" alt="hr" style="width:100%;
@ -1346,7 +1358,10 @@ function memory_archives_list()
if ($mon != $mon_tmp && $mon > 0) {
$output .= '</ul></li>';
}
if ($mon == $mon_tmp && $year != $year_tmp ) {
$mon=$mon_tmp + 12;
$output .= '</ul>';
}
if ($year != $year_tmp && $year > 0) {
$output .= '</ul>';
}
@ -1762,16 +1777,6 @@ 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)
{
@ -1817,6 +1822,7 @@ function markdown_parser($incoming_comment)
return $incoming_comment;
}
add_filter('preprocess_comment', 'markdown_parser');
remove_filter( 'comment_text', 'make_clickable', 9 );
//保存Markdown评论
function save_markdown_comment($comment_ID, $comment_approved)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -17,7 +17,7 @@ class Parsedown
{
# ~
const version = '1.7.3';
const version = '1.7.4';
# ~
@ -1489,22 +1489,41 @@ class Parsedown
}
}
$permitRawHtml = false;
if (isset($Element['text']))
{
$text = $Element['text'];
}
// very strongly consider an alternative if you're writing an
// extension
elseif (isset($Element['rawHtml']))
{
$text = $Element['rawHtml'];
$allowRawHtmlInSafeMode = isset($Element['allowRawHtmlInSafeMode']) && $Element['allowRawHtmlInSafeMode'];
$permitRawHtml = !$this->safeMode || $allowRawHtmlInSafeMode;
}
if (isset($text))
{
$markup .= '>';
if (!isset($Element['nonNestables']))
if (!isset($Element['nonNestables']))
{
$Element['nonNestables'] = array();
}
if (isset($Element['handler']))
{
$markup .= $this->{$Element['handler']}($Element['text'], $Element['nonNestables']);
$markup .= $this->{$Element['handler']}($text, $Element['nonNestables']);
}
elseif (!$permitRawHtml)
{
$markup .= self::escape($text, true);
}
else
{
$markup .= self::escape($Element['text'], true);
$markup .= $text;
}
$markup .= '</'.$Element['name'].'>';

View File

@ -120,7 +120,12 @@ function cover_gallery() {
* @rest api接口路径https://sakura.2heng.xin/wp-json/sakura/v1/image/feature
*/
function feature_gallery() {
return cover_gallery();
$imgurl = Images::feature_gallery();
$data = array('feature image');
$response = new WP_REST_Response($data);
$response->set_status(302);
$response->header('Location', $imgurl);
return $response;
}
/*

View File

@ -154,7 +154,7 @@ class Images
$img_array = json_decode($sakura_image_array, true);
$img = array_rand($img_array);
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
if (strpos($_SERVER['HTTP_ACCEPT'], 'image/webp')) {
if (strpos($_SERVER['HTTP_ACCEPT'], 'image/webp') !== false) {
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][0];
} else {
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];
@ -162,4 +162,13 @@ class Images
}
return $imgurl;
}
public static function feature_gallery() {
if (akina_option('post_cover_options') == "type_2") {
$imgurl = akina_option('post_cover');
} else {
$imgurl = self::cover_gallery();
}
return $imgurl;
}
}

View File

@ -496,7 +496,7 @@ class Meting
case 'netease':
$api = array(
'method' => 'POST',
'url' => 'http://music.163.com/api/v3/playlist/detail',
'url' => 'http://music.163.com/api/v6/playlist/detail',
'body' => array(
's' => '0',
'id' => $id,
@ -1362,4 +1362,4 @@ class Meting
return $result;
}
}
}

View File

@ -8,7 +8,7 @@ body {
.nav-tab-wrapper {
position: relative;
max-width: 860px;
max-width: 900px;
margin: auto !important;
}
@ -37,7 +37,7 @@ body {
.nav-tab {
background: none;
border:none;
padding: 10px 20px;
padding: 10px 15px;
font-weight: 300;
font-size: 15px;
color: darkgoldenrod;
@ -74,17 +74,23 @@ a#options-group-4-tab:before {
a#options-group-5-tab:before {
font-family: "dashicons";
content: "\f110";
content: "\f101";
float: left;
}
a#options-group-6-tab:before {
font-family: "dashicons";
content: "\f110";
float: left;
}
a#options-group-7-tab:before {
font-family: "dashicons";
content: "\f325";
float: left;
}
a#options-group-7-tab:before {
a#options-group-8-tab:before {
font-family: "dashicons";
content: "\f487";
float: left;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -188,9 +188,7 @@ color: #676767 !important}
}
input[type=checkbox]:checked:before {
content: "\f147";
margin: -2px 0 0 -2px;
color: #FF5656;
}
/* loading */

View File

@ -37,6 +37,8 @@ mashiro_option.skin_bg6 = "https://api.mashiro.top/bing/";
mashiro_option.skin_bg7 = "https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.2/other-sites/api-index/images/me.png";
<?php } ?>
mashiro_option.darkmode = <?php if ( akina_option('darkmode') ){ echo 'true'; } else { echo 'false'; } ?>;
<?php if( is_home() ){ ?>
mashiro_option.land_at_home = true;
<?php }else {?>

View File

@ -146,7 +146,7 @@ function code_highlight_style() {
}
var ele_name = $('pre:eq(' + i + ')')[0].children[0].className;
var lang = ele_name.substr(0, ele_name.indexOf(" ")).replace('language-', '');
if (lang.toLowerCase() == "hljs") var lang = "text";
if (lang.toLowerCase() == "hljs") var lang = $('pre:eq(' + i + ') code').attr("class").replace('hljs', '')?$('pre:eq(' + i + ') code').attr("class").replace('hljs', ''):"text";
$('pre:eq(' + i + ')').addClass('highlight-wrap');
for (var t in attributes) {
$('pre:eq(' + i + ')').attr(t, attributes[t]);
@ -334,12 +334,11 @@ function checkDarkModeCookie() {
var dark = getCookie("dark"),
today = new Date(),
hour = today.getHours();
if ((!dark && (hour > 21 || hour < 7) ) || (dark == '1' && (hour >= 22 || hour <= 6))) {
if (mashiro_option.darkmode && ((!dark && (hour > 21 || hour < 7) ) || (dark == '1' && (hour >= 22 || hour <= 6)))) {
setTimeout(function () {
$("#dark-bg").click();
}, 100);
$("#moblieDarkLight").html('<i class="fa fa-sun-o" aria-hidden="true"></i>');
console.log('夜间模式开启');
} else {
if (document.body.clientWidth > 860) {
setTimeout(function () {
@ -351,7 +350,6 @@ function checkDarkModeCookie() {
$("#moblieDarkLight").html('<i class="fa fa-moon-o" aria-hidden="true"></i>');
setCookie("dark", "0", 0.33);
}
console.log('夜间模式关闭');
}
}
if (!getCookie("darkcache") && (new Date().getHours() > 21 || new Date().getHours() < 7)) {
@ -399,45 +397,43 @@ $(document).ready(function () {
checkskinSecter();
}
if (tagid == "dark-bg") {
addComment.I("content").classList.add('notransition');
addComment.I("content").style.backgroundColor = "#fff";
addComment.I("content").offsetHeight;
addComment.I("content").classList.remove('notransition');
$("html").css("background", "#31363b");
$(".site-content").css("background-color", "#fff");
$("body").addClass("dark");
setCookie("dark", "1", 0.33);
} else{
$("html").css("background", "unset");
$("body").removeClass("dark");
$(".site-content").css("background-color", "rgba(255, 255, 255, .8)");
setCookie("dark", "0", 0.33);
setCookie("bgImgSetting", tagid, 30);
setTimeout(function () {
addComment.I("content").style.backgroundColor = "rgba(255, 255, 255, 0.8)";
}, 1000);
}
switch (tagid) {
case "white-bg":
$("body").css("background-image", "url(" + checkskin_bg(mashiro_option.skin_bg0) + ")");
$(".site-content").css("background-color", "#fff");
break;
case "sakura-bg":
$("body").css("background-image", "url(" + checkskin_bg(mashiro_option.skin_bg1) + ")");
$(".site-content").css("background-color", "rgba(255, 255, 255, .8)");
break;
case "gribs-bg":
$("body").css("background-image", "url(" + checkskin_bg(mashiro_option.skin_bg2) + ")");
$(".site-content").css("background-color", "rgba(255, 255, 255, .8)");
break;
case "pixiv-bg":
$("body").css("background-image", "url(" + checkskin_bg(mashiro_option.skin_bg3) + ")");
$(".site-content").css("background-color", "rgba(255, 255, 255, .8)");
break;
case "KAdots-bg":
$("body").css("background-image", "url(" + checkskin_bg(mashiro_option.skin_bg4) + ")");
$(".site-content").css("background-color", "rgba(255, 255, 255, .8)");
break;
case "totem-bg":
$("body").css("background-image", "url(" + checkskin_bg(mashiro_option.skin_bg5) + ")");
$(".site-content").css("background-color", "rgba(255, 255, 255, .8)");
break;
case "bing-bg":
$("body").css("background-image", "url(" + checkskin_bg(mashiro_option.skin_bg6) + ")");
$(".site-content").css("background-color", "rgba(255, 255, 255, .8)");
break;
// case "dark-bg":
// $("body").css("background-image", "url(" + checkskin_bg(mashiro_option.skin_bg7) + ")");
@ -1055,12 +1051,14 @@ function load_bangumi() {
var xhr = new XMLHttpRequest();
xhr.open('POST', this.href + "&_wpnonce=" + Poi.nonce, 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 ');
if (xhr.readyState == 4 ) {
if(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();

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
languages/zh_TW.mo 100644

Binary file not shown.

2042
languages/zh_TW.po 100644

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -134,23 +134,10 @@ function optionsframework_options()
$options[] = array(
'name' => __('Theme scheme tool transparency', 'sakura'), /*切换主题菜单透明度*/
'desc' => __('Adjust the theme scheme menu transparency, the smaller the value, the more transparent. The default value is 0.8', 'sakura'), /*调整切换主题菜单透明度值越小越透明。默认透明度0.8*/
'desc' => __('Adjust the theme scheme menu transparency, fill in decimals between 0 and 1, the smaller the value, the more transparent. The default value is 0.8', 'sakura'), /*调整切换主题菜单透明度值越小越透明。默认透明度0.8*/
'id' => 'sakura_skin_alpha',
'std' => '0.8',
'type' => 'select',
'options' => array(
'0' => __('Transparent', 'sakura'), /*全透明*/
'0.1' => __('Transparency 0.1', 'sakura'), /*透明度0.1*/
'0.2' => __('Transparency 0.2', 'sakura'), /*透明度0.2*/
'0.3' => __('Transparency 0.3', 'sakura'), /*透明度0.3*/
'0.4' => __('Transparency 0.4', 'sakura'), /*透明度0.4*/
'0.5' => __('Transparency 0.5', 'sakura'), /*透明度0.5*/
'0.6' => __('Transparency 0.6', 'sakura'), /*透明度0.6*/
'0.7' => __('Transparency 0.7', 'sakura'), /*透明度0.7*/
'0.8' => __('Transparency 0.8', 'sakura'), /*透明度0.8*/
'0.9' => __('Transparency 0.9', 'sakura'), /*透明度0.9*/
'1' => __('Opaque', 'sakura'), /*不透明*/
));
'type' => 'text');
$options[] = array(
'name' => __('Change web background', 'sakura'), /*切换网页背景*/
@ -159,6 +146,13 @@ function optionsframework_options()
'std' => 'none,https://cdn.jsdelivr.net/gh/spirit1431007/cdn@1.6/img/sakura.png,https://cdn.jsdelivr.net/gh/spirit1431007/cdn@1.6/img/plaid2dbf8.jpg,https://cdn.jsdelivr.net/gh/spirit1431007/cdn@1.6/img/star02.png,https://cdn.jsdelivr.net/gh/spirit1431007/cdn@1.6/img/kyotoanimation.png,https://cdn.jsdelivr.net/gh/spirit1431007/cdn@1.6/img/dot_orange.gif,https://api.mashiro.top/bing/,https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.2/other-sites/api-index/images/me.png',
'type' => 'textarea');
$options[] = array(
'name' => __('Darkmode', 'sakura'),
'desc' => __('Automatically turn on dark mode from 10:00 p.m. to 06:00 a.m.', 'sakura'),
'id' => 'darkmode',
'std' => '1',
'type' => 'checkbox');
$options[] = array(
'name' => __('Personal avatar', 'sakura'), /*个人头像*/
'desc' => __('The best size is 130px*130px.', 'sakura'), /*最佳尺寸130px*130px。*/
@ -240,6 +234,25 @@ function optionsframework_options()
'imageflow' => __('Graphic', 'sakura'), /*图文*/
));
$options[] = array(
'name' => __('Cover manifest', 'sakura'), /*首页文章特色图选项*/
'desc' => __('Select how to call the post featue image, only for the post without feature image', 'sakura'), /*选择文章特色图的调用方式,只对没有设置特色图像的文章生效*/
'id' => 'post_cover_options',
'std' => "type_1",
'type' => "select",
'options' => array(
'type_1' => __('same as the cover of the first screen (default)', 'sakura'), /*跟随第一屏封面图*/
'type_2' => __('custom api (advanced)', 'sakura'), /*外部随机图API*/
)
);
$options[] = array(
'name' => __('Cover images url', 'sakura'), /*图片库url*/
'desc' => __('Fill in the custom image api url.', 'sakura'),
'id' => 'post_cover',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Home article feature images (only valid for standard mode)', 'sakura'), /*首页文章特色图(仅对标准风格生效)*/
'id' => 'list_type',
@ -740,6 +753,139 @@ function optionsframework_options()
'std' => '',
'type' => 'text');
//评论区
$options[] = array(
'name' => __('Comment field', 'sakura'), /*评论区*/
'type' => 'heading');
$options[] = array(
'name' => __('Gravatar avatar proxy', 'sakura'),
'desc' => __('A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it blank if you do not need.', 'sakura'),
'id' => 'gravatar_proxy',
'std' => "gravatar.2heng.xin/avatar",
'type' => "text");
$options[] = array(
'name' => __('Comment image upload API', 'sakura'), /*评论图片上传接口*/
'id' => 'img_upload_api',
'std' => "imgur",
'type' => "radio",
'options' => array(
'imgur' => __('Imgur (https://imgur.com)', 'sakura'),
'smms' => __('SM.MS (https://sm.ms)', 'sakura'),
'chevereto' => __('Chevereto (https://chevereto.com)', 'sakura'),
));
$options[] = array(
'name' => __('Imgur Client ID', 'sakura'),
'desc' => __('Register your application <a href="https://api.imgur.com/oauth2/addclient">here</a>, note we only need the Client ID here.', 'sakura'),
'id' => 'imgur_client_id',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('SM.MS Secret Token', 'sakura'),
'desc' => __('Register your application <a href="https://sm.ms/home/apitoken">here</a>.', 'sakura'),
'id' => 'smms_client_id',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Chevereto API v1 key', 'sakura'),
'desc' => __('Get your API key here: ' . akina_option('cheverto_url') . '/dashboard/settings/api', 'sakura'),
'id' => 'chevereto_api_key',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Chevereto URL', 'sakura'),
'desc' => __('Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto.com', 'sakura'),
'id' => 'cheverto_url',
'std' => 'https://your.cherverto.com',
'type' => 'text');
$options[] = array(
'name' => __('Comment images proxy', 'sakura'),
'desc' => __('A front-ed proxy for the uploaded images. Leave it blank if you do not need.', 'sakura'),
'id' => 'cmt_image_proxy',
'std' => 'https://images.weserv.nl/?url=',
'type' => 'text');
$options[] = array(
'name' => __('Imgur upload proxy', 'sakura'),
'desc' => __('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>. This feature is mainly for Chinese who cannot access to Imgur due to the GFW. The default and official setting is 【<a href="https://api.imgur.com/3/image/">https://api.imgur.com/3/image/</a>】', 'sakura'),
'id' => 'imgur_upload_image_proxy',
'std' => 'https://api.imgur.com/3/image/',
'type' => 'text');
$options[] = array(
'name' => __('Comments reply notification', 'sakura'), /*邮件回复通知*/
'desc' => __('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', 'sakura'), /*WordPress默认会使用邮件通知用户评论收到回复开启此项允许用户设置自己的评论收到回复时是否使用邮件通知*/
'id' => 'mail_notify',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Administrator comment notification', 'sakura'), /*邮件回复通知管理员*/
'desc' => __('Whether to use email notification when the administrator\'s comments receive a reply', 'sakura'), /*当管理员评论收到回复时是否使用邮件通知*/
'id' => 'admin_notify',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Enable private comment', 'sakura'), /*允许私密评论*/
'desc' => __('Allow users to set their own comments to be invisible to others', 'sakura'), /*允许用户设置自己的评论对其他人不可见*/
'id' => 'open_private_message',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Human verification', 'sakura'), /*机器人验证*/
'desc' => __('Enable human verification', 'sakura'), /*开启机器人验证*/
'id' => 'norobot',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('QQ avatar link encryption', 'sakura'), /*QQ头像链接加密*/
'desc' => __('Do not display the user\'s qq avatar links directly.', 'sakura'), /*不直接暴露用户qq头像链接*/
'id' => 'qq_avatar_link',
'std' => "off",
'type' => "select",
'options' => array(
'off' => __('Off (default)', 'sakura'), /*关闭(默认)*/
'type_1' => __('use redirect (general security)', 'sakura'), /*使用 重定向(安全性一般)'*/
'type_2' => __('fetch data at backend (high security)', 'sakura'), /*后端获取数据(安全性高)*/
'type_3' => __('fetch data at backend (high securityslow)', 'sakura'), /*后端获取数据(安全性高, 慢)*/
));
$options[] = array(
'name' => __('Comment UA infomation', 'sakura'), /*评论UA信息*/
'desc' => __('Check to enable, display the user\'s browser, operating system information', 'sakura'), /*勾选开启,显示用户的浏览器,操作系统信息*/
'id' => 'open_useragent',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Comment location infomation', 'sakura'), /*评论位置信息*/
'desc' => __('Check to enable, display the user\'s location info', 'sakura'), /*勾选开启,显示用户的位置信息*/
'id' => 'open_location',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Enable disqus', 'sakura'), /*开启多说插件支持*/
'desc' => __('Enable disqus for comment', 'sakura'), /*多说已经凉了*/
'id' => 'general_disqus_plugin_support',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Time Zone adjustment', 'sakura'), /*时区调整*/
'desc' => __('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)', 'sakura'), /*如果评论出现时差问题在这里调整,填入一个整数,计算方法:实际时间=显示错误的时间-你输入的整数(单位:小时)*/
'id' => 'time_zone_fix',
'std' => '0',
'type' => 'text');
//后台配置
$options[] = array(
'name' => __('Dashboard configuration', 'sakura'), /*后台配置*/
@ -1040,66 +1186,6 @@ function optionsframework_options()
'type_4' => __('23k Views (chinese)', 'sakura'), /*23k 次访问(中式)*/
));
$options[] = array(
'name' => __('Gravatar avatar proxy', 'sakura'),
'desc' => __('A front-ed proxy for Gravatar, eg. gravatar.2heng.xin/avatar . Leave it blank if you do not need.', 'sakura'),
'id' => 'gravatar_proxy',
'std' => "gravatar.2heng.xin/avatar",
'type' => "text");
$options[] = array(
'name' => __('Comment image upload API', 'sakura'), /*评论图片上传接口*/
'id' => 'img_upload_api',
'std' => "imgur",
'type' => "radio",
'options' => array(
'imgur' => __('Imgur (https://imgur.com)', 'sakura'),
'smms' => __('SM.MS (https://sm.ms)', 'sakura'),
'chevereto' => __('Chevereto (https://chevereto.com)', 'sakura'),
));
$options[] = array(
'name' => __('Imgur Client ID', 'sakura'),
'desc' => __('Register your application <a href="https://api.imgur.com/oauth2/addclient">here</a>, note we only need the Client ID here.', 'sakura'),
'id' => 'imgur_client_id',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('SM.MS Secret Token', 'sakura'),
'desc' => __('Register your application <a href="https://sm.ms/home/apitoken">here</a>.', 'sakura'),
'id' => 'smms_client_id',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Chevereto API v1 key', 'sakura'),
'desc' => __('Get your API key here: ' . akina_option('cheverto_url') . '/dashboard/settings/api', 'sakura'),
'id' => 'chevereto_api_key',
'std' => '',
'type' => 'text');
$options[] = array(
'name' => __('Chevereto URL', 'sakura'),
'desc' => __('Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto.com', 'sakura'),
'id' => 'cheverto_url',
'std' => 'https://your.cherverto.com',
'type' => 'text');
$options[] = array(
'name' => __('Comment images proxy', 'sakura'),
'desc' => __('A front-ed proxy for the uploaded images. Leave it blank if you do not need.', 'sakura'),
'id' => 'cmt_image_proxy',
'std' => 'https://images.weserv.nl/?url=',
'type' => 'text');
$options[] = array(
'name' => __('Imgur upload proxy', 'sakura'),
'desc' => __('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>. This feature is mainly for Chinese who cannot access to Imgur due to the GFW. The default and official setting is 【<a href="https://api.imgur.com/3/image/">https://api.imgur.com/3/image/</a>】', 'sakura'),
'id' => 'imgur_upload_image_proxy',
'std' => 'https://api.imgur.com/3/image/',
'type' => 'text');
$options[] = array(
'name' => __('Enable live search', 'sakura'), /*启用实时搜索*/
'desc' => __('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', 'sakura'), /*前台实现实时搜索,调用 Rest API 每小时更新一次缓存,可在 functions.php 里手动设置缓存时间*/
@ -1149,67 +1235,5 @@ function optionsframework_options()
'std' => 'bibi',
'type' => 'text');
$options[] = array(
'name' => __('Comments reply notification', 'sakura'), /*邮件回复通知*/
'desc' => __('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', 'sakura'), /*WordPress默认会使用邮件通知用户评论收到回复开启此项允许用户设置自己的评论收到回复时是否使用邮件通知*/
'id' => 'mail_notify',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Administrator comment notification', 'sakura'), /*邮件回复通知管理员*/
'desc' => __('Whether to use email notification when the administrator\'s comments receive a reply', 'sakura'), /*当管理员评论收到回复时是否使用邮件通知*/
'id' => 'admin_notify',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Enable private comment', 'sakura'), /*允许私密评论*/
'desc' => __('Allow users to set their own comments to be invisible to others', 'sakura'), /*允许用户设置自己的评论对其他人不可见*/
'id' => 'open_private_message',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Human verification', 'sakura'), /*机器人验证*/
'desc' => __('Enable human verification', 'sakura'), /*开启机器人验证*/
'id' => 'norobot',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('QQ avatar link encryption', 'sakura'), /*QQ头像链接加密*/
'desc' => __('Do not display the user\'s qq avatar links directly.', 'sakura'), /*不直接暴露用户qq头像链接*/
'id' => 'qq_avatar_link',
'std' => "off",
'type' => "select",
'options' => array(
'off' => __('Off (default)', 'sakura'), /*关闭(默认)*/
'type_1' => __('use redirect (general security)', 'sakura'), /*使用 重定向(安全性一般)'*/
'type_2' => __('fetch data at backend (high security)', 'sakura'), /*后端获取数据(安全性高)*/
'type_3' => __('fetch data at backend (high securityslow)', 'sakura'), /*后端获取数据(安全性高, 慢)*/
));
$options[] = array(
'name' => __('Comment UA infomation', 'sakura'), /*评论UA信息*/
'desc' => __('Check to enable, display the user\'s browser, operating system information', 'sakura'), /*勾选开启,显示用户的浏览器,操作系统信息*/
'id' => 'open_useragent',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Enable disqus', 'sakura'), /*开启多说插件支持*/
'desc' => __('Enable disqus for comment', 'sakura'), /*多说已经凉了*/
'id' => 'general_disqus_plugin_support',
'std' => '0',
'type' => 'checkbox');
$options[] = array(
'name' => __('Time Zone adjustment', 'sakura'), /*时区调整*/
'desc' => __('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)', 'sakura'), /*如果评论出现时差问题在这里调整,填入一个整数,计算方法:实际时间=显示错误的时间-你输入的整数(单位:小时)*/
'id' => 'time_zone_fix',
'std' => '0',
'type' => 'text');
return $options;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -5,7 +5,7 @@ Theme URI: https://github.com/mashirozx/Sakura/
Author: Mashiro, Spirit, Louie, Fuzzz
Author URI: http://2heng.xin
Description: A wonderful branch of theme Akina
Version: 3.3.8
Version: 3.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sakura
@ -1278,12 +1278,20 @@ a:hover {
padding: 40px 0 0
}
.site-content.notransition {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}
.site-content {
max-width: 800px;
padding: 0 10px;
margin-left: auto;
margin-right: auto;
background-color: #fff
background-color: rgba(255, 255, 255, .8)
}
.post-list {
@ -1576,22 +1584,6 @@ i.iconfont.hotpost {
overflow: hidden
}
.post-list-thumb-left .post-content-wrap {
float: left;
padding-left: 30px;
padding-right: 0;
text-align: right;
margin: 20px 10px 10px 0
}
.post-list-thumb-left .post-thumb {
float: left
}
.post-list-thumb-left .post-thumb a {
border-radius: 10px 0 0 10px
}
@media (max-width:768px) {
.float-content p {
height: auto;
@ -1611,12 +1603,11 @@ i.iconfont.hotpost {
width: 100%;
left: 0
}
.post-content-wrap,
.post-list-thumb-left .post-content-wrap {
text-align: left;
margin: 0;
padding: 20px;
float: none;
.post-list-thumb .post-content-wrap {
text-align: left !important;
margin: 0 !important;
padding: 20px !important;
float: none !important;
box-shadow: none;
border-top: 0
}
@ -3648,7 +3639,7 @@ a.page-numbers {
font-size: 14px
}
.siren-checkbox-label input {
.siren-checkbox-label input,#wp-comment-cookies-consent {
padding: 0;
margin: 0;
float: none;

View File

@ -11,21 +11,8 @@
//}
//add_filter('the_excerpt', 'custom_short_excerpt');
$i=0; while ( have_posts() ) : the_post(); $i++;
switch (akina_option('feature_align')) {
case "left":
$class = 'post-list-thumb-left';
break;
case "right":
$class = '';
break;
case "alternate":
$class = ($i%2 == 0) ? 'post-list-thumb-left' : ''; // 如果为偶数
break;
default:
$class = ($i%2 == 0) ? 'post-list-thumb-left' : '';
}
if( $i == 1 ){
$class .= ' post-list-show';
$class = ' post-list-show';
}
if(has_post_thumbnail()){
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large');