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){ %>
<%- paginator({
- prev_text: '« Prev',
- next_text: 'Next »'
+ prev_text: '« ' + __('nav.prev'),
+ next_text: __('nav.next') + ' »'
}) %>
<% } %>
@@ -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){ %>
+
+<% } %>
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 0000000..ba8db2d
Binary files /dev/null and b/source/css/images/logo.png differ
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