Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

完成了大部分提到的更改.. #152

Merged
merged 4 commits into from over 1 year ago

7 participants

题叶 午夜 Heroic Yang 雷宗民 Jackson Tian fengmk2 Finian
题叶
Collaborator

Chrome Firefox 下修复的问题

✓ 回复图片没有阴影
✓ 背景太亮, 去掉图片采用暗背景, 但文字背景还是亮的
✓ 头像使用圆角
✓ 不要采用并列的头像
✓ 回复按钮下方空隙大小不对
✓ Firefox 上文本不对齐. 设置 vertical-align
✓ 话题列表增加最后操作时间
✓ 回复界面样式的简化

没有解决的问题:

✗ 手机访问, 我用 remote debugger 看了字号都是 14px 但明显不对
✗ 代码高亮的样式不如原先黑色明显, 没拿定注意
✗ Logo, 不懂设计不敢碰. 官方的 Logo 不知道是否合适

然后两张截图:

screenshot from 2013-05-25 16 14 18

screenshot from 2013-05-25 16 13 32

午夜

这也太淡太单调了吧,看上去比现在的还不适应

Heroic Yang

我觉得现在的要更好些啊,除了主题的两个头像和导航栏之外。

题叶
Collaborator

@sumory @sumory 我觉得是背景图片的原因,, 单调这一点从图片上的活泼元素可以弥补

雷宗民

这个瞬间亮瞎了我的钛合金眼,颠覆了我的审美观

Jackson Tian
Owner

原来的那个背景还不错啊,我觉得你解决下header上的背景就可以了,不用整体换。

题叶
Collaborator

@leizongmin 好残酷啊,, 真有这么烂么这个界面... 背景色是 Node 官方壁纸的背景色啊

@JacksonTian 原先我想的是去掉边框用文字的整齐排版来形成对齐, 从而保证界面美观
但昨天线上看的感觉, 一个是布局没有平衡, 还有亮度太过以及对比不清晰
如果是那只改 navbar 的话, 是这样?

screenshot from 2013-05-25 19 18 02

Jackson Tian
Owner

头上估计不能用白色了。

雷宗民

反正顶部导航栏的颜色必须比背景色深,而且要有明确的边界

题叶
Collaborator

@leizongmin SegmentFault 和 Github 都是这个配色的.. 是比浅色在上边好看..
不过为什么... 是因为亮色太吸引注意力么..

按 Github 的颜色我改掉的部分是这样的,, // 字体有点丑..

screenshot from 2013-05-25 19 39 24

雷宗民

我那个是这样的:

.navbar-inner {
  border-bottom: 1px solid #CCC;
  background-color: #f3f3f3;
}
.navbar .nav > li > a {
  color: #555;
  font-weight: bold;
}
a:focus, .navbar .nav > li > a:hover {
  color: #4183c4;
}
#wrapper {
  background: #FFF;
  padding-top: 0;
}

导航栏文字加粗、颜色加深,加下边框
取消导航栏与主体部分的间距

题叶
Collaborator

@leizongmin Github 的 DOM 属性看起来也是 BootStrap 来加样式的,,
我那么的话参考 Github 的界面和你的 CSS 把现在的界面样式改了提交

雷宗民

SegmentFault 和 Github 都是这个配色的.. 是比浅色在上边好看..
不过为什么... 是因为亮色太吸引注意力么..

  • 因为大家已经看惯了这种风格的,所以就已经习惯了。如果你采用别的风格,比如刚才那个“颠覆式”的黑背景白导航,刚开始会令人不适应;
  • 另外,网页要让眼睛看得舒服,比如现在那个浅图片背景对阅读文字挺好的,但是由于导航比较模糊,给人感觉不太平衡;而那个黑色背景,颜色对比太强烈,给人一种压抑的感觉,令人很不舒服;
  • 如果设置了背景,文字颜色应该加深,否则文字与背景色都差不多的,阅读时眼睛易疲劳;
题叶
Collaborator
  • 刚开始的深绿色我期待有图片能填充的, 反而没考虑好
  • 嗯. 浅色的背景, 深色的字, 这点一直没变. 那现在我打算全沿用 Github
  • 文字区域的背景, 为了方便阅读, 已经不打算加图案了. 图案如果有, 是在全局的背景上
