合并site_static_host

合并mk2对static_host的修改
This commit is contained in:
Kenny Zhao 2012-03-13 17:27:34 +08:00
parent c7f4530af7
commit 12747947b1
15 changed files with 42 additions and 39 deletions

View File

@ -17,6 +17,7 @@ exports.config = {
// [ path, title, [target=''] ]
[ '/about', '关于' ],
],
site_static_host: '', // 静态文件存储域名
db: 'mongodb://127.0.0.1/node_club',
session_secret: 'node_club',

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -35,9 +35,9 @@
<% if(message.has_read){ %>
<span class='fr'><img src='/images/checkmark_icon&16.png' title='消息已读'/></span>
<span class='fr'><img src='<%- config.site_static_host %>/images/checkmark_icon&16.png' title='消息已读'/></span>
<% }else{ %>
<span class='fr marked_icon' style='display:none'><img src='/images/checkmark_icon&16.png' title='消息已读'/></span>
<a class='fr mark_read_btn' href='javascript:void(0)' style='display:none;'><img src='/images/checkmark_icon&16.png' title='标记为已读'/></a>
<span class='fr marked_icon' style='display:none'><img src='<%- config.site_static_host %>/images/checkmark_icon&16.png' title='消息已读'/></span>
<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>
<% } %>
</div>

View File

@ -2,7 +2,7 @@
<% if(reply.author.avatar){ %>
<div class='user_avatar'><a href='/user/<%= reply.author.name %>'><img src='<%= reply.author.avatar %>' title='<%= reply.author.name %>' /></a></div>
<% }else{ %>
<div class='user_avatar'><a href='/user/<%= reply.author.name %>'><img src='/images/user_icon&48.png' title='<%= reply.author.name %>' /></a></div>
<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>
<% } %>
<span class='col_fade fr'>#<%= indexInCollection+1 %></span>
<span class='reply_author'><a class='dark' href='/user/<%= reply.author.name %>'><%= reply.author.name %></a></span>
@ -16,7 +16,7 @@
<a class='dark' href='/user/<%= reply.author.name %>'><%= reply.author.name %></a><%= reply.friendly_create_at %>回复
<% if(locals.current_user && current_user._id.toString() == reply.author._id.toString()){ %>
<span class='sp10'></span>
<a href='javascript:void(0);' class='delete_reply_btn'><img class='user_icon' src='/images/trash_icon&16.png' title='删除' /></a>
<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>
<% } %>
</span>
<span class='fr'>

View File

@ -2,7 +2,7 @@
<% if(reply.author.avatar){ %>
<div class='user_avatar'><a href='/user/<%= reply.author.name %>'><img src='<%= reply.author.avatar %>' title='<%= reply.author.name %>' /></a></div>
<% }else{ %>
<div class='user_avatar'><a href='/user/<%= reply.author.name %>'><img src='/images/user_icon&48.png' title='<%= reply.author.name %>' /></a></div>
<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>
<% } %>
<span class='reply_author'><a class='dark' href='/user/<%= reply.author.name %>'><%= reply.author.name %></a></span>
<div class='sep5'></div>
@ -15,7 +15,7 @@
<a class='dark' href='/user/<%= reply.author.name %>'><%= reply.author.name %></a><%= reply.friendly_create_at %>回复
<% if(locals.current_user && current_user._id.toString() == reply.author._id.toString()){ %>
<span class='sp10'></span>
<a href='javascript:void(0)' class='delete_reply2_btn'><img class='user_icon' src='/images/trash_icon&16.png' title='删除' /></a>
<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>
<% } %>
</span>
<span class='fr'>

View File

@ -116,20 +116,22 @@
<div class='inner'>
<ul class='unstyled'>
<li><a href='http://nodejs.org/' target='_blank'>Nodejs官方网站</a></li>
<li><a href='http://club.cnodejs.org/' target='_blank'>CNode中文社区</a></li>
<li><a href='http://party.cnodejs.net/' target='_blank'>Node Party</a></li>
<li><a href='http://nodebeginner.org/index-zh-cn.html' target='_blank'>Node 入门</a></li>
<li><a href='http://cnodejs.org/cman/' target='_blank'>Node 中文文档</a></li>
<!-- <li><a href='http://cnodejs.org/cman/' target='_blank'>Node 中文文档</a></li> -->
</ul>
</div>
</div>
<div class='sep10'></div>
<div class='panel'>
<div class='header'>
<span class='col_fade'>友情社区</span>
<span class='col_fade'>友情社区 | 赞助商</span>
</div>
<div class='inner'>
<a href='http://ruby-china.org/' target='_blank'><img src='/images/ruby_china_logo.png' /></a>
<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>
</div>
<div class='inner'>
<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>
</div>
</div>
</div>

View File

