summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorDoge <[email protected]>2021-05-25 12:43:31 +0800
committerDoge <[email protected]>2021-05-25 12:43:31 +0800
commite2aca21e9fd603dddb4e40c4ea6636343284699f (patch)
tree39cc67186c8b490d91c0a3225dbe3d84a52ec776 /layout
parent47ae03bba904cd6fb068121198c50d1bb59c5932 (diff)
downloadchromate-e2aca21e9fd603dddb4e40c4ea6636343284699f.tar.gz
chromate-e2aca21e9fd603dddb4e40c4ea6636343284699f.tar.bz2
chromate-e2aca21e9fd603dddb4e40c4ea6636343284699f.zip
Add sub nav configuration
Diffstat (limited to 'layout')
-rw-r--r--layout/_partial/header.ejs41
1 files changed, 34 insertions, 7 deletions
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 @@
</p>
<p class="subtitle is-size-6">
<%- config.description %>
- <div>
+ <% if (theme.subnav) { %>
+ <div class="container is-uppercase subnav-top">
+ <% } else { %>
+ <div class="container is-uppercase">
+ <% } %>
<% for (let index in theme.navbar) { %>
<%
const mapping = theme.navbar[index];
@@ -66,13 +70,36 @@
</a>
<% } %>
</div>
+ <% if (theme.subnav) { %>
+ <div class="container is-uppercase">
+ <div class="columns subnav-bottom">
+ <div class="column is-10-mobile is-offset-1-mobile is-one-third is-offset-one-third" style="padding: 0%;">
+ <% 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) { %>
+ <a class="mr-2" href="<%= link %>" target="_blank" rel="noopener noreferrer">
+ <% } else { %>
+ <a class="mr-2" href="<%= link %>">
+ <% } %>
+ <span class="icon-text">
+ <span class="icon">
+ <i class="<%= favicon %>"></i>
+ </span>
+ <span><%= description %></span>
+ </span>
+ </a>
+ <% } %>
+ </div>
+ </div>
+ </div>
+ <% } %>
</p>
</div>
</div>
-
- <% if (is_home()) { %>
- <div class="hero-foot">
-
- </div>
- <% } %>
</section> \ No newline at end of file