Skip to content

Commit

Permalink
2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardforcel committed Feb 12, 2016
1 parent 3f1dde5 commit eaa22da
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 21 deletions.
5 changes: 4 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ fancybox: true
# Sidebar
sidebar: right
widgets:
- search
- music
- category
- tag
- tagcloud
Expand All @@ -25,4 +27,5 @@ widgets:
google_analytics:
favicon: http://7u2hdm.com1.z0.glb.clouddn.com/favicon.ico
google_site_verification: NCXVSqxqB-os803-VFMtIEd1SUNJVOIjctCfNYUwD0w
baidu_site_verification: Nzwx7HuplM
baidu_site_verification: Nzwx7HuplM
music: http://7u2hdm.com1.z0.glb.clouddn.com/bg.mp3
21 changes: 1 addition & 20 deletions layout/_partial/article.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,4 @@
<% } %>
</article>

<% if (!index && post.comments && config.duoshuo_shortname){ %>
<section id="comments">
<!-- 多说评论框 start -->
<div class="ds-thread" data-thread-key="<%= post.layout %>-<%= post.slug %>" data-title="<%= post.title %>" data-url="<%= page.permalink %>"></div>
<!-- 多说评论框 end -->
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:'<%= config.duoshuo_shortname %>'};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- 多说公共JS代码 end -->
</section>
<% } %>
<%- partial('comment') %>
20 changes: 20 additions & 0 deletions layout/_partial/comment.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<% if (!index && post.comments && config.duoshuo_shortname){ %>
<section id="comments">
<!-- 多说评论框 start -->
<div class="ds-thread" data-thread-key="<%= post.layout %>-<%= post.slug %>" data-title="<%= post.title %>" data-url="<%= page.permalink %>"></div>
<!-- 多说评论框 end -->
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:'<%= config.duoshuo_shortname %>'};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- 多说公共JS代码 end -->
</section>
<% } %>
11 changes: 11 additions & 0 deletions layout/_widget/music.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<% if (theme.music){ %>
<aside class="widget">
<h3 class="widget-title">Music</h3>
<div class="widget-content">
<audio src="<%= theme.music %>" controls="controls"
style="width:100%">
您的浏览器不支持 audio 标签。
</audio>
</div>
</aside>
<% } %>
7 changes: 7 additions & 0 deletions layout/_widget/search.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<aside id="search" class="widget widget_search"><form role="search" method="get" accept-charset="utf-8" id="searchform" class="searchform" action="//google.com/search">
<div>
<label class="screen-reader-text" for="s">搜索:</label>
<input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="搜索" />
</div>
</form></aside>
50 changes: 50 additions & 0 deletions source/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,56 @@ footer.entry-meta {
font-weight: normal;
}

/* Hexo Code */
figure.highlight {
border: 1px solid #ddd;
margin-top: 15px;
padding: 7px 15px;
-webkit-border-radius: 2px;
border-radius: 2px;
line-height: 1.6;
overflow: auto;
position: relative;
font-size: 0.9em;
}

figure.highlight table {
margin: 0;
border-spacing: 0;
border: none;
width: auto;
}

figure.highlight td {
border: none;
padding: 0;
}

figure.highlight .gutter {
color: #fff;
padding-right: 15px;
border-right: 1px solid #ddd;
text-align: right;
}

figure.highlight .code {
padding-left: 15px;
border-left: 1px solid #fff;
}

figure.highlight pre {
border: none;
padding: 0;
margin: 0;
width: auto;
}

figure.highlight .line {
height: 20px;
}




/* =Archives
-------------------------------------------------------------- */
Expand Down

0 comments on commit eaa22da

Please sign in to comment.