Skip to content

Commit

Permalink
Merge pull request #220 from mirai-mamori/preview
Browse files Browse the repository at this point in the history
红辣椒「パプリカ」 Update
  • Loading branch information
mirai-mamori authored Jun 1, 2021
2 parents ebc0fd0 + 925d226 commit 4ea2f13
Show file tree
Hide file tree
Showing 71 changed files with 166 additions and 88 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

[![image](https://cdn.maho.cc/vision/readme/website.png)](https://iro.tw/)

- 演示站点https://demo.iro.tw/
- 使用本主题的博客https://iro.tw/demo.html

- 主题交流群:[784229925](https://jq.qq.com/?_wv=1027&k=U5UJjRik)

Expand Down
8 changes: 3 additions & 5 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</div>
<div class="footer-device">
<p style="font-family: 'Ubuntu', sans-serif;">
<p id="footer_yiyan"></p>
<span style="color: #b9b9b9;">
<?php /* 能保留下面两个链接吗?算是我一个小小的心愿吧~ */ ?>
<?php if (iro_opt('footer_load_occupancy', 'true')): ?>
Expand All @@ -45,7 +46,6 @@
<div class="iconflat no-select">
<div class="icon"></div>
</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 Expand Up @@ -128,10 +128,8 @@
<?php if(iro_opt('style_menu_display') == 'full'): ?></p>
Font
<div class="font-family-controls row-container">
<button type="button" class="control-btn-serif selected" data-mode="serif"
onclick="mashiro_global.font_control.change_font()"><i class="fa fa-font" aria-hidden="true"></i></button>
<button type="button" class="control-btn-sans-serif" data-mode="sans-serif"
onclick="mashiro_global.font_control.change_font()"><i class="fa fa-bold" aria-hidden="true"></i></button>
<button type="button" class="control-btn-serif selected" data-name="serif" ><i class="fa fa-font" aria-hidden="true"></i></button>
<button type="button" class="control-btn-sans-serif" data-name="sans-serif"><i class="fa fa-bold" aria-hidden="true"></i></button>
</div>
<?php endif; ?>
</div>
Expand Down
25 changes: 23 additions & 2 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* @package Akina
*/

$mashiro_logo = iro_opt('mashiro_logo');

?>
<?php header('X-Frame-Options: SAMEORIGIN'); ?>
<!DOCTYPE html>
Expand Down Expand Up @@ -87,7 +89,7 @@
<div class="scrollbar" id="bar"></div>
<section id="main-container">
<?php
if(iro_opt('cover_switch') && is_home()){
if(iro_opt('cover_switch')){
$filter = iro_opt('random_graphs_filter');
?>
<div class="headertop <?php echo $filter; ?>">
Expand All @@ -97,7 +99,26 @@
<div id="page" class="site wrapper">
<header class="site-header no-select" role="banner">
<div class="site-top">
<?php require_once get_stylesheet_directory().'/inc/site-branding.php'; print_site_branding();?>
<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><!-- .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
27 changes: 16 additions & 11 deletions inc/decorate.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function customizer_css() { ?>
}
<?php } ?>
.feature i , /*.feature-title span ,*/ .download , .links ul li:before , .ar-time i , span.ar-circle , .object , .comment .comment-reply-link , .siren-checkbox-radio:checked + .siren-checkbox-radioInput:after { background: <?php echo iro_opt('theme_skin'); ?> }
::-webkit-scrollbar-thumb { background: <?php echo iro_opt('theme_skin'); ?>; border-radius: 25px; }
.download , .link-title { border-color: <?php echo iro_opt('theme_skin'); ?> }
.comment h4 a , #comments-navi a.prev , #comments-navi a.next , #archives-temp h3 , span.page-numbers.current , blockquote:before, blockquote:after { color: <?php echo iro_opt('theme_skin'); ?> }

Expand Down Expand Up @@ -235,10 +234,6 @@ function customizer_css() { ?>
#mo-nav ul li a:hover {
color: <?php echo iro_opt('theme_skin_matching'); ?>;
}
::-webkit-scrollbar-thumb {
background-color: <?php echo iro_opt('theme_skin'); ?>;
border-radius: 25px;
}
}
.herder-user-name {
color: <?php echo iro_opt('theme_skin'); ?>;
Expand Down Expand Up @@ -527,7 +522,7 @@ function customizer_css() { ?>

<?php if (iro_opt('preload_animation', 'true')): ?>
#preload {
position: absolute;
position: fixed;
width: 100%;
height: 100%;
top: 0;
Expand Down Expand Up @@ -696,7 +691,7 @@ function customizer_css() { ?>
body.dark .lower li ul,
body.dark .header-user-menu,
body.dark .headertop-bar::after
{background:#333333 !important;}
{background:rgba(51,51,51,<?php echo iro_opt('theme_darkmode_background_transparency',1)?>) !important;}

body.dark .pattern-center-blank,
body.dark .blank,
Expand Down Expand Up @@ -1564,10 +1559,16 @@ function customizer_css() { ?>
}
@media (max-width:860px) {
.openNav .icon {
left: 5%;
left: 5vw;
}
.site-header {
display:none;
width: 100%;
height: 60px;
top: 0;
left: 0;
background: 0 0;
position: fixed;
border-radius: 0px;
}
.yya {
position: fixed;
Expand Down Expand Up @@ -1609,7 +1610,7 @@ function customizer_css() { ?>

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

body{
background-size:<?php
echo iro_opt(('reception_background_size'),'auto')
?>;
}
</style>
<?php }
add_action('wp_head', 'customizer_css');
31 changes: 0 additions & 31 deletions inc/site-branding.php

This file was deleted.

21 changes: 16 additions & 5 deletions inc/swicher.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<?php
/**
* 仅对boolean类型的设置项有效
*/
function echo_if_true($key){
$value = iro_opt($key);
if($value)echo "$key:true,";
}
function font_end_js_control() { ?>
<script>
<script id="_mashiro_">
/*Initial Variables*/
const mashiro_option = {
var mashiro_option = {
NProgressON:<?php echo iro_opt('nprogress_on') ? 'true':'false';?>,
audio:<?php echo iro_opt('note_effects') ? 'true':'false';?>,
yiyan:<?php echo iro_opt('footer_yiyan') ? '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; ?>
<?php
Expand Down Expand Up @@ -98,11 +106,14 @@ function font_end_js_control() { ?>
},
},
<?php }?>
comment_upload_img:<?php echo iro_opt('img_upload_api')=='off'?'false':'true' ?>
comment_upload_img:<?php echo iro_opt('img_upload_api')=='off'?'false':'true' ?>,
<?php
echo_if_true('cache_cover');
echo_if_true('site_bg_as_cover');
?>
};
const mashiro_global = {};

/*End of Initial Variables*/
</script>
<script>const mashiro_global = {};</script>
<?php }
add_action('wp_head', 'font_end_js_control');
4 changes: 3 additions & 1 deletion inc/theme_plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ function get_prev_thumbnail_url() {
// 下一篇
function get_next_thumbnail_url() {
$next_post = get_next_post();
if ( has_post_thumbnail($next_post->ID) ) {
if( $next_post instanceof WP_Post){
if ( has_post_thumbnail($next_post->ID) ) {
$img_src = wp_get_attachment_image_src( get_post_thumbnail_id( $next_post->ID ), 'large');
return $img_src[0];
}
Expand All @@ -549,6 +550,7 @@ function get_next_thumbnail_url() {
return get_random_bg_url();
}
}
}
}

/**
Expand Down
Binary file added js/130.js.br
Binary file not shown.
Binary file added js/135.js.br
Binary file not shown.
Binary file added js/140.js.br
Binary file not shown.
Loading

0 comments on commit 4ea2f13

Please sign in to comment.