Browse Source

Add post tag support

Fechin 6 years ago
parent
commit
60d09ef6a8
3 changed files with 7 additions and 0 deletions
  1. 1 0
      layout/_partial/post/article.ejs
  2. 1 0
      layout/tag.ejs
  3. 5 0
      source/css/diaspora.css

+ 1 - 0
layout/_partial/post/article.ejs

@@ -3,6 +3,7 @@
         <h1 class="title"><%- page.title %></h1>
         <div class="stuff">
             <span><%- page.date.locale("zh-cn").format("MMMM DD, YYYY") %></span>
+            <%- partial('_partial/post/tag', {post: page}) %>
         </div>
         <div class="content markdown">
             <%- page.content %>

+ 1 - 0
layout/tag.ejs

@@ -0,0 +1 @@
+<%- partial('archive', {pagination: config.tag, index: true}) %>

+ 5 - 0
source/css/diaspora.css

@@ -192,6 +192,11 @@ h1.title {font-size:30px;color:#333;line-height:1.3;position:relative;font-weigh
 .icon-play:before {content:"\e60b";}
 .icon-email:before {content:"\e60c";}
 
+/* tags style  */
+.post-tags-list {margin-top:10px; margin-bottom:80px}
+.post-tags-list-item {float:left; margin-right:10px;background:rgba(102,128,153,0.075);border-radius:0;padding:2px 5px;}
+.post-tags-list-link {color:rgba(44,63,81,0.5);pointer-events:none;}
+
 /* Post or Page content style */
 .content {margin-top:50px;font-size:15px;line-height:2;color: #232323;}
 .content h1{font-size:39px}