diff options
| author | somhairle <[email protected]> | 2026-04-21 20:40:27 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-05-24 17:24:57 +0800 |
| commit | ad8f9f55ea79a4d587aecc69698808da82de3d62 (patch) | |
| tree | d25c0db712e6f015d850627ff957edea44c64f94 /themes/theme/layout/partials/header.ejs | |
| download | blog-ad8f9f55ea79a4d587aecc69698808da82de3d62.tar.gz | |
二〇二六年四月二十一日
Diffstat (limited to 'themes/theme/layout/partials/header.ejs')
| -rw-r--r-- | themes/theme/layout/partials/header.ejs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/themes/theme/layout/partials/header.ejs b/themes/theme/layout/partials/header.ejs new file mode 100644 index 00000000..97752d9e --- /dev/null +++ b/themes/theme/layout/partials/header.ejs @@ -0,0 +1,42 @@ +<div class="header"> + <div class="flex-container"> + <div class="header-inner"> + <div class="site-brand-container"> + <a href="<%= url_for()%>"> + <% if (theme.logo_image.enable) {%> + <img class="logo-img" src="<%= url_for(theme.logo_image.image_path)%>" alt="logo_image"> + <%} else {%> + <%= theme.site_brand_name %> + <% } %> + </a> + </div> + <div id="menu-btn" class="menu-btn" onclick="toggleMenu()"> + 菜单 + </div> + <nav class="site-nav"> + <ul class="menu-list"> + <% Object.keys(theme.menu).forEach(key=> { %> + <% if (url_for(theme.menu[key]) + "index.html"==url_for(page.path)) {%> + <li class="menu-item menu-item-active"> + <a href="<%=url_for(theme.menu[key])%>"> + <%=key%> + </a> + </li> + <%} else {%> + <li class="menu-item"> + <a href="<%=url_for(theme.menu[key])%>"> + <%=key%> + </a> + </li> + <% }%> + <% }); %> + <% if (theme.local_search.enable) {%> + <li class="menu-item"> + <a href="/search">搜索</a> + </li> + <% } %> + </ul> + </nav> + </div> + </div> +</div> |
