Skip to content

Commit

Permalink
Merge pull request #968 from mirai-mamori/preview
Browse files Browse the repository at this point in the history
轻涟 ( La vaguelette ) Update (2)
  • Loading branch information
mirai-mamori authored Nov 3, 2024
2 parents 7e63831 + 4414c8b commit 93046f0
Show file tree
Hide file tree
Showing 18 changed files with 3,070 additions and 2,827 deletions.
4 changes: 2 additions & 2 deletions author.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
transition: all 0.6s ease-in-out;
border-radius: 16px;
border: 1px solid #FFFFFF;
backdrop-filter: blur(10px);
webkit-backdrop-filter: blur(10px);
backdrop-filter: saturate(180%) blur(10px);
webkit-backdrop-filter: saturate(180%) blur(10px);
}
</style>
<div id="primary" class="content-area">
Expand Down
26 changes: 14 additions & 12 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,19 @@
</section><!-- #section -->
<!-- m-nav-center -->
<div id="mo-nav">
<div class="m-avatar">
<?php
global $current_user;
wp_get_current_user();
if (is_user_logged_in()) { ?>
<img alt="m-avatar" src="<?php echo get_avatar_url($current_user->ID, [64]); ?>">
<?php } else { ?>
<img alt="m-avatar" src="<?php echo iro_opt('unlisted_avatar');?>">
<?php } ?>
</div>
<?php if (wp_is_mobile()) m_user_menu(); ?>
<?php if (iro_opt('mobile_menu_user_avatar', 'true')): ?>
<div class="m-avatar">
<?php
global $current_user;
wp_get_current_user();
if (is_user_logged_in()) { ?>
<img alt="m-avatar" src="<?php echo get_avatar_url($current_user->ID, [64]); ?>">
<?php } else { ?>
<img alt="m-avatar" src="<?php echo iro_opt('unlisted_avatar');?>">
<?php } ?>
</div>
<?php endif; ?>
<?php if (wp_is_mobile() && iro_opt('mobile_menu_user_avatar', 'true')) m_user_menu(); ?>
<div class="m-search">
<form class="m-search-form" method="get" action="<?php echo esc_url(home_url()); ?>" role="search">
<input class="m-search-input" type="search" name="s" placeholder="<?php esc_attr_e('Search...', 'sakurairo'); ?>" required>
Expand Down Expand Up @@ -187,6 +189,6 @@
}
</style>
<div id="particles-js"></div>
<script type="application/json" id="particles-js-cfg"><?php echo esc_html(iro_opt('particles_json', '')); ?></script>
<script type="application/json" id="particles-js-cfg"><?php echo iro_opt('particles_json', ''); ?></script>
<?php endif; ?>
</html>
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


define('IRO_VERSION', wp_get_theme()->get('Version'));
define('INT_VERSION', '19.1.1');
define('INT_VERSION', '19.2.0');
define('BUILD_VERSION', '2');

function check_php_version($preset_version)
Expand Down Expand Up @@ -2367,7 +2367,7 @@ function register_shortcodes() {
esc_attr($atts['direction']),
$atts['avatar'],
$speaker_alt,
esc_html($content)
$content
);
});

Expand Down
26 changes: 26 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,32 @@ function gtag() {dataLayer.push(arguments)}
</script>
<?php endif; ?>
<?= iro_opt("site_header_insert"); ?>

<?php if (iro_opt('poi_pjax')): ?>
<script>
const srcs = `
<?php echo iro_opt("pjax_keep_loading"); ?>
`;
document.addEventListener("pjax:complete", () => {
srcs.split(/[\n,]+/).forEach(path => {
path = path.trim();
if (!path) return;
if (path.endsWith('.js')) {
const script = document.createElement('script');
script.src = path;
script.async = true;
document.body.appendChild(script);
} else if (path.endsWith('.css')) {
const style = document.createElement('link');
style.rel = 'stylesheet';
style.href = path;
document.head.appendChild(style);
}
});
});
</script>
<?php endif; ?>

</head>

