File tree 17 files changed +46
-42
lines changed
17 files changed +46
-42
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ exports.config = {
17
17
// [ path, title, [target=''] ]
18
18
[ '/about' , '关于' ] ,
19
19
] ,
20
+ site_static_host : '' , // 静态文件存储域名
20
21
21
22
db : 'mongodb://127.0.0.1/node_club' ,
22
23
session_secret : 'node_club' ,
Original file line number Diff line number Diff line change 11
11
"node-markdown" : " 0.1.0" ,
12
12
"validator" : " 0.3.7" ,
13
13
"ndir" : " 0.1.2" ,
14
+ // "upyun": "0.0.3", // enable when use plugins/upyun
14
15
"nodemailer" : " 0.3.5"
15
16
}
16
17
}
Original file line number Diff line number Diff line change 3
3
< div id ='content '>
4
4
< div class ='panel '>
5
5
< div class ='moon '>
6
- < img src ='/images/tag_icon&16.png ' title ='标签 '/>
6
+ < img src ='<%- config.site_static_host %> /images/tag_icon&16.png ' title ='标签 '/>
7
7
< % if (locals.current_user && current_user.is_admin) { %>
8
- < span class ='fr '> < a href ='/tags/edit '> < img src ='/images/wrench_icon&16.png ' title ='编辑标签 ' /> </ a > </ span >
8
+ < span class ='fr '> < a href ='/tags/edit '> < img src ='<%- config.site_static_host %> /images/wrench_icon&16.png ' title ='编辑标签 ' /> </ a > </ span >
9
9
< % } %>
10
10
</ div >
11
11
< div class ='moon_tags '>
16
16
< % } %>
17
17
</ div >
18
18
< div class ='header '>
19
- < img src ='/images/spechbubble_2_icon&16.png ' title ='话题 '/>
19
+ < img src ='<%- config.site_static_host %> /images/spechbubble_2_icon&16.png ' title ='话题 '/>
20
20
< % if (locals.current_user) { %>
21
21
< a href ='/topic/create ' class ='fr '> < button class ='btn ' id ='create_topic_btn '> 发布话题</ button > </ a >
22
22
< % } %>
Original file line number Diff line number Diff line change 35
35
36
36
37
37
< % if(message.has_read){ %>
38
- < span class ='fr '> < img src ='/images/checkmark_icon&16.png ' title ='消息已读 '/> </ span >
38
+ < span class ='fr '> < img src ='<%- config.site_static_host %> /images/checkmark_icon&16.png ' title ='消息已读 '/> </ span >
39
39
< % }else{ %>
40
- < span class ='fr marked_icon ' style ='display:none '> < img src ='/images/checkmark_icon&16.png ' title ='消息已读 '/> </ span >
41
- < a class ='fr mark_read_btn ' href ='javascript:void(0) ' style ='display:none; '> < img src ='/images/checkmark_icon&16.png ' title ='标记为已读 '/> </ a >
40
+ < span class ='fr marked_icon ' style ='display:none '> < img src ='<%- config.site_static_host %> /images/checkmark_icon&16.png ' title ='消息已读 '/> </ span >
41
+ < a class ='fr mark_read_btn ' href ='javascript:void(0) ' style ='display:none; '> < img src ='<%- config.site_static_host %> /images/checkmark_icon&16.png ' title ='标记为已读 '/> </ a >
42
42
< % } %>
43
43
</ div >
Original file line number Diff line number Diff line change 2
2
< % if(reply.author.avatar){ %>
3
3
< div class ='user_avatar '> < a href ='/user/<%= reply.author.name %> '> < img src ='<%= reply.author.avatar %> ' title ='<%= reply.author.name %> ' /> </ a > </ div >
4
4
< % }else{ %>
5
- < div class ='user_avatar '> < a href ='/user/<%= reply.author.name %> '> < img src ='/images/user_icon&48.png ' title ='<%= reply.author.name %> ' /> </ a > </ div >
5
+ < div class ='user_avatar '> < a href ='/user/<%= reply.author.name %> '> < img src ='<%- config.site_static_host %> /images/user_icon&48.png ' title ='<%= reply.author.name %> ' /> </ a > </ div >
6
6
< % } %>
7
7
< span class ='col_fade fr '> #< %= indexInCollection+1 %> </ span >
8
8
< span class ='reply_author '> < a class ='dark ' href ='/user/<%= reply.author.name %> '> < %= reply.author.name %> </ a > </ span >
16
16
< a class ='dark ' href ='/user/<%= reply.author.name %> '> < %= reply.author.name %> </ a > 在 < %= reply.friendly_create_at %> 回复
17
17
< % if(locals.current_user && current_user._id.toString() == reply.author._id.toString()){ %>
18
18
< span class ='sp10 '> </ span >
19
- < a href ='javascript:void(0); ' class ='delete_reply_btn '> < img class ='user_icon ' src ='/images/trash_icon&16.png ' title ='删除 ' /> </ a >
19
+ < a href ='javascript:void(0); ' class ='delete_reply_btn '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/trash_icon&16.png ' title ='删除 ' /> </ a >
20
20
< % } %>
21
21
</ span >
22
22
< span class ='fr '>
Original file line number Diff line number Diff line change 2
2
< % if(reply.author.avatar){ %>
3
3
< div class ='user_avatar '> < a href ='/user/<%= reply.author.name %> '> < img src ='<%= reply.author.avatar %> ' title ='<%= reply.author.name %> ' /> </ a > </ div >
4
4
< % }else{ %>
5
- < div class ='user_avatar '> < a href ='/user/<%= reply.author.name %> '> < img src ='/images/user_icon&48.png ' title ='<%= reply.author.name %> ' /> </ a > </ div >
5
+ < div class ='user_avatar '> < a href ='/user/<%= reply.author.name %> '> < img src ='<%- config.site_static_host %> /images/user_icon&48.png ' title ='<%= reply.author.name %> ' /> </ a > </ div >
6
6
< % } %>
7
7
< span class ='reply_author '> < a class ='dark ' href ='/user/<%= reply.author.name %> '> < %= reply.author.name %> </ a > </ span >
8
8
< div class ='sep5 '> </ div >
15
15
< a class ='dark ' href ='/user/<%= reply.author.name %> '> < %= reply.author.name %> </ a > 在 < %= reply.friendly_create_at %> 回复
16
16
< % if(locals.current_user && current_user._id.toString() == reply.author._id.toString()){ %>
17
17
< span class ='sp10 '> </ span >
18
- < a href ='javascript:void(0) ' class ='delete_reply2_btn '> < img class ='user_icon ' src ='/images/trash_icon&16.png ' title ='删除 ' /> </ a >
18
+ < a href ='javascript:void(0) ' class ='delete_reply2_btn '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/trash_icon&16.png ' title ='删除 ' /> </ a >
19
19
< % } %>
20
20
</ span >
21
21
< span class ='fr '>
Original file line number Diff line number Diff line change 114
114
< div class ='inner '>
115
115
< ul class ='unstyled '>
116
116
< li > < a href ='http://nodejs.org/ ' target ='_blank '> Nodejs官方网站</ a > </ li >
117
- < li > < a href ='http://club.cnodejs.org/ ' target ='_blank '> CNode中文社区</ a > </ li >
118
117
< li > < a href ='http://party.cnodejs.net/ ' target ='_blank '> Node Party</ a > </ li >
119
118
< li > < a href ='http://nodebeginner.org/index-zh-cn.html ' target ='_blank '> Node 入门</ a > </ li >
120
- < li > < a href ='http://cnodejs.org/cman/ ' target ='_blank '> Node 中文文档</ a > </ li >
119
+ <!-- < li><a href='http://cnodejs.org/cman/' target='_blank'>Node 中文文档</a></li> -- >
121
120
</ ul >
122
121
</ div >
123
122
</ div >
124
123
< div class ='sep10 '> </ div >
125
124
< div class ='panel '>
126
125
< div class ='header '>
127
- < span class ='col_fade '> 友情社区</ span >
126
+ < span class ='col_fade '> 友情社区 | 赞助商 </ span >
128
127
</ div >
129
128
< div class ='inner '>
130
- < a href ='http://ruby-china.org/ ' target ='_blank '> < img src ='/images/ruby_china_logo.png ' /> </ a >
129
+ < a href ='http://www.upyun.com/?utm_source=nodejs&utm_medium=link&utm_campaign=upyun&md=nodejs ' target ='_blank '> < img src ='<%- config.site_static_host %>/images/upyun_logo.png ' /> </ a >
130
+ </ div >
131
+ < div class ='inner '>
132
+ < a href ='http://ruby-china.org/?utm_source=nodejs&utm_medium=link&utm_campaign=upyun&md=nodejs ' target ='_blank '> < img src ='<%- config.site_static_host %>/images/ruby_china_logo.png ' /> </ a >
131
133
</ div >
132
134
</ div >
133
135
</ div >
Original file line number Diff line number Diff line change 2
2
< td > < %= tag.order %> </ td >
3
3
< td > < %= tag.name %> </ td >
4
4
< td >
5
- < a href ='/tag/<%= tag.name %>/edit '> < img class ='user_icon ' src ='/images/doc_edit_icon&16.png ' title ='编辑 ' /> </ a >
5
+ < a href ='/tag/<%= tag.name %>/edit '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/doc_edit_icon&16.png ' title ='编辑 ' /> </ a >
6
6
</ td >
7
7
< td >
8
- < a class ='delete_tag_btn ' href ='/tag/<%= tag.name %>/delete '> < img class ='user_icon ' src ='/images/trash_icon&16.png ' title ='删除 ' /> </ a >
8
+ < a class ='delete_tag_btn ' href ='/tag/<%= tag.name %>/delete '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/trash_icon&16.png ' title ='删除 ' /> </ a >
9
9
</ td >
10
10
</ tr >
Original file line number Diff line number Diff line change 2
2
< % if(topic.author.avatar){ %>
3
3
< div class ='user_avatar '> < a href ='/user/<%= topic.author.name %> '> < img src ='<%= topic.author.avatar %> ' title ='<%= topic.author.name %> ' /> </ a > </ div >
4
4
< % }else{ %>
5
- < div class ='user_avatar '> < a href ='/user/<%= topic.author.name %> '> < img src ='/images/user_icon&48.png ' title ='<%= topic.author.name %> ' /> </ a > </ div >
5
+ < div class ='user_avatar '> < a href ='/user/<%= topic.author.name %> '> < img src ='<%- config.site_static_host %> /images/user_icon&48.png ' title ='<%= topic.author.name %> ' /> </ a > </ div >
6
6
< % } %>
7
7
8
8
< a class ='topic_title ' href ='/topic/<%= topic._id %> '> < %= topic.title %> </ a >
Original file line number Diff line number Diff line change 52
52
<% if (topic.author.avatar) { %>
53
53
<div class='user_avatar fr'><a href='/user/<%= topic.author.name %>'><img src='<%= topic.author.avatar %>' /></a></div>
54
54
<% } else { %>
55
- <div class='user_avatar fr'><a href='/user/<%= topic.author.name %>'><img src='/images/user_icon&48.png' /></a></div>
55
+ <div class='user_avatar fr'><a href='/user/<%= topic.author.name %>'><img src='<%- config.site_static_host %> /images/user_icon&48.png' /></a></div>
56
56
<% } %>
57
57
-->
58
58
< h3 > < %= topic.title %> </ h3 >
@@ -89,12 +89,12 @@ <h3><%= topic.title %></h3>
89
89
< % if (locals.current_user) { %>
90
90
< % if (current_user.is_admin) { %>
91
91
< span class ='sp10 '> </ span >
92
- < a href ='/topic/<%= topic._id %>/edit '> < img class ='user_icon ' src ='/images/doc_edit_icon&16.png ' title ='编辑 ' /> </ a >
93
- < a href ='/topic/<%= topic._id %>/delete ' class ='delete_topic_btn '> < img class ='user_icon ' src ='/images/trash_icon&16.png ' title ='删除 ' /> </ a >
92
+ < a href ='/topic/<%= topic._id %>/edit '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/doc_edit_icon&16.png ' title ='编辑 ' /> </ a >
93
+ < a href ='/topic/<%= topic._id %>/delete ' class ='delete_topic_btn '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/trash_icon&16.png ' title ='删除 ' /> </ a >
94
94
< % } else { %>
95
95
< % if (current_user._id == topic.author_id) { %>
96
96
< span class ='sp10 '> </ span >
97
- < a href ='/topic/<%= topic._id %>/edit '> < img class ='user_icon ' src ='/images/doc_edit_icon&16.png ' title ='编辑 ' /> </ a >
97
+ < a href ='/topic/<%= topic._id %>/edit '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/doc_edit_icon&16.png ' title ='编辑 ' /> </ a >
98
98
< % } %>
99
99
< % } %>
100
100
< % } %>
Original file line number Diff line number Diff line change 3
3
< % if(user.avatar){ %>
4
4
< a href ='/user/<%= user.name %> '> < img class ='user_avatar ' src ='<%= user.avatar %> ' title ='<%= user.name %> ' /> </ a >
5
5
< % }else{ %>
6
- < a href ='/user/<%= user.name %> '> < img class ='user_avatar ' src ='/images/user_icon&48.png ' title ='<%= user.name %> ' /> </ a >
6
+ < a href ='/user/<%= user.name %> '> < img class ='user_avatar ' src ='<%- config.site_static_host %> /images/user_icon&48.png ' title ='<%= user.name %> ' /> </ a >
7
7
< % } %>
8
8
< span class ='sp10 '> </ span >
9
9
< span class ='user_name '> < a class ='dark ' href ='/user/<%= user.name %> '> < %= user.name %> </ a > </ span >
Original file line number Diff line number Diff line change 15
15
</ div >
16
16
< % } else { %>
17
17
< div class ='user_big_avatar '>
18
- < img src ='/images/user_icon&48.png ' title ='<%= user.name %> ' />
18
+ < img src ='<%- config.site_static_host %> /images/user_icon&48.png ' title ='<%= user.name %> ' />
19
19
</ div >
20
20
< % } %>
21
21
< % if (locals.current_user && current_user._id != user._id) { %>
27
27
< % } %>
28
28
< h2 > < %= user.name %> </ h2 >
29
29
< div class ='col_fade '>
30
- < span > < img src ='/images/cert_icon&16.png ' /> < %= user.follower_count %> 粉丝</ span >
30
+ < span > < img src ='<%- config.site_static_host %> /images/cert_icon&16.png ' /> < %= user.follower_count %> 粉丝</ span >
31
31
< % if (user.signature) { %>
32
32
< span class ='sp10 '> </ span >
33
33
< span > < %= user.signature %> </ span >
@@ -37,19 +37,19 @@ <h2><%= user.name %></h2>
37
37
< ul class ='unstyled '>
38
38
< % if (user.url) { %>
39
39
< li >
40
- < img class ='user_icon ' src ='/images/paper_airplane_icon&16.png ' />
40
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/paper_airplane_icon&16.png ' />
41
41
< a class ='dark ' href ='<%= user.url %> ' target ='_blank '> < %= user.url %> </ a >
42
42
</ li >
43
43
< % } %>
44
44
< % if (user.location) { %>
45
45
< li >
46
- < img class ='user_icon ' src ='/images/compass_icon&16.png ' />
46
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/compass_icon&16.png ' />
47
47
< span class ='col_fade '> < %= user.location %> </ span >
48
48
</ li >
49
49
< % } %>
50
50
< % if (user.weibo) { %>
51
51
< li >
52
- < img class ='user_icon ' src ='/images/twitter_2_icon&16.png ' />
52
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/twitter_2_icon&16.png ' />
53
53
< a class ='dark ' href ='<%= user.weibo %> ' target ='_blank '> < %= user.weibo %> </ a >
54
54
</ li >
55
55
< % } %>
Original file line number Diff line number Diff line change 15
15
</ div >
16
16
< % }else{ %>
17
17
< div class ='user_big_avatar '>
18
- < img src ='/images/user_icon&48.png ' title ='<%= user.name %> ' />
18
+ < img src ='<%- config.site_static_host %> /images/user_icon&48.png ' title ='<%= user.name %> ' />
19
19
</ div >
20
20
< % } %>
21
21
< % if(locals.current_user && current_user._id != user._id){ %>
27
27
< % } %>
28
28
< h2 > < %= user.name %> </ h2 >
29
29
< div class ='col_fade '>
30
- < span > < img src ='/images/cert_icon&16.png ' /> < %= user.follower_count %> 粉丝</ span >
30
+ < span > < img src ='<%- config.site_static_host %> /images/cert_icon&16.png ' /> < %= user.follower_count %> 粉丝</ span >
31
31
< % if(user.signature){ %>
32
32
< span class ='sp10 '> </ span >
33
33
< span > < %= user.signature %> </ span >
@@ -37,19 +37,19 @@ <h2><%= user.name %></h2>
37
37
< ul class ='unstyled '>
38
38
< % if(user.url){ %>
39
39
< li >
40
- < img class ='user_icon ' src ='/images/paper_airplane_icon&16.png ' />
40
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/paper_airplane_icon&16.png ' />
41
41
< a class ='dark ' href ='<%= user.url %> ' target ='_blank '> < %= user.url %> </ a >
42
42
</ li >
43
43
< % } %>
44
44
< % if(user.location){ %>
45
45
< li >
46
- < img class ='user_icon ' src ='/images/compass_icon&16.png ' />
46
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/compass_icon&16.png ' />
47
47
< span class ='col_fade '> < %= user.location %> </ span >
48
48
</ li >
49
49
< % } %>
50
50
< % if(user.weibo){ %>
51
51
< li >
52
- < img class ='user_icon ' src ='/images/twitter_2_icon&16.png ' />
52
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/twitter_2_icon&16.png ' />
53
53
< a class ='dark ' href ='<%= user.weibo %> ' target ='_blank '> < %= user.weibo %> </ a >
54
54
</ li >
55
55
< % } %>
Original file line number Diff line number Diff line change 1
1
< li >
2
2
< div >
3
- < img class ='user_icon ' src ='/images/star_fav_empty_icon&16.png ' />
3
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/star_fav_empty_icon&16.png ' />
4
4
< a class ='dark star_name ' href ='/user/<%= user.name %> '> < %= user.name %> </ a >
5
5
</ div >
6
6
< span class ='col_fade '> < %= user.follower_count %> 粉丝</ span >
Original file line number Diff line number Diff line change 15
15
</ div >
16
16
< % }else{ %>
17
17
< div class ='user_big_avatar '>
18
- < img src ='/images/user_icon&48.png ' title ='<%= user.name %> ' />
18
+ < img src ='<%- config.site_static_host %> /images/user_icon&48.png ' title ='<%= user.name %> ' />
19
19
</ div >
20
20
< % } %>
21
21
< % if(locals.current_user && current_user._id != user._id){ %>
27
27
< % } %>
28
28
< h2 > < %= user.name %> </ h2 >
29
29
< div class ='col_fade '>
30
- < span > < img src ='/images/cert_icon&16.png ' /> < %= user.follower_count %> 粉丝</ span >
30
+ < span > < img src ='<%- config.site_static_host %> /images/cert_icon&16.png ' /> < %= user.follower_count %> 粉丝</ span >
31
31
< % if(user.signature){ %>
32
32
< span class ='sp10 '> </ span >
33
33
< span > < %= user.signature %> </ span >
@@ -37,19 +37,19 @@ <h2><%= user.name %></h2>
37
37
< ul class ='unstyled '>
38
38
< % if(user.url){ %>
39
39
< li >
40
- < img class ='user_icon ' src ='/images/paper_airplane_icon&16.png ' />
40
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/paper_airplane_icon&16.png ' />
41
41
< a class ='dark ' href ='<%= user.url %> ' target ='_blank '> < %= user.url %> </ a >
42
42
</ li >
43
43
< % } %>
44
44
< % if(user.location){ %>
45
45
< li >
46
- < img class ='user_icon ' src ='/images/compass_icon&16.png ' />
46
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/compass_icon&16.png ' />
47
47
< span class ='col_fade '> < %= user.location %> </ span >
48
48
</ li >
49
49
< % } %>
50
50
< % if(user.weibo){ %>
51
51
< li >
52
- < img class ='user_icon ' src ='/images/twitter_2_icon&16.png ' />
52
+ < img class ='user_icon ' src ='<%- config.site_static_host %> /images/twitter_2_icon&16.png ' />
53
53
< a class ='dark ' href ='<%= user.weibo %> ' target ='_blank '> < %= user.weibo %> </ a >
54
54
</ li >
55
55
< % } %>
Original file line number Diff line number Diff line change 3
3
< % if(user.avatar){ %>
4
4
< a href ='/user/<%= user.name %> '> < img class ='user_avatar ' src ='<%= user.avatar %> ' title ='<%= user.name %> ' /> </ a >
5
5
< % }else{ %>
6
- < a href ='/user/<%= user.name %> '> < img class ='user_avatar ' src ='/images/user_icon&48.png ' title ='<%= user.name %> ' /> </ a >
6
+ < a href ='/user/<%= user.name %> '> < img class ='user_avatar ' src ='<%- config.site_static_host %> /images/user_icon&48.png ' title ='<%= user.name %> ' /> </ a >
7
7
< % } %>
8
8
< span class ='user_name '> < a class ='dark ' href ='/user/<%= user.name %> '> < %= user.name %> </ a > </ span >
9
9
< div class ='sep5 '> </ div >
13
13
</ div >
14
14
< div class ='sep10 '> </ div >
15
15
< div >
16
- < span > < a href ='mailto:<%= user.email %> '> < img class ='user_icon ' src ='/images/mail_icon&16.png ' title ='电子邮箱 ' /> </ a > </ span >
16
+ < span > < a href ='mailto:<%= user.email %> '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/mail_icon&16.png ' title ='电子邮箱 ' /> </ a > </ span >
17
17
< % if(user.url){ %>
18
- < span > < a href ='<%= user.url %> ' target ='_blank '> < img class ='user_icon ' src ='/images/paper_airplane_icon&16.png ' title ='个人网站 ' /> </ a > </ span >
18
+ < span > < a href ='<%= user.url %> ' target ='_blank '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/paper_airplane_icon&16.png ' title ='个人网站 ' /> </ a > </ span >
19
19
< % } %>
20
20
< % if(user.weibo){ %>
21
- < span > < a href ='<%= user.weibo %> ' target ='_blank '> < img class ='user_icon ' src ='/images/twitter_2_icon&16.png ' title ='微博 ' /> </ a > </ span >
21
+ < span > < a href ='<%= user.weibo %> ' target ='_blank '> < img class ='user_icon ' src ='<%- config.site_static_host %> /images/twitter_2_icon&16.png ' title ='微博 ' /> </ a > </ span >
22
22
< % } %>
23
23
</ div >
24
24
</ div >
You can’t perform that action at this time.
0 commit comments