Skip to content

Commit

Permalink
Merge pull request #213 from mirai-mamori/preview
Browse files Browse the repository at this point in the history
安可「アンコール」 Update Fix Pack 2
  • Loading branch information
mirai-mamori authored May 24, 2021
2 parents bef485f + 82919da commit ebc0fd0
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 100 deletions.
8 changes: 1 addition & 7 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@
<div class="iconflat no-select">
<div class="icon"></div>
</div>
<div class="site-branding">
<?php if (iro_opt('iro_logo')){ ?>
<div class="site-title">
<?php }else{ ?>
<h1 class="site-title"></h1>
<?php } ?>
</div>
<?php require_once get_stylesheet_directory().'/inc/site-branding.php'; print_site_branding();?>
</div><!-- m-nav-bar -->
</section><!-- #section -->
<!-- m-nav-center -->
Expand Down
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ function comment_mail_notify($comment_id)
$parent_id = $comment->comment_parent ?: '';
$spam_confirmed = $comment->comment_approved;
$mail_notify = iro_opt('mail_notify') ? get_comment_meta($parent_id, 'mail_notify', false) : false;
$admin_notify = iro_opt('admin_notify') ? '1' : (get_comment($parent_id)->comment_author_email != get_bloginfo('admin_email') ? '1' : '0');
$admin_notify = iro_opt('admin_notify') ? '1' : ((isset(get_comment($parent_id)->comment_author_email) && get_comment($parent_id)->comment_author_email) != get_bloginfo('admin_email') ? '1' : '0');
if (($parent_id != '') && ($spam_confirmed != 'spam') && ($admin_notify != '0') && (!$mail_notify)) {
$wp_email = $mail_user_name . '@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME']));
$to = trim(get_comment($parent_id)->comment_author_email);
Expand Down Expand Up @@ -1590,7 +1590,7 @@ function DEFAULT_FEATURE_IMAGE()
//评论回复
function sakura_comment_notify($comment_id)
{
if (!$_POST['mail-notify']) {
if (!isset($_POST['mail-notify'])) {
update_comment_meta($comment_id, 'mail_notify', 'false');
}

Expand Down
23 changes: 1 addition & 22 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* @package Akina
*/

$mashiro_logo = iro_opt('mashiro_logo');

?>
<?php header('X-Frame-Options: SAMEORIGIN'); ?>
<!DOCTYPE html>
Expand Down Expand Up @@ -99,26 +97,7 @@
<div id="page" class="site wrapper">
<header class="site-header no-select" role="banner">
<div class="site-top">
<div class="site-branding">
<?php if (iro_opt('iro_logo')){ ?>
<div class="site-title">
<a href="<?php bloginfo('url');?>" ><img src="<?php echo iro_opt('iro_logo'); ?>"></a>
</div>
<?php }else{ ?>
<span class="site-title">
<span class="logolink moe-mashiro">
<a href="<?php bloginfo('url');?>">
<ruby>
<!-- <span class="site-name"><?php echo iro_opt('site_name', ''); ?></span> -->
<span class="sakuraso" style="font-family: '<?php echo $mashiro_logo['font_name']; ?>', 'Merriweather Sans', Helvetica, Tahoma, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei', sans-serif;;"><?php echo $mashiro_logo['text_a']; ?></span>
<span class="no" style="font-family: '<?php echo $mashiro_logo['font_name']; ?>', 'Merriweather Sans', Helvetica, Tahoma, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei', sans-serif;"><?php echo $mashiro_logo['text_b']; ?></span>
<span class="shironeko" style="font-family: '<?php echo $mashiro_logo['font_name']; ?>', 'Merriweather Sans', Helvetica, Tahoma, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei', sans-serif;"><?php echo iro_opt('logo_text'); ?><?php echo $mashiro_logo['text_c']; ?></span>
<rp></rp><rt class="chinese-font"><?php echo $mashiro_logo['text_secondary']; ?></rt><rp></rp></ruby>
</a>
</span>
</span>
<?php } ?><!-- logo end -->
</div><!-- .site-branding -->
<?php require_once get_stylesheet_directory().'/inc/site-branding.php'; print_site_branding();?>
<?php header_user_menu(); if(iro_opt('nav_menu_search') == '1') { ?>
<div class="searchbox"><i class="iconfont js-toggle-search iconsearch icon-search"></i></div>
<?php } ?>
Expand Down
45 changes: 20 additions & 25 deletions inc/decorate.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function customizer_css() { ?>
}
.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')) {?>
body{
html{
filter: grayscale(100%) !important;
}
<?php } ?>
Expand Down Expand Up @@ -65,23 +65,11 @@ function customizer_css() { ?>
.the-feature.from_left_and_right .info p {
color: <?php echo iro_opt('theme_skin'); ?>;
}
.sorry li a {
color: <?php echo iro_opt('theme_skin'); ?>;
}
.sorry-inner {
border: 1px solid <?php echo iro_opt('theme_skin'); ?>;
}
.err-button.back a {
border: 1px solid <?php echo iro_opt('theme_skin'); ?>;
color: <?php echo iro_opt('theme_skin'); ?>;
}

.sorry {
color: <?php echo iro_opt('theme_skin'); ?>;
}
.site-top ul li a {
color: <?php echo iro_opt('theme_skin'); ?>
}
.header-info {
color: <?php echo iro_opt('theme_skin'); ?>;
background: <?php echo iro_opt('infor_bar_bgcolor'); ?>;
Expand Down Expand Up @@ -1578,17 +1566,8 @@ function customizer_css() { ?>
.openNav .icon {
left: 5%;
}
}

@media (max-width:860px) {
.site-header {
width: 100%;
height: 60px;
top: 0;
left: 0;
background: 0 0;
position: fixed;
border-radius: 0px;
display:none;
}
.yya {
position: fixed;
Expand Down Expand Up @@ -1630,7 +1609,7 @@ function customizer_css() { ?>

@media (max-width:860px) {
.site-header {
height: 60px;
display:none;
}
}
<?php } ?>
Expand Down Expand Up @@ -1717,7 +1696,23 @@ function customizer_css() { ?>
<?php
}
?>

<?php
if(iro_opt('cover_half_screen_curve',true)){
?>
.headertop-bar::after {
content: '';
width: 150%;
height: 4.375rem;
background: #fff;
left: -25%;
bottom: -2.875rem;
border-radius: 100%;
position: absolute;
z-index: 4;
}
<?php
}
?>

</style>
<?php }
Expand Down
31 changes: 31 additions & 0 deletions inc/site-branding.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
function print_site_branding(){
$mashiro_logo = iro_opt('mashiro_logo');

?>
<div class="site-branding">
<?php if (iro_opt('iro_logo') && !iro_opt('mashiro_logo_option',false)) { ?>
<div class="site-title">
<a href="<?php bloginfo('url'); ?>"><img src="<?php echo iro_opt('iro_logo'); ?>"></a>
</div>
<?php } else { ?>
<span class="site-title">
<span class="logolink moe-mashiro">
<a href="<?php bloginfo('url'); ?>">
<ruby>
<!-- <span class="site-name"><?php echo iro_opt('site_name', ''); ?></span> -->
<span class="sakuraso" style="font-family: '<?php echo $mashiro_logo['font_name']; ?>', 'Merriweather Sans', Helvetica, Tahoma, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei', sans-serif;;"><?php echo $mashiro_logo['text_a']; ?></span>
<span class="no" style="font-family: '<?php echo $mashiro_logo['font_name']; ?>', 'Merriweather Sans', Helvetica, Tahoma, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei', sans-serif;"><?php echo $mashiro_logo['text_b']; ?></span>
<span class="shironeko" style="font-family: '<?php echo $mashiro_logo['font_name']; ?>', 'Merriweather Sans', Helvetica, Tahoma, Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', 'WenQuanYi Micro Hei', sans-serif;"><?php echo iro_opt('logo_text'); ?><?php echo $mashiro_logo['text_c']; ?></span>
<rp></rp>
<rt class="chinese-font"><?php echo $mashiro_logo['text_secondary']; ?></rt>
<rp></rp>
</ruby>
</a>
</span>
</span>
<?php } ?>
<!-- logo end -->
</div>
<?php
}?>
7 changes: 6 additions & 1 deletion inc/swicher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ function font_end_js_control() { ?>
audio:<?php echo iro_opt('note_effects') ? 'true':'false';?>,
darkmode :<?php echo iro_opt('theme_darkmode_auto') ? 'true':'false';?>,
<?php if ( iro_opt('theme_darkmode_auto') ):echo 'dm_strategy:"'.iro_opt('theme_darkmode_strategy','time').'",'.PHP_EOL;endif; ?>
preload_blur:<?php echo iro_opt('preload_blur',0)?>,
<?php
$preload_blur = iro_opt('preload_blur',0);
if($preload_blur){
echo "preload_blur:$preload_blur,";
}
?>
email_domain:"<?php echo iro_opt('email_domain', ''); ?>",
email_name:"<?php echo iro_opt('email_name', ''); ?>",
cookie_version_control:"<?php echo iro_opt('cookie_version', ''); ?>",
Expand Down
4 changes: 2 additions & 2 deletions inc/theme_plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function classify_display($query){
* 评论添加@
*/
function comment_add_at( $comment_text, $comment = '') {
if( $comment->comment_parent > 0) {
if( isset($comment->comment_parent) && $comment->comment_parent > 0) {
if(substr($comment_text, 0, 3) === "<p>")
$comment_text = str_replace(substr($comment_text, 0, 3), '<p><a href="#comment-' . $comment->comment_parent . '" class="comment-at">@'.get_comment_author( $comment->comment_parent ) . '</a>&nbsp;', $comment_text);
else
Expand Down Expand Up @@ -724,7 +724,7 @@ function siren_private_message_hook($comment_content , $comment){
add_filter('get_comment_text','siren_private_message_hook',10,2);

function siren_mark_private_message($comment_id){
if ( $_POST['is-private'] ) {
if ( isset($_POST['is-private']) ) {
update_comment_meta($comment_id,'_private','true');
}
}
Expand Down
2 changes: 1 addition & 1 deletion js/app.js

Large diffs are not rendered by default.

Binary file modified js/app.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion js/app.js.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions opt/options/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,15 @@
'default' => true
),

array(
'id' => 'cover_half_screen_curve',
'type' => 'switcher',
'dependency'=>array( 'cover_full_screen', '==', 'false' ),
'title' => '封面下方弧形遮挡',
'label' => '开启之后封面下方将出现弧形遮挡',
'default' => false
),

array(
'id' => 'cover_radius',
'type' => 'slider',
Expand Down
67 changes: 28 additions & 39 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.1.0.1
Version: 2.1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sakurairo
Expand Down Expand Up @@ -1157,7 +1157,7 @@ a:hover {
.site-top ul li a {
padding: 10px 0;
display: inline-block;
color: #505050
color: var(--theme-skin)
}

.site-top ul li a:hover {
Expand Down Expand Up @@ -3730,18 +3730,6 @@ li.feature-2 {
}
}

.headertop-bar::after {
content: '';
width: 150%;
height: 4.375rem;
background: #fff;
left: -25%;
bottom: -2.875rem;
border-radius: 100%;
position: absolute;
z-index: 4
}

#centerbg {
width: 100%;
height: 550px;
Expand Down Expand Up @@ -3785,7 +3773,7 @@ li.feature-2 {
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
text-align: center;
z-index: 99;
z-index: 5;
-webkit-transition: .4s ease all;
-moz-transition: .4s ease all;
-o-transition: .4s ease all;
Expand Down Expand Up @@ -4335,13 +4323,18 @@ body.dark .ins-section .fa {
}

.sorry li a {
color: #505050
color: var(--theme-skin)
}
body.dark .sorry li a{
color:#CCC;
}

.sorry {
color: #505050;
color: var(--theme-skin);
margin-bottom: 80px
}
body.dark .sorry{
color:#CCC;
}

.sorry li {
padding: 10px 0
Expand All @@ -4353,7 +4346,7 @@ body.dark .ins-section .fa {

.sorry-inner {
padding: 20px;
border: 1px solid #505050
border: 1px solid var(--theme-skin)
}

.error-img {
Expand Down Expand Up @@ -5200,9 +5193,10 @@ i.iconfont.down {
height: 50px;
position: fixed;
top: 0;
z-index: 99999;
z-index: 9999;
display: block;
background: 0 0
background: 0 0;
padding-right:20px;
}
.iconflat {
background: 0 0;
Expand Down Expand Up @@ -5297,10 +5291,12 @@ i.iconfont.down {
border-radius: 3px;
outline: 0
}
#mo-nav ul {
width: 200px;
height: auto;
margin: 10px 9px
#mo-nav .menu{
display: flex;
flex-direction: column;
align-items: center;
padding: 0;
margin: 0;
}
#mo-nav ul:hover li {
color: rgba(255, 255, 255, .5)
Expand All @@ -5311,7 +5307,7 @@ i.iconfont.down {
padding: 6px 0px;
color: #fff;
letter-spacing: .02em;
text-align: left
text-align: center;
}
#mo-nav ul li a {
color: #505050;
Expand All @@ -5320,9 +5316,10 @@ i.iconfont.down {
#mo-nav li ul {
width: 250px;
margin: 10px 0;
padding: 0;
}
#mo-nav li ul li {
padding: 5px 0px
padding: 0;
}
#mo-nav li ul li a {
font-size: 14px;
Expand Down Expand Up @@ -7615,11 +7612,14 @@ a.toc-link {
}

@media (max-width:625px) {
.cmt-info-container {
position: relative;
}
.comment-user-avatar {
padding-top: 10px;
width: 45px;
height: 55px;
right: 11%
right: 2%;
}
.comment-user-avatar .socila-check {
width: 1.5em;
Expand Down Expand Up @@ -8472,17 +8472,6 @@ h6[id*=toc-head]::before {
}

/* 首页下拉箭头 */
.headertop-bar::after {
content: '';
width: 150%;
height: 4.375rem;
background: #fff;
left: -25%;
bottom: -2.875rem;
border-radius: 100%;
position: absolute;
z-index: 4;
}
.headertop-down {
position: absolute;
bottom: 50px;
Expand Down

0 comments on commit ebc0fd0

Please sign in to comment.