diff --git a/controllers/site.js b/controllers/site.js index a336118..ca21834 100644 --- a/controllers/site.js +++ b/controllers/site.js @@ -70,7 +70,7 @@ exports.index = function (req, res, next) { // 取星标用户 User.getUsersByQuery({ is_star: true }, { limit: 5 }, proxy.done('stars')); // 取排行榜上的用户 - User.getUsersByQuery({}, { limit: 10, sort: [ [ 'score', 'desc' ] ] }, proxy.done('tops')); + User.getUsersByQuery({is_block: false}, { limit: 10, sort: [ [ 'score', 'desc' ] ] }, proxy.done('tops')); // 取0回复的主题 Topic.getTopicsByQuery({ reply_count: 0 }, { limit: 5, sort: [ [ 'create_at', 'desc' ] ] }, proxy.done('no_reply_topics')); diff --git a/views/layout.html b/views/layout.html index 1336d43..f09c6e1 100644 --- a/views/layout.html +++ b/views/layout.html @@ -100,7 +100,7 @@
© <%= "2012 - " + (new Date()).getFullYear() %>
本社区为开源系统,版本: <%= config.version %> ,欢迎贡献代码
- 由 NAE 为 <%= config.name %> 提供动力 + 本社区搭建在 DigitalOcean
diff --git a/views/sidebar.html b/views/sidebar.html index 74ed205..b112512 100644 --- a/views/sidebar.html +++ b/views/sidebar.html @@ -18,51 +18,6 @@ <% } %> -
-
- - - 社区消息 -
-
-
如何获得NodeAppEngine邀请码?
-
如何获得Node官方T-Shirt?
-
如何加入CNode社区?
-
-
- - <% if (locals.hot_tags) { %> -
-
- 热门标签 -
-
- <% if (hot_tags.length > 0) { %> - <%- partial('tag/tag_with_count', { collection: hot_tags, as: 'tag' }) %> - <% } else { %> -

- <% } %> -
-
- <% } %> - - <% if (locals.hot_topics) { %> -
-
- 热门话题 -
-
- <% if (hot_topics.length >0) { %> - - <% } else { %> -

- <% } %> -
-
- <% } %> - <% if (locals.no_reply_topics) { %>
@@ -147,12 +102,4 @@
<% } %> -
-
- RSS订阅 -
-
- RSS订阅 -
-
diff --git a/views/topic/index.html b/views/topic/index.html index 3b1bdc1..e0987a2 100644 --- a/views/topic/index.html +++ b/views/topic/index.html @@ -61,10 +61,10 @@
<% if (topic.tags.length > 0) { %> - 标签: + 标签: <%- partial('tag/tag_in_topic',{ collection: topic.tags, as: 'tag' }) %> <% } else { %> - 标签:无 + 标签:无 <% } %>
@@ -91,9 +91,9 @@ <% if (locals.current_user) { %> <% if (current_user.is_admin) { %> <% if (topic.top) { %> - + <% } else { %> - + <% } %> @@ -105,7 +105,7 @@ <% } %>
- + <% if (topic.replies && topic.replies.length > 0) { %>
@@ -167,7 +167,7 @@ parent.find('.reply2_area').prepend(editorWrap); var textarea = editorWrap.find('textarea.editor'); var user = $btn.parents('.cell').find('.reply_author a').html(); - + editorWrap.show('fast', function () { var editor = createEpicEditor(textarea); editorList[textarea.attr('id')] = editor; @@ -184,7 +184,7 @@ if (textarea.val().indexOf('@' + user) < 0) { textarea.val('@' + user + ' '); } - + editorWrap.show('fast', function () { var editor = createEpicEditor(textarea); editorList[textarea.attr('id')] = editor; @@ -208,9 +208,9 @@ $me.html('加入收藏'); $me.attr('action','collect'); } - $me.toggleClass('btn-success'); - } - }, 'json'); + $me.toggleClass('btn-success'); + } + }, 'json'); }); $('.delete_reply_btn, .delete_reply2_btn').live('click', function() { @@ -230,16 +230,16 @@ $.post('/reply/' + reply_id + '/delete', data, function (data) { if (data.status === 'success') { if($me.hasClass('delete_reply_btn')){ - $me.parents('.reply_item').remove(); + $me.parents('.reply_item').remove(); } if($me.hasClass('delete_reply2_btn')){ - $me.parents('.reply2_item').remove(); + $me.parents('.reply2_item').remove(); } } - }, 'json'); - } + }, 'json'); + } return false; - }); + }); $('.delete_topic_btn').click(function () { var topicId = $(this).data('id'); @@ -265,7 +265,7 @@ } }); }); - + document.onkeyup=function(event) { if(window.ActiveXObject) { var keydown = window.event.keyCode; diff --git a/views/user/card.html b/views/user/card.html index 330d078..1ec7a0c 100644 --- a/views/user/card.html +++ b/views/user/card.html @@ -15,8 +15,6 @@
@@ -56,9 +54,9 @@ $btns.html('加入关注'); $btns.attr('action','follow'); } - $btns.toggleClass('btn-success'); - } - }, 'json'); + $btns.toggleClass('btn-success'); + } + }, 'json'); }); }); diff --git a/views/user/setting.html b/views/user/setting.html index 64ab211..1d5cb26 100644 --- a/views/user/setting.html +++ b/views/user/setting.html @@ -31,12 +31,7 @@
-
-
-
- -
- +

同时决定了 Gravatar 头像

@@ -83,10 +78,10 @@
<% if(locals.weibo){ %> - + <% }else{ %> + placeholder="e.g. http://weibo.com/cnodejs" /> <% } %>
@@ -131,21 +126,6 @@
-
-
- 头像 -
-
-

<%= config.name %> 使用 Globally Recognized Avata ,与您的 Email 关联,请在 Gravatar 注册或更改您的头像。

-

您当前的头像如下:

- <% if (locals.profile_image_url) { %> - 自定义: -  |  - <% } %> - gravatar: -
-
-
更改密码