Skip to content

Commit 1274794

Browse files
committed
合并site_static_host
合并mk2对static_host的修改
1 parent c7f4530 commit 1274794

15 files changed

+42
-39
lines changed

config.default.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ exports.config = {
1717
// [ path, title, [target=''] ]
1818
[ '/about', '关于' ],
1919
],
20+
site_static_host: '', // 静态文件存储域名
2021

2122
db: 'mongodb://127.0.0.1/node_club',
2223
session_secret: 'node_club',

public/images/upyun_logo.png

4.95 KB
Loading

views/message/message.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535

3636

3737
<% 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>
3939
<% }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>
4242
<% } %>
4343
</div>

views/reply/reply.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<% if(reply.author.avatar){ %>
33
<div class='user_avatar'><a href='/user/<%= reply.author.name %>'><img src='<%= reply.author.avatar %>' title='<%= reply.author.name %>' /></a></div>
44
<% }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>
66
<% } %>
77
<span class='col_fade fr'>#<%= indexInCollection+1 %></span>
88
<span class='reply_author'><a class='dark' href='/user/<%= reply.author.name %>'><%= reply.author.name %></a></span>
@@ -16,7 +16,7 @@
1616
<a class='dark' href='/user/<%= reply.author.name %>'><%= reply.author.name %></a><%= reply.friendly_create_at %>回复
1717
<% if(locals.current_user && current_user._id.toString() == reply.author._id.toString()){ %>
1818
<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>
2020
<% } %>
2121
</span>
2222
<span class='fr'>

views/reply/reply2.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<% if(reply.author.avatar){ %>
33
<div class='user_avatar'><a href='/user/<%= reply.author.name %>'><img src='<%= reply.author.avatar %>' title='<%= reply.author.name %>' /></a></div>
44
<% }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>
66
<% } %>
77
<span class='reply_author'><a class='dark' href='/user/<%= reply.author.name %>'><%= reply.author.name %></a></span>
88
<div class='sep5'></div>
@@ -15,7 +15,7 @@
1515
<a class='dark' href='/user/<%= reply.author.name %>'><%= reply.author.name %></a><%= reply.friendly_create_at %>回复
1616
<% if(locals.current_user && current_user._id.toString() == reply.author._id.toString()){ %>
1717
<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>
1919
<% } %>
2020
</span>
2121
<span class='fr'>

views/sidebar.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,22 @@
116116
<div class='inner'>
117117
<ul class='unstyled'>
118118
<li><a href='http://nodejs.org/' target='_blank'>Nodejs官方网站</a></li>
119-
<li><a href='http://club.cnodejs.org/' target='_blank'>CNode中文社区</a></li>
120119
<li><a href='http://party.cnodejs.net/' target='_blank'>Node Party</a></li>
121120
<li><a href='http://nodebeginner.org/index-zh-cn.html' target='_blank'>Node 入门</a></li>
122-
<li><a href='http://cnodejs.org/cman/' target='_blank'>Node 中文文档</a></li>
121+
<!-- <li><a href='http://cnodejs.org/cman/' target='_blank'>Node 中文文档</a></li> -->
123122
</ul>
124123
</div>
125124
</div>
126125
<div class='sep10'></div>
127126
<div class='panel'>
128127
<div class='header'>
129-
<span class='col_fade'>友情社区</span>
128+
<span class='col_fade'>友情社区 | 赞助商</span>
130129
</div>
131130
<div class='inner'>
132-
<a href='http://ruby-china.org/' target='_blank'><img src='/images/ruby_china_logo.png' /></a>
131+
<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>
132+
</div>
133+
<div class='inner'>
134+
<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>
133135
</div>
134136
</div>
135137
</div>

views/tag/tag_can_edit.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<td><%= tag.order %></td>
33
<td><%= tag.name %></td>
44
<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>
66
</td>
77
<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>
99
</td>
1010
</tr>

views/topic/abstract.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<% if(topic.author.avatar){ %>
33
<div class='user_avatar'><a href='/user/<%= topic.author.name %>'><img src='<%= topic.author.avatar %>' title='<%= topic.author.name %>' /></a></div>
44
<% }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>
66
<% } %>
77

88
<a class='topic_title' href='/topic/<%= topic._id %>'><%= topic.title %></a>

views/topic/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<% if (topic.author.avatar) { %>
5353
<div class='user_avatar fr'><a href='/user/<%= topic.author.name %>'><img src='<%= topic.author.avatar %>' /></a></div>
5454
<% } 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>
5656
<% } %>
5757
-->
5858
<h3><%= topic.title %></h3>
@@ -89,12 +89,12 @@ <h3><%= topic.title %></h3>
8989
<% if (locals.current_user) { %>
9090
<% if (current_user.is_admin) { %>
9191
<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>
9494
<% } else { %>
9595
<% if (current_user._id == topic.author_id) { %>
9696
<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>
9898
<% } %>
9999
<% } %>
100100
<% } %>

