Merge pull request 'fix(shell): fine-tune header/footer to zibll contracts' (#93) from worktree-homepage-zibll-1to1 into main

Reviewed-on: CYL/wordpress-theme-aksrt#93
This commit is contained in:
2026-07-12 18:57:24 +08:00
4 changed files with 498 additions and 206 deletions
+200 -27
View File
@@ -1,50 +1,223 @@
/**
* Footer zibll shell dual-class bridge
* Footer — Zibll template_1 shell (list-inline)
*/
.footer.site-footer {
position: relative;
.footer {
color: var(--footer-color, var(--color-ink-4));
background: var(--footer-bg, var(--surface-1));
padding: 30px;
font-size: 13px;
margin-top: auto;
border-top: 1px solid rgba(255, 255, 255, 0.55);
}
.footer a:not(.but):not(.focus-color) {
color: var(--footer-color, var(--color-ink-4));
}
.footer a:hover {
color: var(--focus-color, var(--color-primary));
}
.footer .container-footer {
max-width: calc(var(--mian-max-width, var(--container, 1200px)) + 180px);
margin: 0 auto;
width: 100%;
}
.footer .container-footer,
.footer .container-fluid.container-footer {
width: 100%;
max-width: var(--container, 1200px);
margin-left: auto;
margin-right: auto;
padding-left: 15px;
padding-right: 15px;
.footer .list-inline {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
list-style: none;
margin: 0 0 12px;
padding: 0;
gap: 10px 0;
}
.footer .footer-logo {
max-height: 48px;
.footer .list-inline > li {
margin: 5px 15px;
vertical-align: top;
display: inline-block;
}
@media (min-width: 992px) {
.footer .list-inline > li + li + li {
margin-left: auto;
}
}
.footer .footer-logo,
.footer .footer-logo-img,
.footer a.footer-logo img {
height: 40px;
width: auto;
max-width: 180px;
display: inline-block;
vertical-align: middle;
}
.footer .site-footer__logo--night {
display: none;
}
html.dark .footer .site-footer__logo--day,
body.dark-theme .footer .site-footer__logo--day {
display: none;
}
html.dark .footer .site-footer__logo--night,
body.dark-theme .footer .site-footer__logo--night {
display: inline-block;
}
.footer .footer-contact a {
display: inline-flex;
align-items: center;
justify-content: center;
margin-right: 10px;
.footer .title-h-left,
.footer .site-footer__title {
margin: 8px 0 10px;
font-size: 15px;
font-weight: 700;
color: var(--color-ink, #333);
}
.footer .fcode-links a {
display: inline-block;
margin-right: 12px;
margin-bottom: 6px;
}
.footer .footer-conter {
margin: 0;
.footer .footer-muted,
.footer .em09 {
font-size: 0.92em;
color: var(--muted-2-color, var(--color-ink-4));
line-height: 1.7;
}
/* Keep float-right above content, zibll-like */
.footer .fcode-links {
margin: 0 0 8px;
line-height: 1.9;
}
.footer .fcode-links > a + a:before {
content: "";
width: 4px;
height: 4px;
margin: 0 0.5em;
border-radius: 50%;
display: inline-block;
vertical-align: middle;
background: var(--main-color, var(--color-ink-2));
opacity: 0.3;
vertical-align: 0.2em;
}
.footer .footer-contact {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 4px;
margin-top: 10px;
}
.footer .footer-contact > a,
.footer .footer-contact__item {
font-size: 18px;
margin: 5px;
width: 35px;
height: 35px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: var(--surface-2, #f3f3f3);
color: var(--footer-color, var(--color-ink-3));
text-decoration: none;
transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.footer .footer-contact > a:hover,
.footer .footer-contact__item:hover {
color: #fff;
background: var(--focus-color, var(--color-primary));
transform: translateY(-1px);
}
.footer .footer-wechat-img {
display: none;
position: absolute;
width: 140px;
bottom: 90%;
left: -55px;
padding-bottom: 12px;
z-index: 5;
}
.footer .hover-show {
position: relative;
}
.footer .hover-show:hover .footer-wechat-img,
.footer .hover-show:focus .footer-wechat-img {
display: block;
}
.footer .footer-wechat-img img {
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
border-radius: 4px;
width: 100%;
height: auto;
background: #fff;
}
.footer .footer-miniimg {
width: 90px;
margin: 0 10px;
text-align: center;
vertical-align: text-top;
display: inline-block;
}
.footer .footer-miniimg img {
width: 90px;
height: 90px;
object-fit: cover;
border-radius: 4px;
background: var(--surface-2);
}
.footer .footer-conter,
.footer .site-footer__copyright {
margin: 8px 0 0;
line-height: 1.8;
color: var(--footer-color, var(--color-ink-4));
font-size: 13px;
text-align: left;
}
.footer .footer-conter a:hover {
color: var(--focus-color, var(--color-primary));
}
.footer .mt10 {
margin-top: 10px;
}
#float-right-btns.float-right,
.float-right {
position: fixed;
right: 16px;
bottom: 80px;
z-index: 90;
display: flex;
flex-direction: column;
gap: 8px;
}
@media (max-width: 767px) {
.footer {
padding: 24px 16px 28px;
}
.footer .list-inline {
display: block;
}
.footer .list-inline > li {
display: block;
margin: 12px 0;
max-width: none !important;
}
}
+133
View File
@@ -1,3 +1,14 @@
/* Zibll body.nav-fixed: reserve header space then pull hero under nav */
body.nav-fixed {
padding-top: var(--nav-height, 60px);
}
body.nav-fixed .header-slider-container,
body.nav-fixed .header-components.slide-header,
body.nav-fixed .header-components-container {
margin-top: calc(var(--nav-height, 60px) * -1);
}
/* ============================================================
* AKSRT Navigation — Zibll-aligned
*
@@ -331,3 +342,125 @@ ul.nav-desktop .sub-menu .sub-menu {
margin: 0;
}
/* ============================================================
* Zibll .header.show-slide — transparent gradient over hero
* ============================================================ */
.header.show-slide {
--header-bg: linear-gradient(0, rgba(0, 0, 0, 0) 5%, rgba(0, 0, 0, 0.1) 80%);
--header-color: #fff;
-webkit-backdrop-filter: unset;
backdrop-filter: unset;
}
body.nav-fixed .header.show-slide {
position: absolute;
top: 0;
left: 0;
right: 0;
width: 100%;
z-index: 30;
background: transparent;
box-shadow: none;
border: 0;
}
.header.show-slide .navbar.navbar-top,
.header.show-slide .site-nav {
background: var(--header-bg, transparent);
border-bottom-color: transparent;
box-shadow: none;
color: var(--header-color, #fff);
backdrop-filter: none;
-webkit-backdrop-filter: none;
}
.header.show-slide .site-nav:not(.is-scrolled) a,
.header.show-slide .site-nav:not(.is-scrolled) .icon-btn,
.header.show-slide .site-nav:not(.is-scrolled) .site-brand__name {
color: #fff;
}
.header.show-slide .site-nav.is-scrolled,
.site-nav.is-scrolled {
background: var(--blur-bg);
color: var(--header-color, var(--color-ink-2));
border-bottom-color: rgba(255, 255, 255, 0.45);
backdrop-filter: saturate(5) blur(20px);
-webkit-backdrop-filter: saturate(5) blur(20px);
box-shadow: 0 4px 10px var(--main-shadow, rgba(116, 116, 116, 0.08));
}
.navbar.navbar-top {
margin: 0;
border-radius: 0 !important;
font-size: 15px;
}
.container-header,
.container-footer {
max-width: calc(var(--mian-max-width, var(--container, 1200px)) + 180px);
margin-left: auto;
margin-right: auto;
width: 100%;
padding-left: 15px;
padding-right: 15px;
}
.navbar-top .navbar-brand {
padding: 7px 10px;
}
.navbar-logo > img,
.navbar-logo .site-brand__logo-img,
.site-brand__logo-img {
height: 36px !important;
width: auto !important;
max-width: 180px;
padding: 0;
object-fit: contain;
}
.navbar-top .navbar-nav,
.navbar-top ul.nav-desktop {
margin-left: 20px;
margin-right: 20px;
display: flex;
align-items: center;
gap: 0;
list-style: none;
padding: 0;
}
.navbar-top .navbar-nav > li > a,
.navbar-top ul.nav-desktop > li > a {
padding-left: 10px;
padding-right: 10px;
border-radius: 4px;
display: inline-flex !important;
align-items: center;
min-height: 36px;
font-size: 15px;
}
.navbar-top .site-nav__row {
display: flex;
align-items: center;
width: 100%;
min-height: var(--nav-height, 60px);
}
.navbar-top .nav-actions {
margin-left: auto;
display: flex;
align-items: center;
gap: 8px;
}
.scroll-down.nav-fixed .header.scroll-down-hide,
body.scroll-down.nav-fixed .header.scroll-down-hide {
transform: translate3d(0, -105%, 0);
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
+159 -178
View File
@@ -105,200 +105,181 @@ $render_link_url = function ($raw) {
<footer class="footer site-footer site-footer--<?php echo esc_attr($footer_layout); ?>" data-aksrt-shell="site-footer" role="contentinfo">
<?php if (is_active_sidebar('all_footer')) : ?>
<div class="site-footer__widgets container-footer">
<div class="site-footer__widgets">
<?php dynamic_sidebar('all_footer'); ?>
</div>
<?php endif; ?>
<?php
$_has_brand = !empty($footer_brand['img']) || !empty($footer_brand['title']) || !empty($footer_brand['custom_code']);
$_has_contact = !empty($footer_contacts) || !empty($footer_contact_ext['wechat_img']) || !empty($footer_contact_ext['qq']) || !empty($footer_contact_ext['email']) || !empty($footer_contact_ext['more']);
$_has_links = !empty($quick_links) || !empty($more_links);
$_has_brand = !empty($footer_brand['img']) || !empty($footer_brand['title']) || !empty($footer_brand['custom_code']) || $blog_description !== '';
$_has_contact = !empty($footer_contacts) || !empty($footer_contact_ext['wechat_img']) || !empty($footer_contact_ext['qq']) || !empty($footer_contact_ext['email']) || !empty($footer_contact_ext['more']) || !empty($footer_contact_ext['weibo']);
$_has_links = !empty($quick_links) || !empty($more_links) || !empty($friend_links);
$_has_mini = !empty($footer_mini['items']);
$_has_grid = $_has_brand || $_has_contact || $_has_links || $_has_mini;
$_has_cols = $_has_brand || $_has_contact || $_has_links || $_has_mini || $hot_cat_count > 0;
?>
<?php if ($_has_grid) : ?>
<div class="site-footer__inner">
<div class="site-footer__grid row">
<?php if ($_has_brand) : ?>
<div class="site-footer__brand col-lg-4 col-md-6<?php echo esc_attr($_brand_vis_cls); ?>">
<?php if (!empty($footer_brand['img'])) : ?>
<img class="site-footer__logo site-footer__logo--day footer-logo" src="<?php echo esc_url($footer_brand['img']); ?>" alt="<?php echo esc_attr($blog_name); ?>">
<?php if (!empty($footer_brand['img_dark'])) : ?>
<img class="site-footer__logo site-footer__logo--night footer-logo" src="<?php echo esc_url($footer_brand['img_dark']); ?>" alt="<?php echo esc_attr($blog_name); ?>">
<?php endif; ?>
<?php endif; ?>
<?php if (!empty($footer_brand['title'])) : ?>
<h4 class="site-footer__title"><?php echo esc_html($footer_brand['title']); ?></h4>
<?php endif; ?>
<p class="site-footer__desc"><?php echo esc_html($blog_description); ?></p>
<?php if (!empty($footer_contacts)) : ?>
<div class="social-row footer-contact">
<?php foreach ($footer_contacts as $contact) :
$c_icon = $contact['icon'] ?? '';
$c_url = $contact['url'] ?? '#';
$c_label = $contact['title'] ?? ($contact['label'] ?? aksrt_icon_key_to_name($c_icon));
$c_svg = function_exists('aksrt_inline_svg') ? aksrt_inline_svg($c_icon) : '';
?>
<a href="<?php echo esc_url($c_url); ?>" target="_blank" rel="noopener noreferrer" aria-label="<?php echo esc_attr($c_label); ?>" title="<?php echo esc_attr($c_label); ?>">
<?php if ($c_svg !== '') : ?>
<?php echo $c_svg; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php else : ?>
<i class="fas fa-globe" aria-hidden="true"></i>
<?php endif; ?>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (!empty($footer_brand['custom_code'])) : ?>
<div class="site-footer__brand-code"><?php echo wp_kses_post($footer_brand['custom_code']); ?></div>
<?php endif; ?>
<?php if (!empty($friend_links)) : ?>
<div class="site-footer__friends">
<h5 class="site-footer__friends-title"><?php esc_html_e('友情链接', 'aksrt'); ?></h5>
<div class="site-footer__friends-list fcode-links">
<?php foreach ($friend_links as $fl) : ?>
<a href="<?php echo esc_url($fl['url'] ?? '#'); ?>" target="_blank" rel="noopener noreferrer nofollow"><?php echo esc_html($fl['name'] ?? ''); ?></a>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($_has_links) : ?>
<?php if (!empty($quick_links)) : ?>
<div class="site-footer__col col-lg-2 col-md-3 col-6">
<h5 class="site-footer__title"><?php esc_html_e('快速链接', 'aksrt'); ?></h5>
<ul>
<?php foreach ($quick_links as $ql) : ?>
<li><a href="<?php echo esc_url($render_link_url($ql['url'] ?? '')); ?>"><?php echo esc_html($ql['name'] ?? $ql['label'] ?? ''); ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php if (!empty($more_links)) : ?>
<div class="site-footer__col col-lg-2 col-md-3 col-6">
<h5 class="site-footer__title"><?php esc_html_e('更多', 'aksrt'); ?></h5>
<ul>
<?php foreach ($more_links as $ml) : ?>
<li><a href="<?php echo esc_url($render_link_url($ml['url'] ?? '')); ?>"><?php echo esc_html($ml['name'] ?? $ml['label'] ?? ''); ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['wechat_img']) || !empty($footer_contact_ext['qq']) || !empty($footer_contact_ext['email'])) : ?>
<div class="site-footer__col col-lg-2 col-md-6<?php echo esc_attr($_contact_vis_cls); ?>">
<h5 class="site-footer__title"><?php esc_html_e('联系我们', 'aksrt'); ?></h5>
<ul>
<?php if (!empty($footer_contact_ext['email'])) : ?>
<li><i class="fas fa-envelope" aria-hidden="true"></i> <?php echo esc_html($footer_contact_ext['email']); ?></li>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['qq'])) : ?>
<li><i class="fab fa-qq" aria-hidden="true"></i> QQ: <?php echo esc_html($footer_contact_ext['qq']); ?></li>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['weibo'])) : ?>
<li><i class="fab fa-weibo" aria-hidden="true"></i> <?php echo esc_html($footer_contact_ext['weibo']); ?></li>
<?php endif; ?>
</ul>
<?php if (!empty($footer_contact_ext['wechat_img'])) : ?>
<div class="site-footer__mini-qr">
<div class="site-footer__mini-qr-item">
<img src="<?php echo esc_url($footer_contact_ext['wechat_img']); ?>" alt="<?php esc_attr_e('微信', 'aksrt'); ?>">
<span><?php esc_html_e('微信', 'aksrt'); ?></span>
</div>
</div>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['code_1'])) : ?>
<div class="site-footer__contact-code"><?php echo wp_kses_post($footer_contact_ext['code_1']); ?></div>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['code_2'])) : ?>
<div class="site-footer__contact-code"><?php echo wp_kses_post($footer_contact_ext['code_2']); ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($_has_mini) : ?>
<div class="site-footer__col col-lg-2 col-md-6<?php echo esc_attr($_mini_vis_cls); ?>">
<h5 class="site-footer__title"><?php esc_html_e('关注我们', 'aksrt'); ?></h5>
<div class="site-footer__mini-qr">
<?php foreach ($footer_mini['items'] as $mi) : ?>
<div class="site-footer__mini-qr-item">
<img src="<?php echo esc_url($mi['img'] ?? ''); ?>" alt="<?php echo esc_attr($mi['label'] ?? ''); ?>">
<?php if (!empty($mi['label'])) : ?>
<span><?php echo esc_html($mi['label']); ?></span>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<?php if ($hot_cat_count > 0) : ?>
<?php
$_hot_cache_key = 'aksrt_footer_hot_cats_' . (int) $hot_cat_count;
$_hot_cats = wp_cache_get($_hot_cache_key, 'aksrt');
if (!is_array($_hot_cats)) {
$_hot_cats = get_categories(['orderby' => 'count', 'order' => 'DESC', 'number' => $hot_cat_count, 'hide_empty' => true]);
if (!is_array($_hot_cats)) {
$_hot_cats = [];
}
wp_cache_set($_hot_cache_key, $_hot_cats, 'aksrt', 12 * HOUR_IN_SECONDS);
}
if (!empty($_hot_cats)) :
?>
<div class="site-footer__col col-lg-2 col-md-3 col-6">
<h5 class="site-footer__title"><?php esc_html_e('热门分类', 'aksrt'); ?></h5>
<ul>
<?php foreach ($_hot_cats as $hc) : ?>
<li><a href="<?php echo esc_url(get_category_link($hc->term_id)); ?>"><?php echo esc_html($hc->name); ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<div class="container-fluid container-footer">
<?php if (!empty($icp_number) || !empty($police_number)) : ?>
<div class="site-footer__filings">
<?php if (!empty($icp_number)) : ?>
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer nofollow">
<?php echo esc_html($icp_number); ?>
</a>
<?php if ($_has_cols) : ?>
<ul class="list-inline footer-template-1">
<li class="footer-col footer-col--brand<?php echo esc_attr($_brand_vis_cls); ?>" style="max-width:300px;">
<?php if (!empty($footer_brand['img'])) : ?>
<p>
<a class="footer-logo" href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr($blog_name); ?>">
<img class="site-footer__logo site-footer__logo--day footer-logo-img" src="<?php echo esc_url($footer_brand['img']); ?>" alt="<?php echo esc_attr($blog_name); ?>" style="height:40px;width:auto;">
<?php if (!empty($footer_brand['img_dark'])) : ?>
<img class="site-footer__logo site-footer__logo--night footer-logo-img" src="<?php echo esc_url($footer_brand['img_dark']); ?>" alt="<?php echo esc_attr($blog_name); ?>" style="height:40px;width:auto;">
<?php endif; ?>
</a>
</p>
<?php endif; ?>
<?php if (!empty($police_number)) : ?>
<a href="https://beian.mps.gov.cn/" target="_blank" rel="noopener noreferrer nofollow">
<?php echo esc_html($police_number); ?>
</a>
<?php if (!empty($footer_brand['title'])) : ?>
<p class="title-h-left site-footer__title"><?php echo esc_html($footer_brand['title']); ?></p>
<?php endif; ?>
</div>
<?php if ($blog_description !== '') : ?>
<div class="footer-muted em09 site-footer__desc"><?php echo esc_html($blog_description); ?></div>
<?php endif; ?>
<?php if (!empty($footer_brand['custom_code'])) : ?>
<div class="footer-muted em09 site-footer__brand-code"><?php echo wp_kses_post($footer_brand['custom_code']); ?></div>
<?php endif; ?>
</li>
<li class="footer-col footer-col--links" style="max-width:550px;">
<?php
$link_bits = [];
foreach ((array) $quick_links as $ql) {
$label = $ql['name'] ?? $ql['label'] ?? '';
$url = $render_link_url($ql['url'] ?? '');
if ($label !== '') {
$link_bits[] = '<a href="' . esc_url($url) . '">' . esc_html($label) . '</a>';
}
}
foreach ((array) $more_links as $ml) {
$label = $ml['name'] ?? $ml['label'] ?? '';
$url = $render_link_url($ml['url'] ?? '');
if ($label !== '') {
$link_bits[] = '<a href="' . esc_url($url) . '">' . esc_html($label) . '</a>';
}
}
foreach ((array) $friend_links as $fl) {
$label = $fl['name'] ?? '';
$url = $fl['url'] ?? '#';
if ($label !== '') {
$link_bits[] = '<a href="' . esc_url($url) . '" target="_blank" rel="noopener noreferrer nofollow">' . esc_html($label) . '</a>';
}
}
if ($hot_cat_count > 0) {
$_hot_cache_key = 'aksrt_footer_hot_cats_' . (int) $hot_cat_count;
$_hot_cats = wp_cache_get($_hot_cache_key, 'aksrt');
if (!is_array($_hot_cats)) {
$_hot_cats = get_categories(['orderby' => 'count', 'order' => 'DESC', 'number' => $hot_cat_count, 'hide_empty' => true]);
if (!is_array($_hot_cats)) {
$_hot_cats = [];
}
wp_cache_set($_hot_cache_key, $_hot_cats, 'aksrt', 12 * HOUR_IN_SECONDS);
}
foreach ($_hot_cats as $hc) {
$link_bits[] = '<a href="' . esc_url(get_category_link($hc->term_id)) . '">' . esc_html($hc->name) . '</a>';
}
}
if (!empty($link_bits)) :
?>
<p class="fcode-links"><?php echo implode(' ', $link_bits); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['code_1'])) : ?>
<div class="footer-muted em09"><?php echo wp_kses_post($footer_contact_ext['code_1']); ?></div>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['code_2'])) : ?>
<div class="footer-muted em09"><?php echo wp_kses_post($footer_contact_ext['code_2']); ?></div>
<?php endif; ?>
<div class="footer-contact mt10<?php echo esc_attr($_contact_vis_cls); ?>">
<?php if (!empty($footer_contact_ext['wechat_img'])) : ?>
<a class="toggle-radius hover-show nowave footer-contact__item" href="javascript:;" title="<?php esc_attr_e('微信', 'aksrt'); ?>">
<i class="fab fa-weixin" aria-hidden="true"></i>
<span class="hover-show-con footer-wechat-img">
<img height="100" src="<?php echo esc_url($footer_contact_ext['wechat_img']); ?>" alt="<?php esc_attr_e('微信', 'aksrt'); ?>">
</span>
</a>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['qq'])) : ?>
<a class="toggle-radius footer-contact__item" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e('QQ', 'aksrt'); ?>" href="<?php echo esc_url('https://wpa.qq.com/msgrd?v=3&uin=' . rawurlencode((string) $footer_contact_ext['qq']) . '&site=qq&menu=yes'); ?>">
<i class="fab fa-qq" aria-hidden="true"></i>
</a>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['weibo'])) : ?>
<a class="toggle-radius footer-contact__item" target="_blank" rel="noopener noreferrer" title="<?php esc_attr_e('微博', 'aksrt'); ?>" href="<?php echo esc_url($footer_contact_ext['weibo']); ?>">
<i class="fab fa-weibo" aria-hidden="true"></i>
</a>
<?php endif; ?>
<?php if (!empty($footer_contact_ext['email'])) : ?>
<a class="toggle-radius footer-contact__item" title="<?php esc_attr_e('邮箱', 'aksrt'); ?>" href="<?php echo esc_url('mailto:' . $footer_contact_ext['email']); ?>">
<i class="fas fa-envelope" aria-hidden="true"></i>
</a>
<?php endif; ?>
<?php foreach ((array) $footer_contacts as $contact) :
$c_icon = $contact['icon'] ?? '';
$c_url = $contact['url'] ?? '#';
$c_label = $contact['title'] ?? ($contact['label'] ?? (function_exists('aksrt_icon_key_to_name') ? aksrt_icon_key_to_name($c_icon) : ''));
$c_svg = function_exists('aksrt_inline_svg') ? aksrt_inline_svg($c_icon) : '';
?>
<a class="toggle-radius footer-contact__item" href="<?php echo esc_url($c_url); ?>" target="_blank" rel="noopener noreferrer" title="<?php echo esc_attr($c_label); ?>" aria-label="<?php echo esc_attr($c_label); ?>">
<?php if ($c_svg !== '') : ?>
<?php echo $c_svg; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php else : ?>
<i class="fas fa-globe" aria-hidden="true"></i>
<?php endif; ?>
</a>
<?php endforeach; ?>
</div>
</li>
<?php if ($_has_mini) : ?>
<li class="footer-col footer-col--mini<?php echo esc_attr($_mini_vis_cls); ?>">
<?php foreach ($footer_mini['items'] as $mi) : ?>
<div class="footer-miniimg">
<?php if (!empty($mi['img'])) : ?>
<img src="<?php echo esc_url($mi['img']); ?>" alt="<?php echo esc_attr($mi['label'] ?? ''); ?>" width="90" height="90" loading="lazy">
<?php endif; ?>
<?php if (!empty($mi['label'])) : ?>
<div class="em09 footer-muted"><?php echo esc_html($mi['label']); ?></div>
<?php endif; ?>
</div>
<?php endforeach; ?>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<p class="site-footer__copyright footer-conter">
&copy; <?php echo esc_html(gmdate('Y')); ?>
<?php echo esc_html($blog_name); ?>.
<?php
if (!empty($copyright_text)) {
echo wp_kses_post($copyright_text);
} else {
esc_html_e('由 WordPress 强力驱动。', 'aksrt');
}
?>
</p>
<?php if ($footer_text !== '') : ?>
<p class="site-footer__copyright site-footer__copyright--extra"><?php echo esc_html($footer_text); ?></p>
<?php endif; ?>
<?php if (!empty($footer_customize_code)) : ?>
<div class="site-footer__customize-code"><?php echo wp_kses_post($footer_customize_code); ?></div>
<?php endif; ?>
<?php
$footer_bits = [];
if (!empty($icp_number)) {
$footer_bits[] = '<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer nofollow">' . esc_html($icp_number) . '</a>';
}
if (!empty($police_number)) {
$footer_bits[] = '<a href="https://beian.mps.gov.cn/" target="_blank" rel="noopener noreferrer nofollow">' . esc_html($police_number) . '</a>';
}
$copy = '&copy; ' . esc_html(gmdate('Y')) . ' ' . esc_html($blog_name) . '.';
if (!empty($copyright_text)) {
$copy .= ' ' . wp_kses_post($copyright_text);
} else {
$copy .= ' ' . esc_html__('由 WordPress 强力驱动。', 'aksrt');
}
if ($footer_text !== '') {
$copy .= ' ' . esc_html($footer_text);
}
if (!empty($footer_bits)) {
$copy .= ' ' . implode(' · ', $footer_bits);
}
if (!empty($footer_customize_code)) {
$copy .= ' ' . wp_kses_post($footer_customize_code);
}
?>
<p class="footer-conter site-footer__copyright"><?php echo $copy; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
</div>
</footer>
<!-- 浮动右侧按钮组 -->
<?php
$floating_settings = $has_settings ? AKSRT_Settings::get_floating_buttons_settings() : [];
+6 -1
View File
@@ -30,6 +30,11 @@ if (class_exists('AKSRT_Settings') && method_exists('AKSRT_Settings', 'initial_t
$aksrt_has_initial_theme = in_array($aksrt_initial_theme_mode, ['dark', 'light'], true);
$aksrt_body_classes = ['header-nav-style-' . $aksrt_header_settings['nav_style']];
// Zibll contract: body.nav-fixed drives top padding + hero pull-under-nav.
if (!empty($aksrt_header_settings['fixed'])) {
$aksrt_body_classes[] = 'nav-fixed';
}
if ($aksrt_initial_theme_mode === 'dark') {
$aksrt_body_classes[] = 'theme-dark';
$aksrt_body_classes[] = 'dark-theme';
@@ -191,8 +196,8 @@ if (!empty($aksrt_bg_styles)) {
$aksrt_header_classes = [
'header',
'header-layout-' . $aksrt_header_settings['layout'],
$aksrt_header_settings['fixed'] ? 'nav-fixed' : 'nav-static',
];
// Fixed state lives on body.nav-fixed (zibll); nav keeps site-nav--fixed.
if ($aksrt_show_header_slide) {
$aksrt_header_classes[] = 'show-slide';
}