diff --git a/layout/comment/counter.ejs b/layout/comment/counter.ejs
index 5684d4d..19c5ef8 100644
--- a/layout/comment/counter.ejs
+++ b/layout/comment/counter.ejs
@@ -1,9 +1,9 @@
<% if (post.comments) { %>
<% if (theme.comment.disqus) { %>
- <%= __('article.comments') %>
+ <%= __('article.comments') %>
<% } else if (theme.comment.duoshuo) { %>
- <%= __('article.comments') %>
+ <%= __('article.comments') %>
<% } else if (theme.comment.youyan) { %>
- <%= __('article.comments') %>
+ <%= __('article.comments') %>
<% } %>
<% } %>
\ No newline at end of file
diff --git a/source/js/main.js b/source/js/main.js
index 04a338b..c42f69a 100644
--- a/source/js/main.js
+++ b/source/js/main.js
@@ -33,20 +33,22 @@
});
// To Top
- $(document).on('scroll', function () {
- if ($(document).width() >= 800) {
- if(($(this).scrollTop() > toTop) && ($(this).scrollTop() > 0)) {
- $('#toTop').fadeIn();
- $('#toTop').css('left', $('#sidebar').offset().left);
+ if ($('#sidebar').length) {
+ $(document).on('scroll', function () {
+ if ($(document).width() >= 800) {
+ if(($(this).scrollTop() > toTop) && ($(this).scrollTop() > 0)) {
+ $('#toTop').fadeIn();
+ $('#toTop').css('left', $('#sidebar').offset().left);
+ } else {
+ $('#toTop').fadeOut();
+ }
} else {
- $('#toTop').fadeOut();
+ $('#toTop').fadeIn();
+ $('#toTop').css('right', 20);
}
- } else {
- $('#toTop').fadeIn();
- $('#toTop').css('right', 20);
- }
- }).on('click', '#toTop', function () {
- $('body, html').animate({ scrollTop: 0 }, 600);
- });
+ }).on('click', '#toTop', function () {
+ $('body, html').animate({ scrollTop: 0 }, 600);
+ });
+ }
})(jQuery);
\ No newline at end of file