summaryrefslogtreecommitdiff
path: root/layout/_partial/header.ejs
blob: 32d2d2a01352062699f2841c56cd5143c5d9ddf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<header class="header">
    <div class="header-topbar">
        <div class="header-title">
            <%= config.title %>
        </div>
        <div class="header-menu">
            <% for (let item of theme.menubar) { %>
                <a href="<%= item[0] %>"><%= item[1] %></a>
            <% } %> 
        </div>
    </div>
    <% if (theme.logo) { %>
        <div class="header-logo" style="background-image: url('<%= theme.logo %>');"></div>
    <% } %>  
    <div class="header-desc">
        <%= config.description %> 
    </div>
    <nav class="header-navbar">
        <ul class="header-menu">
            <% for (let index in theme.navbar) { %>
                <% 
                    const mapping = theme.navbar[index];
                    const link = mapping[0];
                    const favicon = mapping[1];
                    let outter = link.startsWith("https://") ? true : false;
                %>
                <a href="<%= link %>" target="<%= outter ? '_blank' : '_self' %>">
                    <i class="<%= favicon %>"></i>
                </a>
            <% } %>
        </ul>
    </nav>
</header>