@ -2,9 +2,9 @@
<td><%= tag.order %></td>
<td><%= tag.name %></td>
<td>
<a href='/tag/<%= tag.name %>/edit'><img class='user_icon' src='/images/doc_edit_icon&16.png' title='编辑' /></a>
<a href='/tag/<%= tag.name %>/edit'><img class='user_icon' src='<%- config.site_static_host %>/images/doc_edit_icon&16.png' title='编辑' /></a>
</td>
<td>
<a class='delete_tag_btn' href='/tag/<%= tag.name %>/delete'><img class='user_icon' src='/images/trash_icon&16.png' title='删除' /></a>
<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>
</td>
</tr>

View File

@ -2,7 +2,7 @@
<% if(topic.author.avatar){ %>
<div class='user_avatar'><a href='/user/<%= topic.author.name %>'><img src='<%= topic.author.avatar %>' title='<%= topic.author.name %>' /></a></div>
<% }else{ %>
<div class='user_avatar'><a href='/user/<%= topic.author.name %>'><img src='/images/user_icon&48.png' title='<%= topic.author.name %>' /></a></div>
<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>
<% } %>
<a class='topic_title' href='/topic/<%= topic._id %>'><%= topic.title %></a>

View File

@ -52,7 +52,7 @@
<% if (topic.author.avatar) { %>
<div class='user_avatar fr'><a href='/user/<%= topic.author.name %>'><img src='<%= topic.author.avatar %>' /></a></div>
<% } else { %>
<div class='user_avatar fr'><a href='/user/<%= topic.author.name %>'><img src='/images/user_icon&48.png' /></a></div>
<div class='user_avatar fr'><a href='/user/<%= topic.author.name %>'><img src='<%- config.site_static_host %>/images/user_icon&48.png' /></a></div>
<% } %>
-->
<h3><%= topic.title %></h3>
@ -89,12 +89,12 @@
<% if (locals.current_user) { %>
<% if (current_user.is_admin) { %>
<span class='sp10'></span>
<a href='/topic/<%= topic._id %>/edit'><img class='user_icon' src='/images/doc_edit_icon&16.png' title='编辑' /></a>
<a href='/topic/<%= topic._id %>/delete' class='delete_topic_btn'><img class='user_icon' src='/images/trash_icon&16.png' title='删除' /></a>
<a href='/topic/<%= topic._id %>/edit'><img class='user_icon' src='<%- config.site_static_host %>/images/doc_edit_icon&16.png' title='编辑' /></a>
<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>
<% } else { %>
<% if (current_user._id == topic.author_id) { %>
<span class='sp10'></span>
<a href='/topic/<%= topic._id %>/edit'><img class='user_icon' src='/images/doc_edit_icon&16.png' title='编辑' /></a>
<a href='/topic/<%= topic._id %>/edit'><img class='user_icon' src='<%- config.site_static_host %>/images/doc_edit_icon&16.png' title='编辑' /></a>
<% } %>
<% } %>
<% } %>

View File

@ -60,4 +60,4 @@
});
});
</script>
<% } %>
<% } %>

View File

