Files
pengzhan.dev/views/partials/header.ejs
T
haopengzhan f52b3fe9e4 feat(migration): complete WordPress migration and UX refinements
- Migrate historical posts, localized assets, and 103 comments
- Colocate media into posts/<slug>/images/ and remove wp-content
- Add native bilingual support for ai-can-change post (English default, /zh variant)
- Support clean taxonomy routing (/category/:category and /tag/:tag)
- Dynamically populate categories and tags in sitemap.xml
- Fix header scroll padding/margin offsets for anchor and reference links
- Constrain image and media widths to prevent content overflow
- Redesign homepage recent posts to 4 compact editorial cards
- Restore valid binary favicon.ico and high-res icon assets
- Remove placeholder content and sample test comments
2026-09-16 23:09:09 -07:00

40 lines
1.4 KiB
Plaintext

<header class="site-header">
<div class="container header-inner">
<a href="/" class="brand">
<span class="brand-title"><%= site.title %></span>
</a>
<!-- Desktop Navigation -->
<nav class="site-nav desktop-nav">
<% (navigation || []).forEach(item => {
const isActive = (currentPath === item.path) || (item.path !== '/' && currentPath.startsWith(item.path));
%>
<a href="<%= item.path %>" class="nav-link <%= isActive ? 'active' : '' %>">
<%= item.label %>
</a>
<% }) %>
</nav>
<!-- Mobile Hamburger Toggle Button -->
<button type="button" class="mobile-menu-toggle" id="mobile-menu-toggle" aria-label="Toggle Navigation Menu" aria-expanded="false">
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
<span class="hamburger-line"></span>
</button>
</div>
<!-- Mobile Slide-Down Drawer -->
<div class="mobile-nav-drawer" id="mobile-nav-drawer">
<nav class="mobile-nav-links">
<% (navigation || []).forEach(item => {
const isActive = (currentPath === item.path) || (item.path !== '/' && currentPath.startsWith(item.path));
%>
<a href="<%= item.path %>" class="mobile-nav-link <%= isActive ? 'active' : '' %>">
<span><%= item.label %></span>
<span class="mobile-nav-arrow">&rarr;</span>
</a>
<% }) %>
</nav>
</div>
</header>