mirror of https://gitlab.com/curben/blog
feat(theme-nav): remove nav link for current page
This commit is contained in:
parent
bc3823248f
commit
f9889702b7
|
@ -1,5 +1,5 @@
|
|||
<article id="<%= post.layout %>-<%= post.slug %>" class="h-entry article article-type-<%= post.layout %>" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
|
||||
<%- partial('_partial/header', {}, { cache: true }) %>
|
||||
<%- partial('_partial/header', {}, { cache: false }) %>
|
||||
<hr class="header-hr">
|
||||
<div class="article-inner">
|
||||
<%- partial('post/gallery') %>
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
<% 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">
|
||||
|
@ -51,7 +55,11 @@
|
|||
<% 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>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="archive-container">
|
||||
<%- partial('_partial/header', {}, { cache: true }) %>
|
||||
<%- partial('_partial/header', {}, { cache: false }) %>
|
||||
<hr class="header-hr"/>
|
||||
<%- partial('_partial/archive', {pagination: config.archive, index: true}) %>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="archive-container">
|
||||
<%- partial('_partial/header', {}, { cache: true }) %>
|
||||
<%- partial('_partial/header', {}, { cache: false }) %>
|
||||
<hr class="header-hr"/>
|
||||
<h2>Recent posts:</h2>
|
||||
<%- list_posts({
|
||||
|
|
Loading…
Reference in New Issue