diff --git a/_config.yml.example b/_config.yml.example index abaf830..13a464c 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -18,6 +18,9 @@ widgets: - archive thumbnail: true +# Additional Stylesheet +customstylesheet: 'custom' + # Contacts contacts: github: http://github.com/ppoffice diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index ce40505..a1470d3 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -1,5 +1,8 @@
+ <% if (post.banner){ %> + <%- partial('post/banner') %> + <% } %> <%- partial('post/gallery') %> <% if (post.link || post.title){ %>
diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 7f1c198..10f4ce8 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -33,4 +33,7 @@ <%- css('css/style') %> <%- css('font-awesome/css/font-awesome.min') %> <%- partial('google-analytics') %> + <% if( theme.customstylesheet ){ %> + <%- css('css/'+theme.customstylesheet) %> + <% } %> \ No newline at end of file diff --git a/layout/_partial/post/banner.ejs b/layout/_partial/post/banner.ejs new file mode 100644 index 0000000..eb83476 --- /dev/null +++ b/layout/_partial/post/banner.ejs @@ -0,0 +1,10 @@ +<% if (post.link){ %> + +<% } else if (post.title){ %> + <% if (index){ %> + + <% } else { %> + + <% } %> +<% } %> + diff --git a/layout/_partial/post/thumbnail.ejs b/layout/_partial/post/thumbnail.ejs index 15099b8..8682885 100644 --- a/layout/_partial/post/thumbnail.ejs +++ b/layout/_partial/post/thumbnail.ejs @@ -1,12 +1,19 @@ <% - var img=/\/ig; - var result = post.content.match(img); var s = ""; - result = img.exec(post.content); - if(result != null) { - for(var i = result.length -1; i; --i){ - s += result[i]+"\n"; + + if (post.thumbnail){ + s = post.thumbnail; + }else if (post.banner){ + s = post.banner; + }else{ + var img=/\/ig; + var result = post.content.match(img); + result = img.exec(post.content); + if(result != null) { + for(var i = result.length -1; i; --i){ + s += result[i]+"\n"; + } } } if(s.length > 0){ diff --git a/layout/_widget/links.ejs b/layout/_widget/links.ejs index ac2e352..832ac4f 100644 --- a/layout/_widget/links.ejs +++ b/layout/_widget/links.ejs @@ -1,6 +1,6 @@ <% if (site.posts.length){ %>
-

<%= __('sidebar.links') %>

+

<%= __('widget.links') %>

    <% for (var i in theme.links){ %> diff --git a/source/css/_partial/article.styl b/source/css/_partial/article.styl index ddec6b7..54c2c13 100644 --- a/source/css/_partial/article.styl +++ b/source/css/_partial/article.styl @@ -5,15 +5,19 @@ @extend $block overflow: hidden +.article-banner + width:100% + height:auto + .article-meta clearfix() & > div margin-bottom: 5px .article-date, .article-category margin-right: 10px - color: color-default + color: color-default + #444 a - color: color-default + color: color-default + #444 &:hover color: color-link diff --git a/source/css/_partial/highlight.styl b/source/css/_partial/highlight.styl index 2f8f642..89f8a77 100644 --- a/source/css/_partial/highlight.styl +++ b/source/css/_partial/highlight.styl @@ -80,11 +80,17 @@ $line-numbers .gist-data background: none border: none + table + background: none + .pl-vo + color:#FFF .line-numbers @extend $line-numbers background: none border: none padding: 0 20px 0 0 + height: font-size * line-height + vertical-align: top .line-data padding: 0 !important .highlight