Browse Source

Merge branch 'master' of github.com:Fechin/hexo-theme-diaspora

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

+ 6 - 5
README.md

@@ -7,8 +7,7 @@
 
 
 > 再次感谢原作者创作出这么精美的主题 [@Loeify](https://github.com/LoeiFy/Diaspora) 。如果你喜欢,请捐助原作者。
 > 再次感谢原作者创作出这么精美的主题 [@Loeify](https://github.com/LoeiFy/Diaspora) 。如果你喜欢,请捐助原作者。
 
 
-预览图
-<img src="http://odwjyz4z6.bkt.clouddn.com/index/fech.in.preview.jpg" width="50%" height="50%" />
+![cover](http://odwjyz4z6.bkt.clouddn.com/Diaspora.jpg)
 
 
 
 
 ### 安装主题
 ### 安装主题
@@ -44,6 +43,8 @@ git pull
 title: My awesome title
 title: My awesome title
 date: 2016-10-12 18:38:45
 date: 2016-10-12 18:38:45
 tags: 
 tags: 
+- 标签
+- 标签
 mp3: http://domain.com/awesome.mp3
 mp3: http://domain.com/awesome.mp3
 cover: http://domain.com/awesome.jpg
 cover: http://domain.com/awesome.jpg
 ---
 ---
@@ -54,13 +55,13 @@ cover: http://domain.com/awesome.jpg
 
 
 # Header Menu. title: link
 # Header Menu. title: link
 menu:
 menu:
-  About: /about
+  Whoami: /whoami
   Github: https://github.com/Fechin
   Github: https://github.com/Fechin
   Twitter: https://twitter.com/FechinLi
   Twitter: https://twitter.com/FechinLi
 
 
 
 
 # 查看文章时是否自动播放音乐
 # 查看文章时是否自动播放音乐
-autoplay: true
+autoplay: false
 # 博客文章默认音乐, 优先级: 1.文章头mp3参数> 2.在这里配置
 # 博客文章默认音乐, 优先级: 1.文章头mp3参数> 2.在这里配置
 mp3: http://link.hhtjim.com/163/425570952.mp3
 mp3: http://link.hhtjim.com/163/425570952.mp3
 # 首页封面图, 优先级: 1.在这里配置> 2.文章头cover参数;
 # 首页封面图, 优先级: 1.在这里配置> 2.文章头cover参数;
@@ -69,7 +70,7 @@ welcome_cover: # /img/welcome-cover.jpg
 cover: /img/cover.jpg
 cover: /img/cover.jpg
 
 
 
 
-keywords:
+keywords: Fechin
 # 要使用google_analytics进行统计的话,这里需要配置ID
 # 要使用google_analytics进行统计的话,这里需要配置ID
 google_analytics: 
 google_analytics: 
 # 网站ico
 # 网站ico

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

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

+ 6 - 0
layout/_partial/post/tag.ejs

@@ -0,0 +1,6 @@
+<% if (post.tags && post.tags.length){ %>
+  <%- list_tags(post.tags, {
+    show_count: false,
+    class: 'post-tags'
+  }) %>
+<% } %>

+ 1 - 0
layout/tag.ejs

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

+ 7 - 2
source/css/diaspora.css

@@ -139,7 +139,7 @@ h1.title {font-size:30px;color:#333;line-height:1.3;position:relative;font-weigh
   .post {width:100%;margin-top:60px;background:#fff;padding-bottom:30px;border-bottom:1px solid #eaeaea;}
   .post {width:100%;margin-top:60px;background:#fff;padding-bottom:30px;border-bottom:1px solid #eaeaea;}
   .post > a {display:block;margin:0 auto;width:100%;height:auto;}
   .post > a {display:block;margin:0 auto;width:100%;height:auto;}
   .post > a img {margin:0 auto;}
   .post > a img {margin:0 auto;}
-  .else {height:auto;position:static;width:96%;margin:0 auto;background:transparent;border:none;}
+  .else {height:auto;position:static;width:100%;margin:0 auto;background:transparent;border:none;}
   .else p:first-child {margin:30px 0 0 20px;}
   .else p:first-child {margin:30px 0 0 20px;}
   .else h3 {font-size:24px;margin:10px 30px 0 20px;}
   .else h3 {font-size:24px;margin:10px 30px 0 20px;}
   .else h3 + p {margin:10px 30px 0 20px;}
   .else h3 + p {margin:10px 30px 0 20px;}
@@ -154,7 +154,7 @@ h1.title {font-size:30px;color:#333;line-height:1.3;position:relative;font-weigh
   .menu li {font-size:16px;}
   .menu li {font-size:16px;}
   #pager {margin:30px 0 0;}
   #pager {margin:30px 0 0;}
   .article > div {width:90%;padding:30px 0;}
   .article > div {width:90%;padding:30px 0;}
-  h1.title {font-size:20px;}
+  h1.title {font-size:24px;}
   .tab {display:none;}
   .tab {display:none;}
   .icon-scan {display:none!important;}
   .icon-scan {display:none!important;}
   .icon-images {left:80px;}
   .icon-images {left:80px;}
@@ -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-play:before {content:"\e60b";}
 .icon-email:before {content:"\e60c";}
 .icon-email:before {content:"\e60c";}
 
 
+/* tags style  */
+.post-tags-list {margin-top:10px; display:table;}
+.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 */
 /* Post or Page content style */
 .content {margin-top:50px;font-size:15px;line-height:2;color: #232323;}
 .content {margin-top:50px;font-size:15px;line-height:2;color: #232323;}
 .content h1{font-size:39px}
 .content h1{font-size:39px}