refactor: 死代码清理 + CDN SRI 加固 + 面包屑组件 + 代码规范文档
- 删除 7 个死模板文件 (products/services/quality/process/projects/customization/rfq) - 删除 13 个旧图片素材 (jpg/png/webp) - 新增 CDN SRI 完整性校验 (Bootstrap CSS/JS) - 新增面包屑导航模板组件 - 新增代码清理方案与代码审查标准文档 - 更新 README.md
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
<?php /** Customization map. @package Fragrance_Trade */ ?>
|
||||
<section id="customization" class="b2b-section customization-section">
|
||||
<div class="container">
|
||||
<div class="row g-5 align-items-start"><div class="col-lg-5"><p class="section-eyebrow"><?php esc_html_e( '定制选项', 'fragrance-trade' ); ?></p><h2><?php echo esc_html( fragrance_trade_get_mod( 'b2b_custom_title' ) ); ?></h2><p class="section-lead"><?php echo esc_html( fragrance_trade_get_mod( 'b2b_custom_text' ) ); ?></p><a href="#rfq" class="btn btn-b2b-primary mt-3"><?php esc_html_e( '提交预约需求', 'fragrance-trade' ); ?></a></div>
|
||||
<div class="col-lg-7"><div class="customization-grid"><?php for ( $index = 1; $index <= 8; $index++ ) : ?><div class="customization-item"><span><?php echo esc_html( str_pad( (string) $index, 2, '0', STR_PAD_LEFT ) ); ?></span><h3><?php echo esc_html( fragrance_trade_get_mod( 'b2b_custom_' . $index . '_title' ) ); ?></h3></div><?php endfor; ?></div></div></div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?php /** OEM/ODM process. @package Fragrance_Trade */ ?>
|
||||
<section id="process" class="b2b-section process-section">
|
||||
<div class="container"><div class="section-heading row align-items-end g-4"><div class="col-lg-7"><p class="section-eyebrow"><?php esc_html_e( '从需求到交付', 'fragrance-trade' ); ?></p><h2><?php echo esc_html( fragrance_trade_get_mod( 'b2b_process_title' ) ); ?></h2></div><div class="col-lg-5"><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_process_text' ) ); ?></p></div></div>
|
||||
<div class="process-grid mt-5"><?php for ( $index = 1; $index <= 8; $index++ ) : ?><article class="process-step"><span><?php echo esc_html( str_pad( (string) $index, 2, '0', STR_PAD_LEFT ) ); ?></span><h3><?php echo esc_html( fragrance_trade_get_mod( 'b2b_process_' . $index . '_title' ) ); ?></h3><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_process_' . $index . '_text' ) ); ?></p></article><?php endfor; ?></div></div>
|
||||
</section>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php
|
||||
/** Factory-produced perfume reference cards. @package Fragrance_Trade */
|
||||
$fallbacks = array(
|
||||
'products/placeholder-01.svg',
|
||||
'products/placeholder-02.svg',
|
||||
'products/placeholder-03.svg',
|
||||
'products/placeholder-04.svg',
|
||||
'products/placeholder-05.svg',
|
||||
'products/placeholder-06.svg',
|
||||
'products/placeholder-07.svg',
|
||||
);
|
||||
?>
|
||||
<section id="capabilities" class="b2b-section capabilities-section">
|
||||
<div class="container">
|
||||
<div class="section-heading text-center mx-auto"><p class="section-eyebrow"><?php esc_html_e( '门店膜料参考', 'fragrance-trade' ); ?></p><h2><?php echo esc_html( fragrance_trade_get_mod( 'b2b_products_title' ) ); ?></h2><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_products_text' ) ); ?></p></div>
|
||||
<div class="capability-grid mt-5">
|
||||
<?php for ( $index = 1; $index <= count( $fallbacks ); $index++ ) : $title = fragrance_trade_get_mod( 'b2b_product_' . $index . '_title' ); ?>
|
||||
<article class="capability-card">
|
||||
<div class="capability-image"><img src="<?php echo esc_url( fragrance_trade_image_uri( 'b2b_product_' . $index . '_image', $fallbacks[ $index - 1 ] ) ); ?>" alt="<?php echo esc_attr( $title ); ?>" class="img-fluid" width="960" height="960" loading="lazy" decoding="async"></div>
|
||||
<div class="capability-body"><p class="capability-label"><?php esc_html_e( '施工效果参考', 'fragrance-trade' ); ?></p><h3><?php echo esc_html( $title ); ?></h3><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_product_' . $index . '_text' ) ); ?></p><p class="capability-specs"><?php echo esc_html( fragrance_trade_get_mod( 'b2b_product_' . $index . '_specs' ) ); ?></p><a href="#rfq" class="btn btn-b2b-outline" data-rfq-product="<?php echo esc_attr( $title ); ?>"><?php esc_html_e( '咨询这项服务', 'fragrance-trade' ); ?></a></div>
|
||||
</article>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?php /** Typical buyer project scenarios. @package Fragrance_Trade */ if ( ! fragrance_trade_show_section( 'b2b_show_projects' ) ) { return; } ?>
|
||||
<section id="projects" class="b2b-section projects-section">
|
||||
<div class="container"><div class="section-heading text-center mx-auto"><p class="section-eyebrow"><?php esc_html_e( '项目案例', 'fragrance-trade' ); ?></p><h2><?php echo esc_html( fragrance_trade_get_mod( 'b2b_projects_title' ) ); ?></h2><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_projects_text' ) ); ?></p></div>
|
||||
<div class="project-grid mt-5"><?php for ( $index = 1; $index <= 3; $index++ ) : ?><article class="project-card"><p class="project-meta"><?php echo esc_html( fragrance_trade_get_mod( 'b2b_project_' . $index . '_meta' ) ); ?></p><h3><?php echo esc_html( fragrance_trade_get_mod( 'b2b_project_' . $index . '_title' ) ); ?></h3><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_project_' . $index . '_text' ) ); ?></p><a href="#rfq" class="text-link"><?php esc_html_e( '咨询类似服务', 'fragrance-trade' ); ?> <span aria-hidden="true">→</span></a></article><?php endfor; ?></div></div>
|
||||
</section>
|
||||
@@ -1,5 +0,0 @@
|
||||
<?php /** Quality control stages. @package Fragrance_Trade */ ?>
|
||||
<section id="quality" class="b2b-section quality-section">
|
||||
<div class="container"><div class="section-heading text-center mx-auto"><p class="section-eyebrow"><?php esc_html_e( '品质管控', 'fragrance-trade' ); ?></p><h2><?php echo esc_html( fragrance_trade_get_mod( 'b2b_quality_title' ) ); ?></h2><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_quality_text' ) ); ?></p></div>
|
||||
<div class="quality-grid mt-5"><?php for ( $index = 1; $index <= 6; $index++ ) : ?><article class="quality-card"><span class="quality-number"><?php echo esc_html( str_pad( (string) $index, 2, '0', STR_PAD_LEFT ) ); ?></span><h3><?php echo esc_html( fragrance_trade_get_mod( 'b2b_quality_' . $index . '_title' ) ); ?></h3><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_quality_' . $index . '_text' ) ); ?></p></article><?php endfor; ?></div></div>
|
||||
</section>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
/** Compact B2B inquiry form. @package Fragrance_Trade */
|
||||
$notice = fragrance_trade_get_notice();
|
||||
$notice_message = fragrance_trade_notice_message( $notice );
|
||||
?>
|
||||
<section id="rfq" class="b2b-section rfq-section">
|
||||
<div class="container">
|
||||
<div class="row g-5">
|
||||
<div class="col-lg-4">
|
||||
<p class="section-eyebrow"><?php esc_html_e( '开始合作', 'fragrance-trade' ); ?></p>
|
||||
<h2><?php echo esc_html( fragrance_trade_get_mod( 'b2b_rfq_title' ) ); ?></h2>
|
||||
<p class="section-lead"><?php echo esc_html( fragrance_trade_get_mod( 'b2b_rfq_text' ) ); ?></p>
|
||||
<div class="rfq-direct">
|
||||
<h3><?php esc_html_e( '希望直接联系?', 'fragrance-trade' ); ?></h3>
|
||||
<a href="<?php echo esc_url( fragrance_trade_get_inquiry_url() ); ?>"><?php esc_html_e( '通过邮件或 WhatsApp 联系我们', 'fragrance-trade' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="rfq-form-card">
|
||||
<div class="fragrance-form-status" aria-live="polite">
|
||||
<?php if ( $notice_message ) : ?><p class="notice-<?php echo esc_attr( $notice ); ?>"><?php echo esc_html( $notice_message ); ?></p><?php endif; ?>
|
||||
</div>
|
||||
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
||||
<input type="hidden" name="action" value="fragrance_rfq">
|
||||
<?php wp_nonce_field( 'fragrance_rfq', 'fragrance_rfq_nonce' ); ?>
|
||||
<div class="row g-3">
|
||||
<div class="col-sm-6"><label for="rfq-name"><?php esc_html_e( '姓名 *', 'fragrance-trade' ); ?></label><input id="rfq-name" class="form-control" type="text" name="name" required maxlength="100" autocomplete="name"></div>
|
||||
<div class="col-sm-6"><label for="rfq-email"><?php esc_html_e( '邮箱 *', 'fragrance-trade' ); ?></label><input id="rfq-email" class="form-control" type="email" name="email" required maxlength="190" autocomplete="email"></div>
|
||||
<div class="col-sm-6"><label for="rfq-company"><?php esc_html_e( '车型 / 车牌(选填)', 'fragrance-trade' ); ?></label><input id="rfq-company" class="form-control" type="text" name="company" maxlength="150" autocomplete="organization"></div>
|
||||
<div class="col-sm-6"><label for="rfq-whatsapp"><?php esc_html_e( 'WhatsApp 或电话', 'fragrance-trade' ); ?></label><input id="rfq-whatsapp" class="form-control" type="text" name="whatsapp" maxlength="100" autocomplete="tel"></div>
|
||||
<div class="col-12"><label for="rfq-product-type"><?php esc_html_e( '想做的项目 / 膜种 *', 'fragrance-trade' ); ?></label><input id="rfq-product-type" class="form-control" type="text" name="product_type" required maxlength="150" data-rfq-product-field></div>
|
||||
<div class="col-12"><label for="rfq-message"><?php esc_html_e( '简要需求描述 *', 'fragrance-trade' ); ?></label><textarea id="rfq-message" class="form-control" name="message" rows="4" required maxlength="2000" placeholder="<?php esc_attr_e( '请描述您的需求。', 'fragrance-trade' ); ?>"></textarea></div>
|
||||
</div>
|
||||
<div class="fragrance-honeypot" aria-hidden="true"><label for="rfq-website">Website</label><input id="rfq-website" type="text" name="fragrance_website" tabindex="-1" autocomplete="off"></div>
|
||||
<p class="rfq-privacy-note"><?php esc_html_e( '我们仅会使用这些信息回复您的预约。', 'fragrance-trade' ); ?></p>
|
||||
<button type="submit" class="btn btn-b2b-primary"><?php echo esc_html( fragrance_trade_get_mod( 'b2b_rfq_button_label' ) ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php /** OEM/ODM services. @package Fragrance_Trade */ ?>
|
||||
<section id="services" class="b2b-section services-section">
|
||||
<div class="container">
|
||||
<div class="section-heading row align-items-end g-4">
|
||||
<div class="col-lg-7"><p class="section-eyebrow"><?php esc_html_e( '服务项目', 'fragrance-trade' ); ?></p><h2><?php echo esc_html( fragrance_trade_get_mod( 'b2b_services_title' ) ); ?></h2></div>
|
||||
<div class="col-lg-5"><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_services_text' ) ); ?></p></div>
|
||||
</div>
|
||||
<div class="row g-4 mt-4">
|
||||
<?php for ( $index = 1; $index <= 4; $index++ ) : ?>
|
||||
<div class="col-md-6 col-xl-3"><article class="service-card h-100"><span class="card-index">0<?php echo esc_html( $index ); ?></span><h3><?php echo esc_html( fragrance_trade_get_mod( 'b2b_service_' . $index . '_title' ) ); ?></h3><p><?php echo esc_html( fragrance_trade_get_mod( 'b2b_service_' . $index . '_text' ) ); ?></p><a href="#rfq" class="text-link"><?php esc_html_e( '了解此服务', 'fragrance-trade' ); ?> <span aria-hidden="true">→</span></a></article></div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user