Skip to content

Commit

Permalink
feat: add support for sspai and bilibili (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexmoe committed Oct 2, 2022
2 parents bfe9257 + 684aa39 commit 3e79add
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
20 changes: 17 additions & 3 deletions layout/_partial/_post/meta.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="nexmoe-post-meta">
<div class="nexmoe-rainbow">
<a><i class="nexmoefont icon-calendar-fill"></i><%- date(page.date, "YYYY年MM月DD日") %></a>
<a class="nexmoefont icon-calendar-fill"><%- date(page.date, "YYYY年MM月DD日") %></a>
<% if (page.categories && page.categories.length){ %>
<%- list_categories(page.categories, {
show_count: false,
Expand All @@ -13,9 +13,23 @@
</div>

<% if (page.wechat){ %>
<a class="wechat" href="<%- page.wechat %>" target="_blank"><i class="nexmoefont icon-wechat-fill"></i>微信</a>
<a class="wechat" href="<%- page.wechat %>" target="_blank">
<i class="nexmoefont icon-wechat-fill"></i>
</a>
<% } %>
<% if (page.zhihu){ %>
<a class="zhihu" href="<%- page.zhihu %>" target="_blank"><i class="nexmoefont icon-zhihu"></i>知乎</a>
<a class="zhihu" href="<%- page.zhihu %>" target="_blank">
<i class="nexmoefont icon-zhihu"></i>
</a>
<% } %>
<% if (page.bilibili){ %>
<a class="bilibili" href="<%- page.bilibili %>" target="_blank">
<i class="nexmoefont icon-bilibili_tv"></i>
</a>
<% } %>
<% if (page.sspai){ %>
<a class="sspai" href="<%- page.sspai %>" target="_blank">
<i class="nexmoefont">π</i>
</a>
<% } %>
</div>
12 changes: 11 additions & 1 deletion source/css/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ body {
}
}

a:before, i:before {
a:before {
margin-right: 5px;
}

Expand All @@ -472,6 +472,16 @@ body {
background-color: rgba(5, 109, 232, 20%);
color: #056de8;
}

.bilibili {
background-color: rgba(251, 114, 153, 20%);
color: #fb7299;
}

.sspai {
background-color: rgba(218, 40, 42, 20%);
color: #da282a;
}
}

.nexmoe-post-copyright {
Expand Down

0 comments on commit 3e79add

Please sign in to comment.