题叶
Collaborator

@leizongmin 这下变成高仿 Github 了.. 是先用这还是在基础上改?

screenshot from 2013-05-25 21 05 03
screenshot from 2013-05-25 21 05 08
screenshot from 2013-05-25 21 05 14

雷宗民

就这样还好看

fengmk2
Owner

ok?!么?各位?

fengmk2 fengmk2 was assigned
雷宗民

表示 赞成 先更新这个上去看看效果如何

fengmk2
Owner

好。

fengmk2 fengmk2 merged commit 70fbfe7 into from
fengmk2 fengmk2 closed this
fengmk2
Owner

http://club.dev.cnodejs.net/ 半小时预览看看。

fengmk2
Owner

image

粉红线是否修改一下颜色呢?

fengmk2
Owner

好少女系啊
image

午夜

这个粉红有点暧昧

fengmk2
Owner

image

Jackson Tian
Owner

滚动条就系统默认的吧,不要粉红。

雷宗民

刚开始我以为那个粉红线是浏览器问题,原来真的是粉红色的!!

午夜

fabu
发布页面已凌乱

午夜

粉丝页面、打人页面等都飘逸起来了...

午夜

gundong
感觉,segmentfault的header底部边缘还是很有质感的,cnode的这个没有层次感

雷宗民
  • 不要使用粉红色边框,边框统一使用灰色(颜色再深一点) 图1
  • 使用系统默认的滚动条
  • 灰色背景颜色再深一点 图2

1
2

fengmk2
Owner
Finian

粉红色配色太怪异了

题叶
Collaborator

粉红色.. 意外了, 屏幕还是视力问题我没发现那么明显.. 改了
颜色加深以后 Logo 更显蛋疼..

@fengmk2 超过半小时了.. 是那边的配置改了?
@JacksonTian 忘了 Mac 滚动条超漂亮, Linux Chrome 不好看呀..
@leizongmin 我继续参考 Github.. 颜色加深了
@sumory 采用了 Github 的配置, 边缘线我为了布局是用阴影模拟的, 有点虚

已改:
#152 (comment)
screenshot from 2013-05-27 12 53 08

雷宗民

粉红色边框 还是没有改。
你显示器有问题吧?

Jackson Tian
Owner

