mirror of https://gitlab.com/curben/blog
68 lines
2.9 KiB
Plaintext
68 lines
2.9 KiB
Plaintext
<header id="header" class="header">
|
|
<%/* Nav menu for desktop */%>
|
|
<nav class="main-nav">
|
|
<% if (!theme.menu) { %><a class="main-nav-link" href="<%- config.root %>">Home</a>
|
|
<% } else { %>
|
|
<% for (const i in theme.menu) { %>
|
|
<% if (url_for(theme.menu[i]) !== url_for(page.path)) { %>
|
|
<a class="main-nav-link" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
|
|
<% } else { %>
|
|
<span class="main-nav-link"><%= i %></span>
|
|
<% } %>
|
|
<% }} %>
|
|
|
|
<div class="search-container">
|
|
<form id="searchForm" method="post" action="https://duckduckgo.com/" target="_blank" rel="noopener external nofollow noreferrer">
|
|
<input type="text" name="q" class="search-box" placeholder="Search..." title="Powered by DuckDuckGo">
|
|
<input type="hidden" name="sites" value="<%- config.url.replace(/^http(s)?:\/\//, '') %>">
|
|
<input type="hidden" name="kd" value="-1">
|
|
<input type="hidden" name="kg" value="p">
|
|
<input type="hidden" name="kae" value="#000">
|
|
<a class="search-button no-underline" id="search-click">
|
|
<svg viewBox="0 0 512 512">
|
|
<title>Powered by DuckDuckGo</title>
|
|
<desc>Search icon</desc>
|
|
<use href="/svg/search.svg#search"/>
|
|
</svg>
|
|
</a>
|
|
</form>
|
|
</div>
|
|
</nav>
|
|
<%/* Nav menu for mobile */%>
|
|
<nav class="mobile-nav">
|
|
<h1 class="site-title"><a href="<%- config.root %>"><%= config.title %></a></h1>
|
|
<ul class="mobile-nav-menu">
|
|
<label for="mobile-menu-toggle"><a class="no-underline" id="menu-button">☰</a></label>
|
|
<input id="mobile-menu-toggle" type="checkbox"/>
|
|
<ul id="mobile-nav-link">
|
|
<div class="search-container">
|
|
<form id="searchFormMob" method="post" action="https://duckduckgo.com/" target="_blank" rel="noopener external nofollow noreferrer">
|
|
<input type="text" name="q" class="search-box" placeholder="Search..." title="Powered by DuckDuckGo">
|
|
<input type="hidden" name="sites" value="<%- config.url.replace(/^http(s)?:\/\//, '') %>">
|
|
<input type="hidden" name="kd" value="-1">
|
|
<input type="hidden" name="kg" value="p">
|
|
<input type="hidden" name="kae" value="#000">
|
|
<a class="search-button no-underline" id="search-click-mobile">
|
|
<svg viewBox="0 0 512 512">
|
|
<title>Powered by DuckDuckGo</title>
|
|
<desc>Search icon</desc>
|
|
<use href="/svg/search.svg#search"/>
|
|
</svg>
|
|
</a>
|
|
</form>
|
|
</div>
|
|
<i>Powered by DuckDuckGo</i>
|
|
<% if (!theme.menu) { %><a class="mobile-nav-link-a" href="<%- config.root %>">Home</a>
|
|
<% } else { %>
|
|
<% for (const i in theme.menu) { %>
|
|
<% if (url_for(theme.menu[i]) !== url_for(page.path)) { %>
|
|
<a class="mobile-nav-link-a" href="<%- url_for(theme.menu[i]) %>"><%= i %></a>
|
|
<% } else { %>
|
|
<span class="mobile-nav-link-a"><%= i %></span>
|
|
<% } %>
|
|
<% }} %>
|
|
</ul>
|
|
</ul>
|
|
</nav>
|
|
</header>
|