From a9076ff5143909f378b75ea490cb385de8fad6ca Mon Sep 17 00:00:00 2001 From: ppoffice Date: Fri, 20 Mar 2015 17:29:51 +0800 Subject: [PATCH] finished rc --- _config.yml | 6 +++- _config.yml.example | 6 +++- languages/en.yml | 6 ++-- languages/zh-CN.yml | 6 ++-- layout/_partial/archive-post.ejs | 8 ----- layout/_partial/archive.ejs | 7 ++-- layout/_partial/article.ejs | 4 +-- layout/_partial/sidebar.ejs | 1 + layout/_widget/links.ejs | 14 ++++++++ source/css/_partial/archive.styl | 43 +++++++++++------------ source/css/_partial/article.styl | 47 ++++--------------------- source/css/_partial/comment.styl | 5 +-- source/css/_partial/header.styl | 30 ++++++++-------- source/css/_partial/highlight.styl | 2 +- source/css/_partial/profile.styl | 25 +++++++++++++- source/css/_partial/sidebar.styl | 25 ++++++++++++++ source/css/_variables.styl | 2 +- source/css/images/logo.png | Bin 0 -> 6321 bytes source/css/images/logo.svg | 8 ----- source/fancybox/jquery.fancybox.css | 3 -- source/js/script.js | 51 ++++++++++++++-------------- 21 files changed, 154 insertions(+), 145 deletions(-) delete mode 100644 layout/_partial/archive-post.ejs create mode 100644 layout/_widget/links.ejs create mode 100644 source/css/images/logo.png delete mode 100644 source/css/images/logo.svg diff --git a/_config.yml b/_config.yml index 7698507..1af241f 100644 --- a/_config.yml +++ b/_config.yml @@ -17,7 +17,7 @@ widgets: - tagcloud - archive -# contacts +# Contacts contacts: github: http://github.com/ppoffice twitter: '#' @@ -25,6 +25,10 @@ contacts: dribbble: '#' rss: /atom.xml +# Links +links: + Hexo: http://hexo.io + # Miscellaneous google_analytics: favicon: /favicon.png diff --git a/_config.yml.example b/_config.yml.example index 7698507..1af241f 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -17,7 +17,7 @@ widgets: - tagcloud - archive -# contacts +# Contacts contacts: github: http://github.com/ppoffice twitter: '#' @@ -25,6 +25,10 @@ contacts: dribbble: '#' rss: /atom.xml +# Links +links: + Hexo: http://hexo.io + # Miscellaneous google_analytics: favicon: /favicon.png diff --git a/languages/en.yml b/languages/en.yml index b0d7edb..b3cc0ac 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -6,10 +6,8 @@ index: uncategorized: 'uncategorized' tag: 'tag' nav: - current_page: - other: 'Page %d ' - total_page: - other: 'of %d' + next: 'Next' + prev: 'Prev' widget: recents: 'recents' archives: 'archives' diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index a8cbe65..7bd8d7f 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -6,10 +6,8 @@ index: uncategorized: '未分类' tag: '标签' nav: - current_page: - other: '第 %d 页,' - total_page: - other: '共 %d 页' + next: '下一页' + prev: '上一页' widget: recents: '最新文章' archives: '归档' diff --git a/layout/_partial/archive-post.ejs b/layout/_partial/archive-post.ejs deleted file mode 100644 index 36f2cc3..0000000 --- a/layout/_partial/archive-post.ejs +++ /dev/null @@ -1,8 +0,0 @@ -
-
-
- <%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %> - <%- partial('post/title', {class_name: 'archive-article-title'}) %> -
-
-
\ No newline at end of file diff --git a/layout/_partial/archive.ejs b/layout/_partial/archive.ejs index c2c994b..efe1234 100644 --- a/layout/_partial/archive.ejs +++ b/layout/_partial/archive.ejs @@ -5,8 +5,8 @@ <% if (page.total > 1){ %> <% } %> @@ -21,11 +21,12 @@ <% last = year; %>
<% } %> - <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> + <%- partial('article', {post: post, index: true}) %> <% }) %> <% if (page.posts.length){ %>
diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 6ace38f..d16751e 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -23,9 +23,9 @@ <% } %> diff --git a/layout/_partial/sidebar.ejs b/layout/_partial/sidebar.ejs index c1e48e5..6d7fd2e 100644 --- a/layout/_partial/sidebar.ejs +++ b/layout/_partial/sidebar.ejs @@ -2,4 +2,5 @@ <% theme.widgets.forEach(function(widget){ %> <%- partial('_widget/' + widget) %> <% }) %> +
\ No newline at end of file diff --git a/layout/_widget/links.ejs b/layout/_widget/links.ejs new file mode 100644 index 0000000..ac2e352 --- /dev/null +++ b/layout/_widget/links.ejs @@ -0,0 +1,14 @@ +<% if (site.posts.length){ %> +
+

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

+
+
    + <% for (var i in theme.links){ %> +
  • + <%= i %> +
  • + <% } %> +
+
+
+<% } %> diff --git a/source/css/_partial/archive.styl b/source/css/_partial/archive.styl index 90ef053..ef3aabf 100644 --- a/source/css/_partial/archive.styl +++ b/source/css/_partial/archive.styl @@ -3,20 +3,22 @@ .archives clearfix() + .article:first-child + margin: 20px 0 .archive-year-wrap - margin-bottom: 1em - + @extend $block + padding: 10px 20px + .fa + margin-right: 3px + .archive-year + color: color-default + &:hover + color: color-link + .archive-year @extend $block-caption -.archives - column-gap: 10px - @media mq-tablet - column-count: 2 - @media mq-normal - column-count: 3 - .archive-article avoid-column-break() @@ -48,30 +50,25 @@ #page-nav clearfix() margin: block-margin auto - background: #fff - box-shadow: 1px 2px 3px #ddd - border: 1px solid color-border - border-radius: 3px text-align: center color: color-grey overflow: hidden a, span - padding: 10px 20px - line-height: 1 - height: 2ex + height: 32px + padding: 0 10px + line-height: 32px + text-align: center + display: inline-block + border-radius: 2px a color: color-grey text-decoration: none &:hover - background: color-grey - color: #fff - .prev - float: left - .next - float: right + color: white + background: color-link .page-number display: inline-block - @media mq-mobile + @media mq-mini display: none .current color: color-default diff --git a/source/css/_partial/article.styl b/source/css/_partial/article.styl index 968ba3a..6952223 100644 --- a/source/css/_partial/article.styl +++ b/source/css/_partial/article.styl @@ -167,7 +167,7 @@ float: right &:before content: "\f075" - font-family: font-icon + font-family: FontAwesome padding-right: 8px .article-share-link @@ -176,7 +176,7 @@ margin-left: 20px &:before content: "\f064" - font-family: font-icon + font-family: FontAwesome padding-right: 6px #article-nav @@ -188,12 +188,10 @@ absolute-center(8px) content: "" border-radius: 50% - background: color-border - box-shadow: 0 1px 2px #fff + background: color-default + #222 .article-nav-link-wrap text-decoration: none - text-shadow: 0 1px #fff color: color-grey box-sizing: border-box margin-top: block-margin @@ -218,11 +216,11 @@ padding-left: 20px .article-nav-caption - text-transform: uppercase letter-spacing: 2px - color: color-border line-height: 1em font-weight: bold + color: color-default + text-transform: uppercase #article-nav-newer & margin-right: -2px @@ -318,37 +316,4 @@ $article-share-link img display: block max-width: 100% - margin: 0 auto -/* -$article-gallery-ctrl - position: absolute - top: 0 - height: 100% - width: 60px - color: #fff - text-shadow: 0 0 3px rgba(0, 0, 0, 0.3) - opacity: 0.3 - transition: opacity 0.2s - cursor: pointer - &:hover - opacity: 0.8 - &:before - font-size: 30px - font-family: font-icon - position: absolute - top: 50% - margin-top: @font-size * -0.5 - -.article-gallery-prev - @extend $article-gallery-ctrl - left: 0 - &:before - content: "\f053" - left: 15px - -.article-gallery-next - @extend $article-gallery-ctrl - right: 0 - &:before - content: "\f054" - right: 15px*/ \ No newline at end of file + margin: 0 auto \ No newline at end of file diff --git a/source/css/_partial/comment.styl b/source/css/_partial/comment.styl index 296b7dd..7542f41 100644 --- a/source/css/_partial/comment.styl +++ b/source/css/_partial/comment.styl @@ -1,9 +1,6 @@ #comments - background: #fff - box-shadow: 1px 2px 3px #ddd + @extend $block padding: article-padding - border: 1px solid color-border - border-radius: 3px margin: block-margin 0 a color: color-link \ No newline at end of file diff --git a/source/css/_partial/header.styl b/source/css/_partial/header.styl index 3338d1f..511833a 100644 --- a/source/css/_partial/header.styl +++ b/source/css/_partial/header.styl @@ -77,14 +77,8 @@ $header-block-right display: none @media mq-mini display: block - border: none - outline: none padding: 0 10px - background: none margin-right: 15px - color: color-default - font: font-size font-sans - border: 1px solid color-border line-height: header-sub-height - 16 border-radius: ((header-sub-height - 16)/2) &::-webkit-search-results-decoration @@ -154,16 +148,12 @@ $nav-link width: 200px .search-form position: relative - border: 1px solid color-border - border-radius: ((logo-size + 2)/2) - padding: 0 30px 0 10px .search-form-input - border: none - background: none - color: color-default width: 100% - font: font-size font-sans - outline: none + height: logo-size + padding: 0 30px 0 10px + line-height: logo-size + border-radius: ((logo-size + 2)/2) &::-webkit-search-results-decoration &::-webkit-search-cancel-button -webkit-appearance: none @@ -180,4 +170,14 @@ $nav-link &:before content: '\f002' &:hover, &:focus - color: #777 \ No newline at end of file + color: #777 + +.search-form-input + outline: none + background: none + color: color-default + transition: 0.2s ease + font: font-size font-sans + border: 1px solid color-border + &:focus + border-color: color-link \ No newline at end of file diff --git a/source/css/_partial/highlight.styl b/source/css/_partial/highlight.styl index ccc352c..06fe3c9 100644 --- a/source/css/_partial/highlight.styl +++ b/source/css/_partial/highlight.styl @@ -1,5 +1,5 @@ // https://github.com/chriskempson/tomorrow-theme -highlight-background = #2d2d2d +highlight-background = color-default - #222 highlight-current-line = #393939 highlight-selection = #515151 highlight-foreground = #cccccc diff --git a/source/css/_partial/profile.styl b/source/css/_partial/profile.styl index be99fec..1885daf 100644 --- a/source/css/_partial/profile.styl +++ b/source/css/_partial/profile.styl @@ -97,4 +97,27 @@ content: "" display: block position: absolute - z-index: 2 \ No newline at end of file + z-index: 2 + &.card + top: 50px + right: 20px + z-index: 999 + display: block + min-width: 280px + position: absolute + .profile-inner + position: relative + box-shadow: 0 2px 5px rgba(0,0,0,0.2) + &:before, &:after + z-index: 1 + content: '' + top: -20px + right: 10px + position: absolute + border-width: 10px + border-style: solid + border-color: transparent transparent white transparent + &:after + z-index: 0 + border-color: transparent transparent color-border - #111 transparent + \ No newline at end of file diff --git a/source/css/_partial/sidebar.styl b/source/css/_partial/sidebar.styl index b20d400..7454748 100644 --- a/source/css/_partial/sidebar.styl +++ b/source/css/_partial/sidebar.styl @@ -81,6 +81,31 @@ &:hover:before color: color-sidebar-text-dark +#toTop + @extend $block + cursor: pointer + text-align: center + width: 64px + height: 64px + color: white + font-size: 32px + line-height: 64px + background: color-default + border-radius: 4px + @media mq-mobile + width: 54px + height: 54px + font-size: 28px + line-height: 54px + @media mq-mini + width: 54px + height: 54px + font-size: 28px + line-height: 54px + &.fix + bottom: 20px + position: fixed + #recent-post li clearfix() diff --git a/source/css/_variables.styl b/source/css/_variables.styl index 0e044fb..e735b14 100644 --- a/source/css/_variables.styl +++ b/source/css/_variables.styl @@ -30,7 +30,7 @@ line-height-title = 1.1em logo-size = 40px header-height = 64px header-sub-height = 48px -logo-url = "images/logo.svg" +logo-url = "images/logo.png" // Sidebar sidebar = hexo-config("sidebar") diff --git a/source/css/images/logo.png b/source/css/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ba8db2d6f294f9a8fcfeacb21daa8f2e23e16cb8 GIT binary patch literal 6321 zcmch5XEYp6)c35_Sw!zdiD=P6^av3p#AfvxC5Wmjvuy(9x@Xk9kZC#Uca<>V{9eA$um=28yd8=v2ptIw26>SI2#BYq(xt$zn1vxohwj4L@Fyz z^28fxcl0!)iI}wU#JqIB`r4dHz5}og4GakLsk(gz`RECV0BZb(0DafOzvqqcYo>rV z5#agg2~>~-1n9nD)XfOGSwWTI=f{*F1pxQJ5OqFK1_SGVbyP{fWNGpY3z&SzSxOFK zAt3X*mH?63S72)#fe<6Ywt>8IHNG3f*h&c6yiQt+2;EEq{Nl_KXw_^1I#XTj2jG<_ z0vg;5{ZL*#XrAOqE57s*DzZTv0>6|E* z`Lfe7{0!OzsNMiI0PM%Z-!9~DClG!uFZ^;MxNrUa{_etU+mlcA>dyQ{Qw$L?pnEX5 zHT`I1Wde%of>imox|LdjX%p~d{@7XuN0DbiITUpKCQ$xNjXO6V-mT2VNl8VuA!wi9 zEV=YX^`FdwC;m;?!R6`&E@&G(%~H#(z!p3|e`@F9SBZ!t^bxB|c^ne>FS;Vb&*OxL z7jITui7~z2F?-bj=hN>B{DMfld$lKZk$yE?dWR?NoFdsD2Fjxhun+3UYWv)=VVe-5 zH#BA=en2g3PdtX5DiP2*-;@qK1R%NfI9^Q@0{YY6F9Fc>o7Ji$g+;HE9Duud5h7K0 z$f&n1I!l!#9cp<_h8YF|ot*k5<%c@O*C zq_sw;y>lC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g8&iV4}wo)(?&15LZGAh;BKY5?X&*@TPC-i literal 0 HcmV?d00001 diff --git a/source/css/images/logo.svg b/source/css/images/logo.svg deleted file mode 100644 index 1e23466..0000000 --- a/source/css/images/logo.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/source/fancybox/jquery.fancybox.css b/source/fancybox/jquery.fancybox.css index c75d051..3139306 100644 --- a/source/fancybox/jquery.fancybox.css +++ b/source/fancybox/jquery.fancybox.css @@ -29,9 +29,6 @@ background: #f9f9f9; color: #444; text-shadow: none; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; } .fancybox-opened { diff --git a/source/js/script.js b/source/js/script.js index b146292..0b2efbc 100644 --- a/source/js/script.js +++ b/source/js/script.js @@ -1,4 +1,6 @@ (function($){ + var toTop = $('#toTop').offset().top - $(window).height() + 20; + // Share $('body').on('click', function(){ $('.article-share-box.on').removeClass('on'); @@ -74,32 +76,31 @@ $('.fancybox').fancybox(); } - // Mobile nav - var $container = $('#container'), - isMobileNavAnim = false, - mobileNavAnimDuration = 200; - - var startMobileNavAnim = function(){ - isMobileNavAnim = true; - }; - - var stopMobileNavAnim = function(){ - setTimeout(function(){ - isMobileNavAnim = false; - }, mobileNavAnimDuration); - } - - $('#main-nav-toggle').on('click', function(){ - if (isMobileNavAnim) return; - - startMobileNavAnim(); - $container.toggleClass('mobile-nav-on'); - stopMobileNavAnim(); + // Profile card + $(document).on('click', function () { + $('#profile').removeClass('card'); + }).on('click', '#profile-anchor', function (e) { + e.stopPropagation(); + $('#profile').toggleClass('card'); + }).on('click', '.profile-inner', function (e) { + e.stopPropagation(); }); - $('#wrap').on('click', function(){ - if (isMobileNavAnim || !$container.hasClass('mobile-nav-on')) return; - - $container.removeClass('mobile-nav-on'); + // To Top + $(document).on('scroll', function () { + if ($(document).width() >= 800) { + if($(this).scrollTop() > toTop) { + $('#toTop').addClass('fix'); + $('#toTop').css('left', $('#sidebar').offset().left); + } else { + $('#toTop').removeClass('fix'); + } + } else { + $('#toTop').addClass('fix'); + $('#toTop').css('right', 20); + } + }).on('click', '#toTop', function () { + $(document).scrollTop(0); }); + })(jQuery); \ No newline at end of file