新增两个页面

This commit is contained in:
2026-06-25 22:35:37 +08:00
parent dfae260a1e
commit 59a418e94b
6 changed files with 502 additions and 103 deletions
+71
View File
@@ -0,0 +1,71 @@
<?php
/**
* Shared brand footer.
*
* Used by front-page.php and page-templates/page-shop.php. Emits the
* cream-background footer: top row (logo + tagline / 4 social pills),
* 4-column link grid (SHOP / BRAND / HELP / COMMUNITY), bottom row
* (copyright + legal links).
*
* @package SewJoy_Theme
*/
?>
<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 &nbsp;·&nbsp; Terms &nbsp;·&nbsp; Cookies</span>
</div>
</footer>
+50
View File
@@ -0,0 +1,50 @@
<?php
/**
* Shared brand nav.
*
* Used by front-page.php and page-templates/page-shop.php. Emits the
* cream-background nav: SEWJOY logo (wp_nav_menu 'menu-1' with a hardcoded
* fallback) + 3 account icons + 1px hairline divider.
*
* @package SewJoy_Theme
*/
?>
<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>