Skip to content

Commit

Permalink
Merge pull request #386 from mirai-mamori/preview
Browse files Browse the repository at this point in the history
燕「ツバメ」 Update SP1
  • Loading branch information
mirai-mamori authored Nov 28, 2021
2 parents 4587d9d + 8b5825d commit e78e7d9
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 21 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2098,5 +2098,5 @@ function should_show_title():bool{
$use_as_thumb = get_post_meta($id, 'use_as_thumb', true); //'true','only',(default)
return !iro_opt('patternimg')
|| !get_post_thumbnail_id($id)
&& $use_as_thumb == 'only' && !get_post_meta($id, 'video_cover', true);
&& $use_as_thumb != 'true' && !get_post_meta($id, 'video_cover', true);
}
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<head>
<link rel="stylesheet" href="https://<?php echo iro_opt('gfonts_api','fonts.loli.net'); ?>/css?family=Noto+Serif|Merriweather|Merriweather+Sans|Source+Code+Pro|Ubuntu:400,700|Noto+Serif+SC<?php echo iro_opt('gfonts_add_name'); ?>" media="all">
<meta name="theme-color" content="<?php echo iro_opt('theme_skin_matching')?>" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="<?php echo iro_opt('theme_skin_dark')?>" media="(prefers-color-scheme: dark)">

<meta charset="<?php bloginfo('charset'); ?>">
Expand Down
2 changes: 1 addition & 1 deletion inc/categories-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function z_quick_edit_custom_box($column_name, $screen, $name) {
*/
function z_taxonomy_columns( $columns ) {
$new_columns = array();
$new_columns['cb'] = $columns['cb'];
if(isset($columns['cb']))$new_columns['cb'] = $columns['cb'];
$new_columns['thumb'] = __('image', 'sakurairo')/*图像*/;

unset( $columns['cb'] );
Expand Down
8 changes: 7 additions & 1 deletion inc/classes/Bilibili.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ function fetch_api(int $type, int $page = 1)
)
);
$response = wp_remote_get($url, $args);
return json_decode($response["body"], true);
if(is_array($response)){
return json_decode($response["body"], true);
}else{
return array('code'=>-1);
}
}

public function get_bgm_items($page = 1)
{
$resp = $this->fetch_api(1, $page);
$code = $resp["code"];
switch ($code) {
case -1://指示在网络请求阶段发生了错误
return '<div>后端发生了错误 QwQ</div>';
case 0: {
$bgm = $resp['data'];
$totalpage = $bgm["total"] / 15;
Expand Down
6 changes: 5 additions & 1 deletion inc/decorate.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function customizer_css() { ?>
if (iro_opt('theme_skin')) { ?>
:root{
--theme-skin: <?php echo iro_opt('theme_skin'); ?>;
--theme-skin-matching:<?php echo iro_opt('theme_skin_matching'); ?>
}
.author-profile i , .post-like a , .post-share .show-share , .sub-text , .we-info a , span.sitename { color: <?php echo iro_opt('theme_skin'); ?> }
<?php if (iro_opt('theme_commemorate_mode')) {?>
Expand Down Expand Up @@ -508,7 +509,10 @@ function customizer_css() { ?>
//$image_api = 'background-image: url("'.rest_url('sakura/v1/image/cover').'");';
$bg_style = !iro_opt('cover_full_screen') ? 'background-position: center center;background-attachment: inherit;' : '';
?>
.centerbg{<?php echo $bg_style ?>background-position: center center;background-attachment: inherit;}
#centerbg{<?php
echo $bg_style;
echo iro_opt('site_bg_as_cover',false)? 'background:#0000;':'';
?>}
.rotating {
-webkit-animation: rotating 6s linear infinite;
-moz-animation: rotating 6s linear infinite;
Expand Down
2 changes: 1 addition & 1 deletion js/anf.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
//! build be47151 2021/11/21
//! build 627cc5b 2021/11/24
2 changes: 1 addition & 1 deletion js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
*
*/

//! build be47151 2021/11/21
//! build 627cc5b 2021/11/24
2 changes: 1 addition & 1 deletion js/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/page.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/page.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* @license MIT
*/

//! build be47151 2021/11/21
//! build 627cc5b 2021/11/24
2 changes: 1 addition & 1 deletion js/page.js.map

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Theme URI: https://github.com/mirai-mamori/Sakurairo
Author: Created by Fuukei
Author URI: https://iro.tw/
Description: A colorful, Easy-to-use, Perfect Experience, and Powerful Customizable WordPress Theme (Based on Theme Sakura)
Version: 2.3.0
Version: 2.3.1
Tested up to: 5.8.2
Requires at least: 5.5
Requires PHP: 7.1
Expand Down Expand Up @@ -1618,7 +1618,7 @@ i.iconfont.hotpost {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
height: 85px;
height:6em;
overflow: hidden
}

Expand Down Expand Up @@ -7253,7 +7253,6 @@ li>ol {
background-color: rgba(255, 255, 255, 0);
transform: translateX(0);
right: calc((100% - 1040px - 250px)/ 2);
position: absolute !important;
top: 480px;
position: absolute;
padding-top: 10px;
Expand Down Expand Up @@ -8388,12 +8387,11 @@ td.hljs-ln-numbers {
background: #ddd;
color: black;
}
h1[id*=toc-head]::before,
h2[id*=toc-head]::before,
h3[id*=toc-head]::before,
h4[id*=toc-head]::before,
h5[id*=toc-head]::before,
h6[id*=toc-head]::before {
h1::before,
h2::before,
h3::before,
h4::before,
h5::before {
display: block;
content: " ";
height: 80px;
Expand Down

0 comments on commit e78e7d9

Please sign in to comment.