header.txt
<div class="container header-inner">
<a class="logo" href="<?php $this->options->siteUrl(); ?>">
<?php echo ($this->options->logoText) ? $this->options->logoText : $this->options->title(); ?>
</a>
<nav class="site-nav" id="site-nav">
<a<?php if ($this->is('index')): ?> class="active"<?php endif; ?> href="<?php $this->options->siteUrl(); ?>"><?php _e('Home'); ?></a>
<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
<?php while ($pages->next()): ?>
<a<?php if ($this->is('page', $pages->slug)): ?> class="active"<?php endif; ?> href="<?php $pages->permalink(); ?>"><?php $pages->title(); ?></a>
<?php endwhile; ?>
</nav>
<div class="header-actions">
<button class="theme-toggle" id="theme-toggle" aria-label="切换主题">
<svg class="icon-sun" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></svg>
<svg class="icon-moon" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></svg>
</button>
<button class="nav-toggle" id="nav-toggle" aria-label="菜单">
<span></span><span></span><span></span>
</button>
</div>
</div>
No comments yet.
Comments are closed.