Files
car-t-t/header.php
T
zhs123 8a2890f8b4 refactor: 多页面门店重构 — CPT + 页面模板 + README 更新
- CPT: service(服务项目) + case(案例作品集) + case_type 分类
- 页面: 关于门店/常见问题/预约联系 + archive/single 模板
- 首页精简为 hero+trust+service-teaser+case-teaser+cta
- 主题激活自动迁移 Customizer 产品数据为 service 文章
- 预约表单: nonce+honeypot+rate-limit, URL 参数预填服务
- 联系页: 门店地址/电话/营业时间/百度地图导航
- Customizer 面板改为门店语境(13 板块)
- header CTA 改为预约, helpers 更新为门店口径
- README.md 全面更新为门店多页面架构文档
2026-07-24 15:37:40 +08:00

44 lines
2.9 KiB
PHP

<?php
/** Site header. @package Fragrance_Trade */
$fragrance_rfq_url = home_url( '/contact/' );
?><!doctype html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>
<body <?php body_class( 'bg-body' ); ?>>
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( '跳转到内容', 'fragrance-trade' ); ?></a>
<svg class="fragrance-symbols" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
<symbol id="navbar-icon" viewBox="0 0 16 16"><path d="M14 10.5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 .5-.5zm0-3a.5.5 0 0 0-.5-.5h-7a.5.5 0 0 0 0 1h7a.5.5 0 0 0 .5-.5zm0-3a.5.5 0 0 0-.5-.5h-11a.5.5 0 0 0 0 1h11a.5.5 0 0 0 .5-.5z"/></symbol>
<symbol id="play" viewBox="0 0 32 32"><path fill="currentColor" d="M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28ZM8 6.69v18.62L24.925 16Z"/></symbol>
</svg>
<header id="header" class="site-header b2b-header fixed-top">
<nav id="header-nav" class="navbar navbar-expand-xl" aria-label="<?php esc_attr_e( '主导航', 'fragrance-trade' ); ?>">
<div class="container-fluid px-lg-5">
<div class="site-branding navbar-brand">
<?php if ( has_custom_logo() ) : ?>
<?php the_custom_logo(); ?>
<?php else : ?>
<a class="b2b-wordmark" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></a>
<?php endif; ?>
</div>
<button class="navbar-toggler d-flex d-xl-none order-3 p-2 border-0 shadow-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#fragrance-navigation" aria-controls="fragrance-navigation" aria-expanded="false" aria-label="<?php esc_attr_e( '打开导航', 'fragrance-trade' ); ?>">
<svg class="navbar-icon" width="44" height="44" aria-hidden="true"><use href="#navbar-icon"></use></svg>
</button>
<div class="offcanvas offcanvas-end" tabindex="-1" id="fragrance-navigation" aria-labelledby="fragrance-navigation-title">
<div class="offcanvas-header px-4 pb-0">
<span class="h5 offcanvas-title" id="fragrance-navigation-title"><?php echo esc_html( get_bloginfo( 'name' ) ); ?></span>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="<?php esc_attr_e( '关闭导航', 'fragrance-trade' ); ?>"></button>
</div>
<div class="offcanvas-body align-items-center">
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'navbar-nav justify-content-end flex-grow-1 gap-xl-4 pe-xl-3', 'container' => false, 'fallback_cb' => false ) ); ?>
<a class="btn b2b-header-cta ms-xl-3" href="<?php echo esc_url( $fragrance_rfq_url ); ?>"><?php esc_html_e( '预约', 'fragrance-trade' ); ?></a>
</div>
</div>
</div>
</nav>
</header>