@ -15,7 +15,7 @@
</div>
<% } else { %>
<div class='user_big_avatar'>
<img src='/images/user_icon&48.png' title='<%= user.name %>' />
<img src='<%- config.site_static_host %>/images/user_icon&48.png' title='<%= user.name %>' />
</div>
<% } %>
<% if (locals.current_user && current_user._id != user._id) { %>
@ -27,7 +27,7 @@
<% } %>
<h2><%= user.name %></h2>
<div class='col_fade'>
<span><img src='/images/cert_icon&16.png' /> <%= user.follower_count %> 粉丝</span>
<span><img src='<%- config.site_static_host %>/images/cert_icon&16.png' /> <%= user.follower_count %> 粉丝</span>
<% if (user.signature) { %>
<span class='sp10'></span>
<span><%= user.signature %></span>
@ -37,19 +37,19 @@
<ul class='unstyled'>
<% if (user.url) { %>
<li>
<img class='user_icon' src='/images/paper_airplane_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/paper_airplane_icon&16.png' />
<a class='dark' href='<%= user.url %>' target='_blank'><%= user.url %></a>
</li>
<% } %>
<% if (user.location) { %>
<li>
<img class='user_icon' src='/images/compass_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/compass_icon&16.png' />
<span class='col_fade'><%= user.location %></span>
</li>
<% } %>
<% if (user.weibo) { %>
<li>
<img class='user_icon' src='/images/twitter_2_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/twitter_2_icon&16.png' />
<a class='dark' href='<%= user.weibo %>' target='_blank'><%= user.weibo %></a>
</li>
<% } %>

View File

@ -15,7 +15,7 @@
</div>
<% }else{ %>
<div class='user_big_avatar'>
<img src='/images/user_icon&48.png' title='<%= user.name %>' />
<img src='<%- config.site_static_host %>/images/user_icon&48.png' title='<%= user.name %>' />
</div>
<% } %>
<% if(locals.current_user && current_user._id != user._id){ %>
@ -27,7 +27,7 @@
<% } %>
<h2><%= user.name %></h2>
<div class='col_fade'>
<span><img src='/images/cert_icon&16.png' /> <%= user.follower_count %> 粉丝</span>
<span><img src='<%- config.site_static_host %>/images/cert_icon&16.png' /> <%= user.follower_count %> 粉丝</span>
<% if(user.signature){ %>
<span class='sp10'></span>
<span><%= user.signature %></span>
@ -37,19 +37,19 @@
<ul class='unstyled'>
<% if(user.url){ %>
<li>
<img class='user_icon' src='/images/paper_airplane_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/paper_airplane_icon&16.png' />
<a class='dark' href='<%= user.url %>' target='_blank'><%= user.url %></a>
</li>
<% } %>
<% if(user.location){ %>
<li>
<img class='user_icon' src='/images/compass_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/compass_icon&16.png' />
<span class='col_fade'><%= user.location %></span>
</li>
<% } %>
<% if(user.weibo){ %>
<li>
<img class='user_icon' src='/images/twitter_2_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/twitter_2_icon&16.png' />
<a class='dark' href='<%= user.weibo %>' target='_blank'><%= user.weibo %></a>
</li>
<% } %>

View File

@ -1,6 +1,6 @@
<li>
<div>
<img class='user_icon' src='/images/star_fav_empty_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/star_fav_empty_icon&16.png' />
<a class='dark star_name' href='/user/<%= user.name %>'><%= user.name %></a>
</div>
<span class='col_fade'><%= user.follower_count %> 粉丝</span>

View File

@ -15,7 +15,7 @@
</div>
<% }else{ %>
<div class='user_big_avatar'>
<img src='/images/user_icon&48.png' title='<%= user.name %>' />
<img src='<%- config.site_static_host %>/images/user_icon&48.png' title='<%= user.name %>' />
</div>
<% } %>
<% if(locals.current_user && current_user._id != user._id){ %>
@ -27,7 +27,7 @@
<% } %>
<h2><%= user.name %></h2>
<div class='col_fade'>
<span><img src='/images/cert_icon&16.png' /> <%= user.follower_count %> 粉丝</span>
<span><img src='<%- config.site_static_host %>/images/cert_icon&16.png' /> <%= user.follower_count %> 粉丝</span>
<% if(user.signature){ %>
<span class='sp10'></span>
<span><%= user.signature %></span>
@ -37,19 +37,19 @@
<ul class='unstyled'>
<% if(user.url){ %>
<li>
<img class='user_icon' src='/images/paper_airplane_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/paper_airplane_icon&16.png' />
<a class='dark' href='<%= user.url %>' target='_blank'><%= user.url %></a>
</li>
<% } %>
<% if(user.location){ %>
<li>
<img class='user_icon' src='/images/compass_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/compass_icon&16.png' />
<span class='col_fade'><%= user.location %></span>
</li>
<% } %>
<% if(user.weibo){ %>
<li>
<img class='user_icon' src='/images/twitter_2_icon&16.png' />
<img class='user_icon' src='<%- config.site_static_host %>/images/twitter_2_icon&16.png' />
<a class='dark' href='<%= user.weibo %>' target='_blank'><%= user.weibo %></a>
</li>
<% } %>

View File

@ -3,7 +3,7 @@
<% if(user.avatar){ %>
<a href='/user/<%= user.name %>'><img class='user_avatar' src='<%= user.avatar %>' title='<%= user.name %>' /></a>
<% }else{ %>
<a href='/user/<%= user.name %>'><img class='user_avatar' src='/images/user_icon&48.png' title='<%= user.name %>' /></a>
<a href='/user/<%= user.name %>'><img class='user_avatar' src='<%- config.site_static_host %>/images/user_icon&48.png' title='<%= user.name %>' /></a>
<% } %>
<span class='user_name'><a class='dark' href='/user/<%= user.name %>'><%= user.name %></a></span>
<div class='sep5'></div>
@ -13,12 +13,12 @@
</div>
<div class='sep10'></div>
<div>
<span><a href='mailto:<%= user.email %>'><img class='user_icon' src='/images/mail_icon&16.png' title='电子邮箱' /></a></span>
<span><a href='mailto:<%= user.email %>'><img class='user_icon' src='<%- config.site_static_host %>/images/mail_icon&16.png' title='电子邮箱' /></a></span>
<% if(user.url){ %>
<span><a href='<%= user.url %>' target='_blank'><img class='user_icon' src='/images/paper_airplane_icon&16.png' title='个人网站' /></a></span>
<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>
<% } %>
<% if(user.weibo){ %>
<span><a href='<%= user.weibo %>' target='_blank'><img class='user_icon' src='/images/twitter_2_icon&16.png' title='微博' /></a></span>
<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>
<% } %>
</div>
</div>