feat: release news and store experience updates
This commit is contained in:
@@ -22,28 +22,54 @@ if ( ! $service_query->have_posts() ) {
|
||||
<p class="section-eyebrow"><?php esc_html_e( '服务项目', 'fragrance-trade' ); ?></p>
|
||||
<h2><?php esc_html_e( '按车型与需求选择贴膜方案', 'fragrance-trade' ); ?></h2>
|
||||
</div>
|
||||
<div class="capability-grid mt-5">
|
||||
<?php
|
||||
$count = 1;
|
||||
while ( $service_query->have_posts() ) :
|
||||
$service_query->the_post();
|
||||
$image = get_post_meta( get_the_ID(), '_service_image', true );
|
||||
$fallback = 'images/products/placeholder-0' . ( $count < 10 ? $count : 1 ) . '.svg';
|
||||
?>
|
||||
<article class="capability-card">
|
||||
<div class="capability-image"><a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) : ?><?php the_post_thumbnail( 'fragrance-capability', array( 'class' => 'img-fluid', 'loading' => 'lazy', 'decoding' => 'async' ) ); ?><?php else : ?><img src="<?php echo esc_url( $image ? $image : fragrance_trade_asset_uri( $fallback ) ); ?>" alt="<?php the_title_attribute(); ?>" class="img-fluid" loading="lazy" decoding="async"><?php endif; ?></a></div>
|
||||
<div class="capability-body">
|
||||
<p class="capability-label"><?php esc_html_e( '贴膜服务', 'fragrance-trade' ); ?></p>
|
||||
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
|
||||
<p><?php echo esc_html( get_the_excerpt() ); ?></p>
|
||||
<a href="<?php echo esc_url( home_url( '/contact/' ) ); ?>" class="btn btn-b2b-outline"><?php esc_html_e( '联系门店', 'fragrance-trade' ); ?></a>
|
||||
</div>
|
||||
</article>
|
||||
<?php
|
||||
$count++;
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
<div
|
||||
class="b2b-carousel services-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="capability-grid b2b-carousel-track">
|
||||
<?php
|
||||
$count = 1;
|
||||
$total_items = $service_query->post_count;
|
||||
while ( $service_query->have_posts() ) :
|
||||
$service_query->the_post();
|
||||
$fallback = 'products/placeholder-0' . ( $count < 10 ? $count : 1 ) . '.svg';
|
||||
?>
|
||||
<article
|
||||
class="capability-card b2b-carousel-slide"
|
||||
role="group"
|
||||
aria-roledescription="slide"
|
||||
aria-label="<?php echo esc_attr( sprintf( '%1$d / %2$d', $count, $total_items ) ); ?>"
|
||||
>
|
||||
<div class="capability-image"><a href="<?php the_permalink(); ?>"><?php echo fragrance_trade_service_card_image( get_the_ID(), $fallback ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></a></div>
|
||||
<div class="capability-body">
|
||||
<p class="capability-label"><?php esc_html_e( '贴膜服务', 'fragrance-trade' ); ?></p>
|
||||
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
|
||||
<p><?php echo esc_html( get_the_excerpt() ); ?></p>
|
||||
<a href="<?php echo esc_url( home_url( '/contact/' ) ); ?>" class="btn btn-b2b-outline"><?php esc_html_e( '联系门店', 'fragrance-trade' ); ?></a>
|
||||
</div>
|
||||
</article>
|
||||
<?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( '/services/' ) ); ?>" class="btn btn-b2b-primary"><?php esc_html_e( '查看全部服务项目', 'fragrance-trade' ); ?></a>
|
||||
|
||||
Reference in New Issue
Block a user