draft new home page
This commit is contained in:
+267
@@ -0,0 +1,267 @@
|
||||
<?php
|
||||
/**
|
||||
* Front Page template
|
||||
*
|
||||
* Renders the SEWJOY shopping homepage. Self-contained — does not call
|
||||
* get_header() / get_footer() so the brand nav and footer can match the
|
||||
* custom design system without affecting other templates.
|
||||
*
|
||||
* @package SewJoy_Theme
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;700&display=swap" rel="stylesheet">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class( 'home-page' ); ?>>
|
||||
<?php wp_body_open(); ?>
|
||||
|
||||
<div class="home">
|
||||
|
||||
<!-- ============================================
|
||||
NAV
|
||||
============================================ -->
|
||||
<header class="home-nav" role="banner">
|
||||
<a class="home-nav__logo" href="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<?php bloginfo( 'name' ); ?>
|
||||
</a>
|
||||
|
||||
<nav class="home-nav__menu" aria-label="<?php esc_attr_e( 'Primary', 'sewjoy-theme' ); ?>">
|
||||
<?php
|
||||
$fallback_items = array( 'SHOP', 'DESIGN YOURS', 'FABRICS', 'MEMBERSHIP', 'COMMUNITY', 'ABOUT' );
|
||||
$has_menu = has_nav_menu( 'menu-1' );
|
||||
|
||||
if ( $has_menu ) {
|
||||
wp_nav_menu( array(
|
||||
'theme_location' => 'menu-1',
|
||||
'container' => false,
|
||||
'menu_class' => 'home-nav__menu-list',
|
||||
'depth' => 1,
|
||||
'fallback_cb' => false,
|
||||
) );
|
||||
} else {
|
||||
echo '<ul class="home-nav__menu-list">';
|
||||
foreach ( $fallback_items as $item ) {
|
||||
printf(
|
||||
'<li><a href="%s">%s</a></li>',
|
||||
esc_url( home_url( '/' ) ),
|
||||
esc_html( $item )
|
||||
);
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
?>
|
||||
</nav>
|
||||
|
||||
<div class="home-nav__icons" aria-label="<?php esc_attr_e( 'Account', 'sewjoy-theme' ); ?>">
|
||||
<button type="button" class="home-nav__icon" aria-label="<?php esc_attr_e( 'Search', 'sewjoy-theme' ); ?>">⌕</button>
|
||||
<button type="button" class="home-nav__icon" aria-label="<?php esc_attr_e( 'Wishlist', 'sewjoy-theme' ); ?>">♡</button>
|
||||
<button type="button" class="home-nav__icon" aria-label="<?php esc_attr_e( 'Cart', 'sewjoy-theme' ); ?>">▢</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="home-nav__divider" role="presentation"></div>
|
||||
|
||||
<!-- ============================================
|
||||
HERO 1 — MAKE CREATION WEARABLE
|
||||
============================================ -->
|
||||
<section class="hero hero--primary" aria-labelledby="hero-1-heading">
|
||||
<div class="hero__content">
|
||||
<h1 id="hero-1-heading" class="hero__heading">MAKE CREATION WEARABLE</h1>
|
||||
<p class="hero__sub">Timeless pieces. Designed by you. Made to be loved.</p>
|
||||
|
||||
<ul class="hero__badges">
|
||||
<li class="hero-badge">
|
||||
<span class="hero-badge__dot" aria-hidden="true"></span>
|
||||
<div class="hero-badge__body">
|
||||
<span class="hero-badge__title">CUSTOM MADE</span>
|
||||
<span class="hero-badge__desc">Design your unique style in just 3 steps</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="hero-badge">
|
||||
<span class="hero-badge__dot" aria-hidden="true"></span>
|
||||
<div class="hero-badge__body">
|
||||
<span class="hero-badge__title">PREMIUM QUALITY</span>
|
||||
<span class="hero-badge__desc">Carefully selected fabrics & craftsmanship</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="hero-badge">
|
||||
<span class="hero-badge__dot" aria-hidden="true"></span>
|
||||
<div class="hero-badge__body">
|
||||
<span class="hero-badge__title">SUSTAINABLE</span>
|
||||
<span class="hero-badge__desc">Made to order, less waste, more care</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="hero__placeholder" aria-hidden="true"></div>
|
||||
</div>
|
||||
|
||||
<div class="hero__big-number" aria-hidden="true">01</div>
|
||||
<div class="hero__caption">CRAFTED FOR MAKERS</div>
|
||||
</section>
|
||||
|
||||
<div class="section-break" role="presentation"></div>
|
||||
|
||||
<!-- ============================================
|
||||
HERO 2 — Sew Your Style, Wear Your Story
|
||||
============================================ -->
|
||||
<section class="hero hero--secondary" aria-labelledby="hero-2-heading">
|
||||
<div class="hero__content">
|
||||
<h2 id="hero-2-heading" class="hero__heading hero__heading--large">Sew Your Style,<br>Wear Your Story.</h2>
|
||||
<p class="hero__sub">DIY Clothing Kit. Made for Everyone.</p>
|
||||
|
||||
<ul class="hero__features">
|
||||
<li class="hero-feature">
|
||||
<span class="hero-feature__icon" aria-hidden="true">○</span>
|
||||
<span class="hero-feature__label">GLOBAL DESIGNS</span>
|
||||
</li>
|
||||
<li class="hero-feature">
|
||||
<span class="hero-feature__icon" aria-hidden="true">○</span>
|
||||
<span class="hero-feature__label">BEGINNER FRIENDLY</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a class="cta-button" href="<?php echo esc_url( home_url( '/shop' ) ); ?>">
|
||||
<span>Shop the Collection</span>
|
||||
<span aria-hidden="true">→</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="hero__big-number" aria-hidden="true">02</div>
|
||||
<div class="hero__caption">DESIGNED BY YOU</div>
|
||||
</section>
|
||||
|
||||
<div class="section-break" role="presentation"></div>
|
||||
|
||||
<!-- ============================================
|
||||
TAILORED BOND — 3 cards
|
||||
============================================ -->
|
||||
<section class="tailored-bond" aria-labelledby="tailored-bond-heading">
|
||||
<header class="tailored-bond__header">
|
||||
<h2 id="tailored-bond-heading" class="tailored-bond__heading">TAILORED FOR EVERY BOND</h2>
|
||||
<p class="tailored-bond__subtitle">为每一份珍贵的爱,量身定制</p>
|
||||
</header>
|
||||
|
||||
<div class="tailored-bond__cards">
|
||||
<article class="bond-card bond-card--personal">
|
||||
<span class="bond-card__num" aria-hidden="true">01</span>
|
||||
<div class="bond-card__body">
|
||||
<span class="bond-card__index">01</span>
|
||||
<h3 class="bond-card__title-cn">个人系列</h3>
|
||||
<span class="bond-card__title-en">PERSONAL</span>
|
||||
<p class="bond-card__desc">为自己设计<br>独一无二的风尚</p>
|
||||
</div>
|
||||
<a class="bond-card__cta" href="#">
|
||||
<span>DESIGN NOW</span>
|
||||
<span aria-hidden="true">→</span>
|
||||
</a>
|
||||
<span class="bond-card__big-num" aria-hidden="true">01</span>
|
||||
</article>
|
||||
|
||||
<article class="bond-card bond-card--parent-kid">
|
||||
<span class="bond-card__num" aria-hidden="true">02</span>
|
||||
<div class="bond-card__body">
|
||||
<span class="bond-card__index">02</span>
|
||||
<h3 class="bond-card__title-cn">亲子系列</h3>
|
||||
<span class="bond-card__title-en">PARENT & KID</span>
|
||||
<p class="bond-card__desc">爱的服装穿搭<br>记录成长的每一刻</p>
|
||||
</div>
|
||||
<a class="bond-card__cta" href="#">
|
||||
<span>DESIGN NOW</span>
|
||||
<span aria-hidden="true">→</span>
|
||||
</a>
|
||||
<span class="bond-card__big-num" aria-hidden="true">02</span>
|
||||
</article>
|
||||
|
||||
<article class="bond-card bond-card--pet">
|
||||
<span class="bond-card__num" aria-hidden="true">03</span>
|
||||
<div class="bond-card__body">
|
||||
<span class="bond-card__index">03</span>
|
||||
<h3 class="bond-card__title-cn">主宠系列</h3>
|
||||
<span class="bond-card__title-en">PET</span>
|
||||
<p class="bond-card__desc">舒适的同时兼具<br>给主子最好的爱</p>
|
||||
</div>
|
||||
<a class="bond-card__cta" href="#">
|
||||
<span>DESIGN NOW</span>
|
||||
<span aria-hidden="true">→</span>
|
||||
</a>
|
||||
<span class="bond-card__big-num" aria-hidden="true">03</span>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ============================================
|
||||
FOOTER
|
||||
============================================ -->
|
||||
<footer class="home-footer" role="contentinfo">
|
||||
<div class="home-footer__top">
|
||||
<div class="home-footer__logo-group">
|
||||
<span class="home-footer__logo"><?php bloginfo( 'name' ); ?></span>
|
||||
<span class="home-footer__tagline">HANDMADE GOODS</span>
|
||||
</div>
|
||||
|
||||
<ul class="home-footer__socials" aria-label="<?php esc_attr_e( 'Social media', 'sewjoy-theme' ); ?>">
|
||||
<li><a href="#" aria-label="Pinterest">P</a></li>
|
||||
<li><a href="#" aria-label="Facebook">F</a></li>
|
||||
<li><a href="#" aria-label="Instagram">I</a></li>
|
||||
<li><a href="#" aria-label="YouTube">Y</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="home-footer__divider" role="presentation"></div>
|
||||
|
||||
<div class="home-footer__grid">
|
||||
<div class="home-footer__col">
|
||||
<h4>SHOP</h4>
|
||||
<ul>
|
||||
<li><a href="#">Custom Clothing</a></li>
|
||||
<li><a href="#">Design Library</a></li>
|
||||
<li><a href="#">Gift Cards</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="home-footer__col">
|
||||
<h4>BRAND</h4>
|
||||
<ul>
|
||||
<li><a href="#">Our Story</a></li>
|
||||
<li><a href="#">Craftsmanship</a></li>
|
||||
<li><a href="#">Sustainability</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="home-footer__col">
|
||||
<h4>HELP</h4>
|
||||
<ul>
|
||||
<li><a href="#">Size Guide</a></li>
|
||||
<li><a href="#">Shipping</a></li>
|
||||
<li><a href="#">Returns</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="home-footer__col">
|
||||
<h4>COMMUNITY</h4>
|
||||
<ul>
|
||||
<li><a href="#">Makers Hub</a></li>
|
||||
<li><a href="#">Pattern Library</a></li>
|
||||
<li><a href="#">Tutorials</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="home-footer__divider" role="presentation"></div>
|
||||
|
||||
<div class="home-footer__bottom">
|
||||
<span>© <?php echo esc_html( date( 'Y' ) ); ?> <?php bloginfo( 'name' ); ?></span>
|
||||
<span>Privacy · Terms · Cookies</span>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div><!-- .home -->
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user