You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
4.0 KiB
83 lines
4.0 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="google-site-verification" content="VTDXX0ynO2pR8Q27XRQFRY4tY_Q76Dt5TIYkvlaw_CI" />
|
|
<title><?php bloginfo('name'); ?></title>
|
|
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
|
|
<?php wp_head(); ?>
|
|
</head>
|
|
<body <?php body_class('no-js'); ?>>
|
|
<nav class="main-nav">
|
|
<div class="nav-container">
|
|
<div class="nav-logo">
|
|
<a href="<?php echo home_url(); ?>">
|
|
<?php
|
|
$logo = get_theme_option('site_logo');
|
|
if ($logo): ?>
|
|
<img src="<?php echo esc_url($logo); ?>" alt="<?php bloginfo('name'); ?>">
|
|
<?php else: ?>
|
|
<img src="<?php bloginfo('template_url'); ?>/assets/images/logo-1.svg" alt="logo">
|
|
<?php endif; ?>
|
|
</a>
|
|
</div>
|
|
|
|
<button class="menu-toggle" aria-label="菜单">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
</button>
|
|
|
|
<div class="nav-right">
|
|
<div class="nav-menu">
|
|
<?php
|
|
wp_nav_menu(array(
|
|
'theme_location' => 'primary-menu',
|
|
'container' => false,
|
|
'menu_class' => 'menu-items',
|
|
'walker' => new Custom_Walker_Nav_Menu(),
|
|
'fallback_cb' => function() {
|
|
echo '<ul class="menu-items"><li><a href="' . admin_url('nav-menus.php') . '">添加菜单</a></li></ul>';
|
|
}
|
|
));
|
|
?>
|
|
</div>
|
|
|
|
<!-- 搜索按钮 -->
|
|
<div class="nav-search">
|
|
<button class="search-toggle" aria-label="搜索" id="searchToggle">
|
|
<svg class="search-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="11" cy="11" r="8"></circle>
|
|
<path d="m21 21-4.35-4.35"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- 搜索框弹出层 -->
|
|
<div class="search-overlay" id="searchOverlay">
|
|
<div class="search-container">
|
|
<div class="search-box">
|
|
<form role="search" method="get" action="<?php echo home_url('/'); ?>" class="search-form">
|
|
<div class="search-input-wrapper">
|
|
<svg class="search-input-icon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="11" cy="11" r="8"></circle>
|
|
<path d="m21 21-4.35-4.35"></path>
|
|
</svg>
|
|
<input type="search" name="s" placeholder="搜索内容..." class="search-input" id="searchInput" autocomplete="off">
|
|
<button type="button" class="search-close" id="searchClose" aria-label="关闭搜索">
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<line x1="18" y1="6" x2="6" y2="18"></line>
|
|
<line x1="6" y1="6" x2="18" y2="18"></line>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<button type="submit" class="search-submit">搜索</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|