滚动条那个 如无必要 不要去做特殊设置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
5 README.md
View
@@ -98,11 +98,6 @@ Below is the output from `git-summary`.
1 张洋 0.4%
```
-## Images
-
-Background image Made by Dan Kruse:
-http://subtlepatterns.com/light-sketch/
-
## License
( The MIT License )
BIN  public/images/furley_bg.png
View
Deleted file not rendered
6 public/javascripts/main.js
View
@@ -21,11 +21,9 @@ $(document).ready(function () {
var $wrapper = $('#wrapper');
var $backtotop = $('#backtotop');
var $sidebar = $('#sidebar');
- var top = $(window).height() - $backtotop.height() - 90;
+ var top = $(window).height() - $backtotop.height() - 200;
function moveBacktotop() {
- var marginLeft = $sidebar.position().left;
- var left = marginLeft + $sidebar.width();
- $backtotop.css({ top: top, left: left});
+ $backtotop.css({ top: top, right: 0});
}
$backtotop.click(function () {
$('html,body').animate({ scrollTop: 0 });
2  public/libs/bootstrap/css/bootstrap.css
View
@@ -4615,7 +4615,7 @@ input[type="submit"].btn.btn-mini {
.navbar .nav > li > a:focus,
.navbar .nav > li > a:hover {
- color: #333333;
+ color: hsl(210, 53%, 51%);
text-decoration: none;
background-color: transparent;
}
175 public/stylesheets/style.css
View
@@ -4,7 +4,6 @@ div, textarea {
-mox-box-sizing: border-box;
}
body {
- background: url("../images/furley_bg.png") repeat;
}
body, p {
font-size: 14px;
@@ -12,44 +11,71 @@ body, p {
word-break: break-all;
-webkit-font-smoothing: antialiased;
}
+::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+}
+::-webkit-scrollbar-track {
+ background: hsl(0, 100%, 100%);
+}
+::-webkit-scrollbar-thumb {
+ background: hsl(0, 100%, 90%);}
#main p a {
white-space: nowrap;
max-width: 600px;
overflow: hidden;
display: inline-block;
text-overflow: ellipsis;
+ vertical-align: middle;
}
#wrapper {
- padding-top: 20px;
+ padding-top: 34px;
}
#main {
width: 1060px;
margin: 0px auto;
- padding: 10px 0px 30px 0px;
+ padding: 0px 0px 30px 0px;
min-height:400px;
+ position: relative;
}
#topic_list {
- margin: 10px 0px 30px;
+ margin: 0px;
}
#content {
margin: 0px 290px 0px 0px;
- padding: 10px 10px 0px 0px;
+ padding: 0px;
+ width: 758px;
}
-#content p {
+#content .topic p, #content .reply p {
font-family: Monaco, Consolas, monospace, "Wenquanyi Micro Hei Mono";
}
#sidebar {
- width: 300px;
- padding: 10px 0px 10px 10px;
+ width: 290px;
float: right;
font-size: 14px;
}
+#content .panel {
+ background: hsla(0, 0%, 100%, 1);
+ box-shadow: 0px 0px 1px hsl(0,0%,70%);
+}
+#sidebar .panel {
+ background: hsla(0, 100%, 100%, 1);
+ box-shadow: 0px 0px 1px hsl(0,0%,70%);
+}
#sidebar .header {
- box-shadow: 0px 1px 0px hsl(0,0%,90%);
+ background: hsl(0, 0%, 95%);
+ background-image: linear-gradient(hsl(0, 0%, 98%), hsl(0, 0%, 92%));
+ background-image: -webkit-linear-gradient(hsl(0, 0%, 98%), hsl(0, 0%, 92%));
+ color: hsl(202, 6%, 34%);
+ font-weight: bold;
}
#footer {
height: 200px;
clear: both;
+ background: hsla(0, 100%, 100%, 1);
+ position: relative;
+ box-shadow: 0px -1px 0px hsl(0,0%,90%);
+ margin-top: 8px;
}
#footer_main {
width: 1040px;
@@ -93,7 +119,10 @@ body, p {
display: inline-block;
}
.col_fade {
- color: #aaa;
+ color: hsl(0,0%,67%);
+}
+.header .col_fade{
+ color: hsl(202, 6%, 34%);
}
.bold {
font-weight: bold;
@@ -126,10 +155,13 @@ a.light:hover {
}
.panel {
- margin: 3px 0px;
+ margin-bottom: 8px;
}
.panel .header {
- padding: 10px;
+ padding: 7px 10px;
+ background: hsl(0,0%,95%);
+ background-image: linear-gradient(hsl(0, 0%, 98%), hsl(0, 0%, 92%));
+ background-image: -webkit-linear-gradient(hsl(0, 0%, 98%), hsl(0, 0%, 92%));
}
.panel .moon {
padding: 10px;
@@ -138,38 +170,63 @@ a.light:hover {
padding-left: 10px;
}
.panel .inner {
- padding: 10px;
line-height: 27px;
}
.panel .inner .unstyled li div {
text-overflow: ellipsis;
}
+.panel .inner.topic, .panel .inner.reply, .panel .inner.userinfo {
+ padding: 10px;
+}
+#sidebar .panel .inner {
+ padding: 10px;
+}
.panel>.cell:last-child {
box-shadow: none;
}
.cell {
- padding: 8px 10px 0px 10px;
- box-shadow: 0px 1px 0px hsl(0,0%,86%);
overflow: hidden;
+ position: relative;
+ box-shadow: 0px 1px 0px hsl(0, 100%, 95%);
+ padding: 3px 10px;
+}
+.cell .cell {
+ box-shadow: 0px -1px 0px hsl(0, 0%, 90%);
+ padding: 3px 10px 0px 10px;
}
.cell:last-child {
border-bottom: none;
}
.cell .block {
- width: 48px;
- height: 48px;
float: left;
text-align: center;
- margin-right: 8px;
font-size: 14px;
color: hsl(0,0%,70%);
line-height: 48px;
}
.cell .block.count {
width: 60px;
+ margin: 0px 8px;
+}
+.cell.message {
+ padding: 10px;
}
-.topic_content {
- padding: 0px 6px;
+.cell.message a {
+ max-width: 560px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: inline-block;
+ height: 14px;
+ line-height: 14px;
+}
+.last_time {
+ position: absolute;
+ color: hsl(0, 7%, 70%);
+ top: 0px;
+ right: 0px;
+ font-size: 13px;
+ line-height: 53px;
+ padding: 0px 8px;
}
.board .floor {
line-height: 24px;
@@ -288,10 +345,9 @@ a.tag_big:hover {
padding: 1px 2px;
}
.user_avatar img, .user_big_avatar img {
- border-radius: 1px;
- box-shadow: 0px 0px 6px hsla(0,70%,20%,0.5);
- width: 48px;
- height: 48px;
+ border-radius: 20px;
+ box-shadow: 0px 0px 6px hsla(0, 27%, 42%, 0.5);
+ width: 40px;
}
a.user_avatar:hover {
text-decoration: none;
@@ -310,12 +366,10 @@ a.user_avatar:hover {
margin-right: 10px;
}
.user_big_avatar img {
- width: 48px;
+ width: 40px;
}
.user_icon {
- position: relative;
- top: 3px;
- margin-right: 5px;
+ margin-right: 7px;
opacity: 0.4;
}
.user_icon:hover {
@@ -348,18 +402,26 @@ a.user_avatar:hover {
.reply_author {
font-size: 14px;
}
+.author_content{
+ height: 48px;
+}
+.user_info {
+ float: left;
+ margin-left: 10px;
+ height: 100%;
+ line-height: 48px;
+}
+.user_action {}
.reply_content {
- margin-left: 58px;
- margin-top: 8px;
+ margin-left: 50px;
}
.reply2_btn {
margin-right: 10px;
}
.reply2_area {
- margin-left: 50px;
+ margin-left: 25px;
}
-.reply2_area .cell {
- border-top: 1px solid #e2e2e2;
+.reply2_area .cell {
border-bottom: none;
}
.reply2_editor {
@@ -367,15 +429,17 @@ a.user_avatar:hover {
overflow: hidden;
}
.reply2_at_btn {
- display: none;
+}
+.submit_control {
+ height: 48px;
+ line-height: 48px;
}
.topic_wrap {
- padding: 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- height: 48px;
line-height: 48px;
+ width: 500px;
}
a.topic_title {
font-size: 16px;
@@ -411,13 +475,15 @@ img.unread {
margin-top: -10px;
}
#backtotop {
- width: 16px;
+ width: 24px;
color: gray;
padding: 10px 4px;
display:none;
position: fixed;
cursor: pointer;
text-align: center;
+ background: white;
+ z-index: 20;
}
#share_weibo_btn {
}
@@ -493,7 +559,7 @@ textarea[id^=wmd-input] {
height: 400px;
}
.wmd-preview {
- height: 225px;
+ min-height: 225px;
}
.reply2-wmd-preview {
width: 518px;
@@ -511,21 +577,24 @@ textarea[id^=wmd-input] {
background-color: #F5F5F5;
}
.put_top {
- color: white;
- background: hsl(240,30%,80%);
+ background: hsl(0, 0%, 80%);
padding: 1px 2px;
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-o-border-radius: 2px;
+ color: hsl(0,0%,100%);
}
/* custom bootstrap */
.navbar {
margin-bottom: 0px;
- background: url("../images/furley_bg.png");
+ background-color: hsl(0, 0%, 95%);
+ background-image: linear-gradient(hsl(0, 0%, 98%), hsl(0, 0%, 95%));
z-index: 9;
width: 100%;
+ position: relative;
+ box-shadow: 0px 1px 0px hsl(0, 100%, 90%);
}
.navbar-inner {
background: none;
@@ -539,15 +608,15 @@ textarea[id^=wmd-input] {
}
.navbar .brand {
padding: 7px 0px 0px 20px;
- width: 150px;
+ width: 143px;
}
.navbar .navbar-search {
- margin-top: 7px;
+ margin-top: 6px;
}
.navbar .search-query {
-webkit-box-shadow: none;
-moz-box-shadow: none;
- box-shadow: none;
+ box-shadow: 0px 0px 4px hsl(0, 12%, 76%);
background: white url('../images/search.png') no-repeat 4px 4px;
padding: 4px 5px 4px 22px;
color: #666;
@@ -566,8 +635,14 @@ textarea[id^=wmd-input] {
background-color:#2b3741;
border-right: 1px solid #2f3b46;
}
+.navbar .nav > li > a {
+ text-shadow: none;
+ font-weight: bold;
+ color: hsl(210, 27%, 30%);
+}
.form-actions {
border-top: none;
+ background-color: white;
}
.btn {
padding: 3px 14px;
@@ -609,7 +684,6 @@ textarea.span8 {
pre {
background: #fee9cc;
border: 1px dashed #ccc;
- width: 90%;
line-height: 22px;
}
code {
@@ -635,14 +709,15 @@ form {
.topic_content p, .reply_content p, .reply_form p {
font-size: 14px;
line-height: 28px;
- margin: 0px 0px 28px;
}
-.topic_content p a.content_img {
+# .topic_content p a.content_img, #main .reply_content p a.content_img {
box-shadow: 4px 2px 20px hsl(0,0%,40%);
+ display: block;
}
-.topic_content blockquote p, .reply_content blockquote p, .reply_form blockquote p, #preview blockquote p {
- font-size: 14px;
+#main .topic_content p a.content_img, #main .reply_content p a.content_img {
color: hsl(0,0%,40%);
+ box-shadow: 1px 1px 15px hsla(0, 21%, 60%, 0.6);
+ display: block;
}
div[class$=content] > blockquote > p {
font-size: 14px;
@@ -650,7 +725,6 @@ div[class$=content] > blockquote > p {
}
.index_notify {
font-size: 14px;
- color: #000;
}
h1, h2, h3, h4, h5,h6 {
margin: 23px 0px;
@@ -680,7 +754,6 @@ div[class$=part] {
width: 300px;
}
.topic_content{
- line-height: 150%;
}
textarea, input[type="text"], input[type="password"], input[type="datetime"],
input[type="datetime-local"], input[type="date"], input[type="month"],
123 views/reply/reply.html
View
@@ -1,59 +1,68 @@
<div class='cell reply_area reply_item' id="reply<%= indexInCollection+1 %>" reply_id="<%- reply._id %>">
- <a id="<%- reply._id %>"></a>
- <div class='user_avatar block'>
- <a href="/user/<%= reply.author.name %>"><img src="<%= reply.author.avatar_url %>" title="<%= reply.author.name %>" /></a>
- </div>
- <span class='col_fade fr'>#<%= indexInCollection + 1 %></span>
-
- <span class='fr'>
- <% if(locals.current_user){ %>
- <a href='javascript:void(0);' class='dark reply2_btn'>回复</a>
- <% } %>
- <% if(reply.replies.length>0){ %>
- <span class='col_fade'>{<%= reply.replies.length %>}</span>
- <% } %>
- </span>
- <span class='reply_author'><a class='dark' href="/user/<%= reply.author.name %>"><%= reply.author.name %></a></span>
- <span class='col_fade'>
- 在 <a href="#<%- reply._id %>"><%= reply.friendly_create_at %></a> 回复
- <% 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="<%- config.site_static_host %>/images/trash_icon&16.png" title='删除' /></a>
- <% } %>
- </span>
- <!-- <div class='sep5'></div> -->
- <div class='reply_content'>
- <%- reply.content %>
- </div>
- <div class='cl'>
- <!-- <div class='sep5'></div> -->
- <div class='reply2_area'>
- <% if (reply.replies.length >0) { %>
- <div class='sep10'></div>
- <%- partial('reply/reply2',{collection: reply.replies, as: 'reply'}) %>
- <% } %>
- <% if (locals.current_user) { %>
- <div class='reply2_editor tabbable' id='reply2_editor-<%= indexInCollection+1 %>'>
- <div class='sep10'></div>
- <ul class='nav nav-pills'>
- <li class='active'><a href='#markdown-<%= indexInCollection+1 %>' data-toggle='pill'>markdown</a></li>
- <li><a href='#preview-<%= indexInCollection+1 %>' data-toggle='pill' class="preview-btn">预览</a></li>
- </ul>
- <div class='tab-content'>
- <div class='active tab-pane' id='markdown-<%= indexInCollection+1 %>'>
- <div id='wmd-button-bar-<%= indexInCollection+1 %>'></div>
- <textarea class='span7' id='wmd-input-<%= indexInCollection+1 %>' name='r2_content' rows='4'></textarea>
- </div>
- <div id='preview-<%= indexInCollection+1 %>' class='tab-pane'>
- <div id='wmd-preview-<%= indexInCollection+1 %>' class='wmd-preview reply2-wmd-preview'></div>
- </div>
- </div>
- <div class='sep10'></div>
- <button class='btn reply2_submit_btn' id='<%= reply._id %>'>回复</button>
- <span class='sp10'></span>
- <span class='col_fade'>Ctrl+Enter 快捷回复</span>
- </div>
- <% } %>
- </div>
- </div>
+ <a id="<%- reply._id %>"></a>
+ <div class='author_content'>
+ <div class='user_avatar block'>
+ <a href="/user/<%= reply.author.name %>"><img src="<%= reply.author.avatar_url %>" title="<%= reply.author.name %>" /></a>
+ </div>
+ <div class='user_info'>
+ <span class='reply_author'>
+ <a class='dark' href="/user/<%= reply.author.name %>"><%= reply.author.name %>
+ </a>
+ </span>
+ <span class='col_fade'>
+ <a href="#<%- reply._id %>"><%= reply.friendly_create_at %></a>
+ </span>
+ </div>
+ <div class='user_action fr'>
+ <span class='col_fade'>#<%= indexInCollection + 1 %></span>
+ <% if(locals.current_user && current_user._id.toString() == reply.author._id.toString()) { %>
+ <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>
+ <% if(locals.current_user){ %>
+ <a href='javascript:void(0);' class='dark reply2_btn'>回复</a>
+ <% } %>
+ <!--<% if(reply.replies.length>0){ %>
+ <span class='col_fade'>{<%= reply.replies.length %>}</span>
+ <% } %>-->
+ </span>
+ </div>
+ </div>
+ <!-- <div class='sep5'></div> -->
+ <div class='reply_content'>
+ <%- reply.content %>
+ </div>
+ <div class='cl'>
+ <!-- <div class='sep5'></div> -->
+ <div class='reply2_area'>
+ <% if (reply.replies.length >0) { %>
+ <div class='sep10'></div>
+ <%- partial('reply/reply2',{collection: reply.replies, as: 'reply'}) %>
+ <% } %>
+ <% if (locals.current_user) { %>
+ <div class='reply2_editor tabbable' id='reply2_editor-<%= indexInCollection+1 %>'>
+ <!-- <div class='sep10'></div> -->
+ <ul class='nav nav-pills'>
+ <li class='active'><a href='#markdown-<%= indexInCollection+1 %>' data-toggle='pill'>markdown</a></li>
+ <li><a href='#preview-<%= indexInCollection+1 %>' data-toggle='pill' class="preview-btn">预览</a></li>
+ </ul>
+ <div class='tab-content'>
+ <div class='active tab-pane' id='markdown-<%= indexInCollection+1 %>'>
+ <div id='wmd-button-bar-<%= indexInCollection+1 %>'></div>
+ <textarea class='span7' id='wmd-input-<%= indexInCollection+1 %>' name='r2_content' rows='4'></textarea>
+ </div>
+ <div id='preview-<%= indexInCollection+1 %>' class='tab-pane'>
+ <div id='wmd-preview-<%= indexInCollection+1 %>' class='wmd-preview reply2-wmd-preview'></div>
+ </div>
+ </div>
+ <div class='sep10'></div>
+ <button class='btn reply2_submit_btn' id='<%= reply._id %>'>回复</button>
+ <span class='sp10'></span>
+ <span class='col_fade'>Ctrl+Enter 快捷回复</span>
+ </div>
+ <% } %>
+ </div>
+ </div>
</div>
54 views/reply/reply2.html
View
@@ -1,27 +1,31 @@
<div class='cell reply2_item' reply_id='<%= reply._id %>'>
- <a id="<%- reply._id %>"></a>
- <div class='user_avatar block'>
- <a href="/user/<%= reply.author.name %>"><img src="<%= reply.author.avatar_url %>" title="<%= reply.author.name %>" /></a>
- </div>
- <span class='reply_author'><a class='dark' href="/user/<%= reply.author.name %>"><%= reply.author.name %></a></span>
- <span class='fr'>
- <% if (locals.current_user) { %>
- <a href='javascript:void(0);' class='dark reply2_at_btn'>@回复</a>
- <% } %>
- </span>
- <span class='col_fade'>
- 在 <a href="#<%- reply._id %>"><%= reply.friendly_create_at %></a> 回复
- <% 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="<%- config.site_static_host %>/images/trash_icon&16.png" title='删除' /></a>
- <% } %>
- </span>
- <!-- <div class='sep5'></div> -->
- <div class='reply_content'>
- <%- reply.content %>
- </div>
- <!-- <div class='cl'>
- <div class='sep5'></div>
- </div> -->
+ <div class='author_content'>
+ <a id="<%- reply._id %>"></a>
+ <div class='user_avatar block'>
+ <a href="/user/<%= reply.author.name %>">
+ <img src="<%= reply.author.avatar_url %>" title="<%= reply.author.name %>" />
+ </a>
+ </div>
+ <div class='user_info'>
+ <span class='reply_author'><a class='dark' href="/user/<%= reply.author.name %>"><%= reply.author.name %></a></span>
+ <span class='col_fade'>
+ <a href="#<%- reply._id %>"><%= reply.friendly_create_at %></a>
+ </span>
+ </div>
+ <div class='user_action fr'>
+ <% if (locals.current_user && current_user._id.toString() == reply.author._id.toString()) { %>
+ <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>
+ <% if (locals.current_user) { %>
+ <a href='javascript:void(0);' class='dark reply2_at_btn'>回复</a>
+ <% } %>
+ </span>
+ </div>
+ </div>
+ <div class='reply_content'>
+ <%- reply.content %>
+ </div>
</div>
24 views/topic/abstract.html
View
@@ -1,17 +1,17 @@
<div class='cell'>
- <div class='user_avatar block'>
- <a href="/user/<%= topic.author.name %>">
- <img src="<%= topic.author.avatar_url %>"
- title="<%= topic.author.name %> 创建于 <%= topic.friendly_create_at %>"
- />
- </a>
- </div>
<div class='user_avatar block'>
<% if(topic.reply) {%>
<a href="/user/<%= topic.reply.author.name %>">
<img src="<%= topic.reply.author.avatar_url %>"
- title="<%= topic.reply.author.name %> 回复于<%= topic.reply.friendly_create_at %>"
+ title="<%= topic.reply.author.name %>"
+ />
+ </a>
+ <% } %>
+ <% if(!topic.reply) {%>
+ <a href="/user/<%= topic.author.name %>">
+ <img src="<%= topic.author.avatar_url %>"
+ title="<%= topic.author.name %>"
/>
</a>
<% } %>
@@ -24,11 +24,17 @@
<div class='topic_wrap'>
<!--<%- partial('tag/tag_in_abstract',{collection:topic.tags, as:'tag'}) %>-->
- <a class='topic_title' href='/topic/<%= topic._id %>'>
+ <a class='' href='/topic/<%= topic._id %>'>
<% if(topic.top){%>
<span class='put_top'>置顶</span>
<% } %>
<%= topic.title %>
</a>
</div>
+ <% if(topic.reply) {%>
+ <div class='last_time'><%= topic.reply.friendly_create_at %></div>
+ <% } %>
+ <% if(!topic.reply) {%>
+ <div class='last_time'><%= topic.friendly_create_at %></div>
+ <% } %>
</div>
22 views/topic/index.html
View
@@ -47,12 +47,16 @@
<li class='active'>话题详情</li>
</ul>
</div>
- <div class='inner'>
- <h3><% if(topic.top){%>[置顶]<% } %><%= topic.title %></h3>
+ <div class='inner topic'>
+ <h3>
+ <% if(topic.top){%><span class='put_top'>置顶</span><% } %><%= topic.title %>
+ </h3>
+ <hr>
<div class='topic_content'>
<%- topic.content %>
</div>
<div class='sep10'></div>
+ <hr>
<% if (topic.tags.length > 0) { %>
<span class='col_fade'>标签:</span>
<%- partial('tag/tag_in_topic',{ collection: topic.tags, as: 'tag' }) %>
@@ -61,12 +65,12 @@
<% } %>
<div class='sep5'></div>
<span class='col_fade'>
- <a class='dark' href="/user/<%= topic.author.name %>"><%= topic.author.name %></a> 在 <%= topic.friendly_create_at %>发布
+ <a class='dark' href="/user/<%= topic.author.name %>"><%= topic.author.name %></a> 在 <%= topic.friendly_create_at %> 发布
</span>
<% if (topic.friendly_create_at != topic.friendly_update_at) { %>
<div class='sep5'></div>
<span class='col_fade'>
- <a class='dark' href="/user/<%= topic.author.name %>"><%= topic.author.name %></a> 在 <%= topic.friendly_update_at %>重新编辑
+ <a class='dark' href="/user/<%= topic.author.name %>"><%= topic.author.name %></a> 在 <%= topic.friendly_update_at %> 重新编辑
</span>
<% } %>
<span class='sp10'></span>
@@ -114,7 +118,7 @@
<div class='header'>
<span class='col_fade'>添加回复</span>
</div>
- <div class='inner'>
+ <div class='inner reply'>
<form id='reply_form' action='/<%= topic._id %>/reply' method='post'>
<div class='tabbable'>
<ul class='nav nav-pills'>
@@ -183,17 +187,17 @@
$('.reply2_btn').click(function () {
var $btn = $(this);
// var editor = $btn.parent().next('.reply2_area').find('.reply2_editor');
- var editor = $btn.parent().parent().find('.reply2_editor');
+ var editor = $btn.parents('.cell').find('.reply2_editor');
editor.slideToggle('fast');
editor.find('textarea').focus();
});
$('.reply2_at_btn').click(function () {
var $btn = $(this);
- var editor = $btn.parents('.reply2_area').find('.reply2_editor');
+ var editor = $btn.parents('.cell').find('.reply2_editor');
editor.show('fast');
editor.find('textarea').focus();
- var user = $btn.parents('.reply2_item').find('.reply_author').find('a').html();
+ var user = $btn.parents('.cell').find('.reply_author').find('a').html();
var textarea = editor.find('textarea');
if (textarea.val().indexOf(user) === -1) {
textarea.val(textarea.val() + ' @' + user + ' ');
@@ -230,13 +234,13 @@
prettyPrint();
});
+/*
$('.reply2_item').live('mouseover',function(){
$(this).find('.reply2_at_btn').show();
});
$('.reply2_item').live('mouseout',function(){
$(this).find('.reply2_at_btn').hide();
});
-/*
$(this).find('.reply2_btn').show();
$(this).find('.reply2_at_btn').show();
*/
12 views/topic/list.html
View
@@ -5,9 +5,9 @@
<ul>
<% var base_url = base + (base.indexOf('?') < 0 ? '?' : '&') + 'page='; %>
<% if (current_page == 1) { %>
- <li class='disabled'><a>«</a></li>
+ <li class='disabled'><a>«</a></li>
<% } else { %>
- <li><a href="<%= base_url %>1">«</a></li>
+ <li><a href="<%= base_url %>1">«</a></li>
<% } %>
<%
@@ -16,7 +16,7 @@
%>
<% if (page_start > 1) { %>
- <li><a>...</a></li>
+ <li><a>...</a></li>
<% } %>
<% for(var i = page_start; i <= page_end; i++) { %>
@@ -28,13 +28,13 @@
<% } %>
<% if (page_end < pages ) { %>
- <li><a>...</a></li>
+ <li><a>...</a></li>
<% } %>
<% if (current_page == pages) { %>
- <li class='disabled'><a>»</a></li>
+ <li class='disabled'><a>»</a></li>
<% } else { %>
- <li><a href='<%= base_url + pages %>'>»</a></li>
+ <li><a href='<%= base_url + pages %>'>»</a></li>
<% } %>
</ul>
</div>
2  views/user/index.html
View
@@ -8,7 +8,7 @@
<li class='active'><%= user.name %></li>
</ul>
</div>
- <div class='inner'>
+ <div class='inner userinfo'>
<div class='user_big_avatar'>
<img src="<%= user.avatar_url %>" class="user_avatar" title="<%= user.name %>" />
</div>
Something went wrong with that request. Please try again.