From e2aca21e9fd603dddb4e40c4ea6636343284699f Mon Sep 17 00:00:00 2001
From: Doge
Date: Tue, 25 May 2021 12:43:31 +0800
Subject: Add sub nav configuration
---
layout/_partial/header.ejs | 41 ++++++++++++++++++++++++++++++++++-------
1 file changed, 34 insertions(+), 7 deletions(-)
(limited to 'layout')
diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs
index a9d9dbd..aeaed58 100644
--- a/layout/_partial/header.ejs
+++ b/layout/_partial/header.ejs
@@ -43,7 +43,11 @@
<%- config.description %>
-
+ <% if (theme.subnav) { %>
+
+ <% } else { %>
+
+ <% } %>
<% for (let index in theme.navbar) { %>
<%
const mapping = theme.navbar[index];
@@ -66,13 +70,36 @@
<% } %>
+ <% if (theme.subnav) { %>
+
+
+
+ <% for (let index in theme.subnav) { %>
+ <%
+ const mapping = theme.subnav[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 (is_home()) { %>
-
- <% } %>
\ No newline at end of file
--
cgit v1.2.3