<body <?php body_class(); ?>>
Expand Down
22 changes: 14 additions & 8 deletions inc/decorate.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,14 +507,14 @@ function customizer_css() { ?>

.site-footer {
background-color: rgba(255, 255, 255,<?=iro_opt('reception_background_transparency'); ?>);
<?php if (iro_opt('reception_background_blur', 'false')): ?> backdrop-filter: blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> -webkit-backdrop-filter: blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> backdrop-filter: saturate(180%) blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> -webkit-backdrop-filter: saturate(180%) blur(10px); <?php endif; ?>
}

.wrapper {
background-color: rgba(255, 255, 255,<?=iro_opt('reception_background_transparency'); ?>);
<?php if (iro_opt('reception_background_blur', 'false')): ?> backdrop-filter: blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> -webkit-backdrop-filter: blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> backdrop-filter: saturate(180%) blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> -webkit-backdrop-filter: saturate(180%) blur(10px); <?php endif; ?>
}

/*首页圆角设置*/
Expand Down Expand Up @@ -856,6 +856,7 @@ function customizer_css() { ?>
letter-spacing: 1px;
flex-direction: column;
display: flex;
position: relative;
}

.post-title {
Expand All @@ -867,8 +868,13 @@ function customizer_css() { ?>
margin-right: 40%;
}

.post-excerpt p{
.post-excerpt p {
max-height: 90%;
-webkit-line-clamp: 11;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
position: relative;
}

.post-list-thumb:nth-child(2n) .post-thumb{
Expand Down Expand Up @@ -947,7 +953,7 @@ function customizer_css() { ?>
#fff0,
#000d
);
backdrop-filter: blur(1px);
backdrop-filter: saturate(180%) blur(10px);
}
.post-title {
background-color: transparent;
Expand Down Expand Up @@ -1205,8 +1211,8 @@ function customizer_css() { ?>
width: 150%;
height: 4.375rem;
background-color: rgba(255, 255, 255,<?=iro_opt('reception_background_transparency'); ?>);
<?php if (iro_opt('reception_background_blur', 'false')): ?> backdrop-filter: blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> -webkit-backdrop-filter: blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> backdrop-filter: saturate(180%) blur(10px); <?php endif; ?>
<?php if (iro_opt('reception_background_blur', 'false')): ?> -webkit-backdrop-filter: saturate(180%) blur(10px); <?php endif; ?>
left: -25%;
bottom: -2.875rem;
border-radius: 100%;
Expand Down
4 changes: 2 additions & 2 deletions inc/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ input:-webkit-autofill {
padding:0px !important;
margin:-235px 0px 0px -175px !important;
background-position: center 48%;
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
backdrop-filter: saturate(180%) blur(10px);
-webkit-backdrop-filter: saturate(180%) blur(10px);
}

#login form {
Expand Down
4 changes: 2 additions & 2 deletions inc/login_addcss.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

<?php if (iro_opt('login_blur', 'true')): ?>
body::before{
-webkit-backdrop-filter: blur(2px);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: saturate(180%) blur(10px);
backdrop-filter: saturate(180%) blur(10px);
content:"";
width:100vw;
height:100vh;
Expand Down
9 changes: 8 additions & 1 deletion inc/swicher.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ function iro_get_the_author_name()
$sakura_effect = iro_opt('sakura_falling_effects');
if ($sakura_effect != 'off') $iro_opt['effect'] = array('amount' => $sakura_effect);
if (iro_opt('theme_darkmode_auto')) $iro_opt['dm_strategy'] = iro_opt('theme_darkmode_strategy', 'time');
wp_add_inline_script('app', 'var _iro = ' . json_encode($iro_opt, JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE), 'before');
//wp_add_inline_script('app', 'var _iro = ' . json_encode($iro_opt, JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE), 'before');
//自定义歌单
$meting_api_def = json_encode($iro_opt, JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE);
if (!empty(iro_opt('custom_music_api'))) {
$custom_api_url = iro_opt('custom_music_api'); // 获取 custom_server 的值
$meting_api_def = preg_replace('/"meting_api_url":"[^"]*"/', '"meting_api_url":"' . $custom_api_url . '"', $meting_api_def); // 替换 meting_api_url 的内容
}
wp_add_inline_script('app', 'var _iro = ' . $meting_api_def, 'before');
}
add_action('wp_head', 'font_end_js_control');
Binary file modified opt/languages/ja.mo
Binary file not shown.
Loading

0 comments on commit 93046f0

Please sign in to comment.