-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsidebar.ejs
More file actions
46 lines (46 loc) · 1.58 KB
/
sidebar.ejs
File metadata and controls
46 lines (46 loc) · 1.58 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
<div class="sm-12 md-4 col sidebar">
<div class="paper info-container">
<img src="<%= themeConfig.domain %>/images/avatar.png?v=<%= site.utils.now %>" class="no-responsive avatar">
<div class="text-muted"><%- themeConfig.siteDescription %></div>
<div class="social-container">
<% ['github', 'twitter', 'weibo', 'zhihu', 'facebook'].forEach((item) => { %>
<% if (site.customConfig[item]) { %>
<a href="<%= site.customConfig[item] %>" target="_blank">
<i class="fab fa-<%= item %>"></i>
</a>
<% } %>
<% }) %>
</div>
</div>
<div class="paper">
<div class="sidebar-title">
<%= site.customConfig.latestArticleText || '最新文章' %>
</div>
<div class="row">
<ul>
<% site.posts.forEach(function(post, index) { %>
<% if (index < 10 && !post.hideInList) { %>
<li>
<a href="<%= post.link %>"><%= post.title %></a>
</li>
<% } %>
<% }); %>
</ul>
</div>
</div>
<div class="paper">
<div class="sidebar-title">
<%= site.customConfig.tagListText || '标签列表' %>
</div>
<div class="row">
<% site.tags.forEach(function(tag, tagIndex) { %>
<a href="<%= tag.link %>" class="badge <%= ['', 'secondary', 'success', 'warning', 'secondary'][Math.floor(Math.random()*5)] %>">
<%= tag.name %>
</a>
<% }); %>
</div>
</div>
<div class="paper">
<%- themeConfig.footerInfo %> | <a class="rss" href="<%= themeConfig.domain %>/atom.xml" target="_blank">RSS</a>
</div>
</div>