feat: release news and store experience updates

This commit is contained in:
Codex
2026-07-26 11:09:11 +08:00
parent 2b37713791
commit c63bef311c
100 changed files with 2519 additions and 105 deletions
+47 -11
View File
@@ -20,17 +20,53 @@ $case_query = new WP_Query(
<h2><?php esc_html_e( '从案例了解不同项目的实际效果', 'fragrance-trade' ); ?></h2>
</div>
<?php if ( $case_query->have_posts() ) : ?>
<div class="case-grid mt-5">
<?php while ( $case_query->have_posts() ) : $case_query->the_post(); ?>
<a class="case-card" href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'medium', array( 'class' => 'img-fluid' ) ); ?>
<?php else : ?>
<img src="<?php echo esc_url( fragrance_trade_asset_uri( 'images/products/placeholder-01.svg' ) ); ?>" alt="<?php the_title_attribute(); ?>" class="img-fluid">
<?php endif; ?>
<span class="case-card-title"><?php the_title(); ?></span>
</a>
<?php endwhile; wp_reset_postdata(); ?>
<div
class="b2b-carousel cases-carousel mt-5"
data-carousel
data-autoplay="9000"
data-page-label="<?php esc_attr_e( '转到第 %d 组', 'fragrance-trade' ); ?>"
role="region"
aria-roledescription="carousel"
aria-label="<?php esc_attr_e( '案例作品', 'fragrance-trade' ); ?>"
>
<div class="b2b-carousel-viewport">
<div class="case-grid b2b-carousel-track">
<?php
$count = 1;
$total_items = $case_query->post_count;
while ( $case_query->have_posts() ) :
$case_query->the_post();
?>
<a
class="case-card b2b-carousel-slide"
href="<?php the_permalink(); ?>"
role="group"
aria-roledescription="slide"
aria-label="<?php echo esc_attr( sprintf( '%1$d / %2$d', $count, $total_items ) ); ?>"
>
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'large', array( 'class' => 'img-fluid', 'loading' => 'lazy', 'decoding' => 'async' ) ); ?>
<?php else : ?>
<img src="<?php echo esc_url( fragrance_trade_asset_uri( 'images/products/placeholder-01.svg' ) ); ?>" alt="<?php the_title_attribute(); ?>" class="img-fluid" loading="lazy" decoding="async">
<?php endif; ?>
<span class="case-card-title"><?php the_title(); ?></span>
</a>
<?php
$count++;
endwhile;
wp_reset_postdata();
?>
</div>
</div>
<div class="b2b-carousel-controls" aria-label="<?php esc_attr_e( '案例作品轮播控制', 'fragrance-trade' ); ?>">
<button type="button" class="b2b-carousel-arrow b2b-carousel-prev" aria-label="<?php esc_attr_e( '上一组案例', 'fragrance-trade' ); ?>">
<span aria-hidden="true">←</span>
</button>
<div class="b2b-carousel-dots"></div>
<button type="button" class="b2b-carousel-arrow b2b-carousel-next" aria-label="<?php esc_attr_e( '下一组案例', 'fragrance-trade' ); ?>">
<span aria-hidden="true">→</span>
</button>
</div>
</div>
<div class="text-center mt-5">
<a href="<?php echo esc_url( home_url( '/cases/' ) ); ?>" class="btn btn-b2b-primary"><?php esc_html_e( '查看全部案例', 'fragrance-trade' ); ?></a>