From 7130d47a2cf4cf256ae927dafc411befab50334c Mon Sep 17 00:00:00 2001
From: Doge
Date: Fri, 28 May 2021 10:24:29 +0800
Subject: Add sub-navbar support
---
layout/_partial/header.ejs | 58 +++++++++++++++++++++++++---------------------
1 file changed, 32 insertions(+), 26 deletions(-)
(limited to 'layout')
diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs
index 6a61396..b32edbb 100644
--- a/layout/_partial/header.ejs
+++ b/layout/_partial/header.ejs
@@ -43,33 +43,39 @@
<%- config.description %>
- <% if (theme.subnav) { %>
-
- <% } else { %>
-
- <% } %>
- <% for (let index in theme.navbar) { %>
- <%
- const mapping = theme.navbar[index];
- const link = mapping[0];
- const favicon = mapping[1];
- const description = mapping[2];
- let outter = link.startsWith("https://") ? true : false;
- %>
- <% if (outter) { %>
-
- <% } else { %>
-
- <% } %>
-
-
-
-
- <%= description %>
-
-
+ <% if (theme.navbar) { %>
+ <% if (theme.subnav) { %>
+
+ <% } else { %>
+
<% } %>
-
+
+
+ <% for (let index in theme.navbar) { %>
+ <%
+ const mapping = theme.navbar[index];
+ const link = mapping[0];
+ const favicon = mapping[1];
+ const description = mapping[2];
+ let outter = link.startsWith("https://") ? true : false;
+ %>
+ <% if (outter) { %>
+
+ <% } else { %>
+
+ <% } %>
+
+
+
+
+ <%= description %>
+
+
+ <% } %>
+
+
+
+ <% } %>
<% if (theme.subnav) { %>