views/user/card.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@
6060
});
6161
});
6262
</script>
63-
<% } %>
63+
<% } %>

views/user/index.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616
<% } else { %>
1717
<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 %>' />
1919
</div>
2020
<% } %>
2121
<% if (locals.current_user && current_user._id != user._id) { %>
@@ -27,7 +27,7 @@
2727
<% } %>
2828
<h2><%= user.name %></h2>
2929
<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>
3131
<% if (user.signature) { %>
3232
<span class='sp10'></span>
3333
<span><%= user.signature %></span>
@@ -37,19 +37,19 @@ <h2><%= user.name %></h2>
3737
<ul class='unstyled'>
3838
<% if (user.url) { %>
3939
<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' />
4141
<a class='dark' href='<%= user.url %>' target='_blank'><%= user.url %></a>
4242
</li>
4343
<% } %>
4444
<% if (user.location) { %>
4545
<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' />
4747
<span class='col_fade'><%= user.location %></span>
4848
</li>
4949
<% } %>
5050
<% if (user.weibo) { %>
5151
<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' />
5353
<a class='dark' href='<%= user.weibo %>' target='_blank'><%= user.weibo %></a>
5454
</li>
5555
<% } %>

views/user/replies.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616
<% }else{ %>
1717
<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 %>' />
1919
</div>
2020
<% } %>
2121
<% if(locals.current_user && current_user._id != user._id){ %>
@@ -27,7 +27,7 @@
2727
<% } %>
2828
<h2><%= user.name %></h2>
2929
<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>
3131
<% if(user.signature){ %>
3232
<span class='sp10'></span>
3333
<span><%= user.signature %></span>
@@ -37,19 +37,19 @@ <h2><%= user.name %></h2>
3737
<ul class='unstyled'>
3838
<% if(user.url){ %>
3939
<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' />
4141
<a class='dark' href='<%= user.url %>' target='_blank'><%= user.url %></a>
4242
</li>
4343
<% } %>
4444
<% if(user.location){ %>
4545
<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' />
4747
<span class='col_fade'><%= user.location %></span>
4848
</li>
4949
<% } %>
5050
<% if(user.weibo){ %>
5151
<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' />
5353
<a class='dark' href='<%= user.weibo %>' target='_blank'><%= user.weibo %></a>
5454
</li>
5555
<% } %>

views/user/star.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<li>
22
<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' />
44
<a class='dark star_name' href='/user/<%= user.name %>'><%= user.name %></a>
55
</div>
66
<span class='col_fade'><%= user.follower_count %> 粉丝</span>

views/user/topics.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616
<% }else{ %>
1717
<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 %>' />
1919
</div>
2020
<% } %>
2121
<% if(locals.current_user && current_user._id != user._id){ %>
@@ -27,7 +27,7 @@
2727
<% } %>
2828
<h2><%= user.name %></h2>
2929
<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>
3131
<% if(user.signature){ %>
3232
<span class='sp10'></span>
3333
<span><%= user.signature %></span>
@@ -37,19 +37,19 @@ <h2><%= user.name %></h2>
3737
<ul class='unstyled'>
3838
<% if(user.url){ %>
3939
<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' />
4141
<a class='dark' href='<%= user.url %>' target='_blank'><%= user.url %></a>
4242
</li>
4343
<% } %>
4444
<% if(user.location){ %>
4545
<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' />
4747
<span class='col_fade'><%= user.location %></span>
4848
</li>
4949
<% } %>
5050
<% if(user.weibo){ %>
5151
<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' />
5353
<a class='dark' href='<%= user.weibo %>' target='_blank'><%= user.weibo %></a>
5454
</li>
5555
<% } %>

views/user/user.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<% if(user.avatar){ %>
44
<a href='/user/<%= user.name %>'><img class='user_avatar' src='<%= user.avatar %>' title='<%= user.name %>' /></a>
55
<% }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>
77
<% } %>
88
<span class='user_name'><a class='dark' href='/user/<%= user.name %>'><%= user.name %></a></span>
99
<div class='sep5'></div>
@@ -13,12 +13,12 @@
1313
</div>
1414
<div class='sep10'></div>
1515
<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>
1717
<% 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>
1919
<% } %>
2020
<% 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>
2222
<% } %>
2323
</div>
2424
</div>

0 commit comments

Comments
 (0)