Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: content platform links #239

Merged
merged 1 commit into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions layout/_partial/_post/meta.ejs
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
<div class="nexmoe-post-meta nexmoe-rainbow">
<a><i class="nexmoefont icon-calendar-fill"></i><%- date(page.date, "YYYY年MM月DD日") %></a>
<% if (page.categories && page.categories.length){ %>
<%- list_categories(page.categories, {
show_count: false,
class: 'nexmoefont icon-appstore-fill ',
style: 'none',
separator: ''
}) %>
<div class="nexmoe-post-meta">
<div class="nexmoe-rainbow">
<a><i class="nexmoefont icon-calendar-fill"></i><%- date(page.date, "YYYY年MM月DD日") %></a>
<% if (page.categories && page.categories.length){ %>
<%- list_categories(page.categories, {
show_count: false,
class: 'nexmoefont icon-appstore-fill ',
style: 'none',
separator: ''
}) %>
<% } %>
<%- partial('_partial/_post/word-count', {post: page}) %>
</div>

<% if (page.wechat){ %>
<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>
<% } %>
<%- partial('_partial/_post/word-count', {post: page}) %>
</div>
4 changes: 2 additions & 2 deletions layout/post.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<article>
<% if (page.cover){ %>
<div class="nexmoe-post-cover mdui-ripple absolute" style="padding-top: <%- page.coverHeight/page.coverWidth*100 %>%;">
<div class="nexmoe-post-cover absolute" style="padding-top: <%- page.coverHeight/page.coverWidth*100 %>%;">
<img src="<%- page.cover %>" alt="<%= page.title %>" loading="lazy">
<h1><%= page.title %></h1>
</div>
<%} else{ %>
<div class="nexmoe-post-cover mdui-ripple text">
<div class="nexmoe-post-cover">
<img src="<%- theme.background.path %>" alt="<%= page.title %>" loading="lazy">
<h1><%= page.title %></h1>
</div>
Expand Down
14 changes: 14 additions & 0 deletions source/css/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ body {
margin: 10px 0px;
font-size: 0;

div {
display: inline-block;
}

a {
border-radius: 20px;
padding: 10px 18px;
Expand All @@ -458,6 +462,16 @@ body {
a:before, i:before {
margin-right: 5px;
}

.wechat {
background-color: rgba(42, 174, 103, 20%);
color: #2aae67;
}

.zhihu {
background-color: rgba(5, 109, 232, 20%);
color: #056de8;
}
}

.nexmoe-post-copyright {
Expand Down