From 0d4dc89c73cd204d2a26e421b23eec183fbcb13d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 14 Dec 2016 10:17:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E7=9A=84ta?= =?UTF-8?q?b=E7=9A=84JS=E5=8F=8A=E5=85=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/show.html.erb | 145 ++++++++++++++++++--------- public/stylesheets/css/structure.css | 4 +- 2 files changed, 98 insertions(+), 51 deletions(-) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 98a85e341..953b898fb 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -4,96 +4,141 @@ $(function(){ $($(".homepage_tab_div")[$(".homepage_tab_div").length - 1]).css("border", "none"); }); + // 个人主页的tab + function g(o){ + return document.getElementById(o); + } + function HoverLi(n){ + g('message_all_list').className='undis'; + //如果有N个标签,就将i<=N; + for(var i = 1; i <= 6; i++){ + if (g('user_homepage_tab_'+i) != null) + g('user_homepage_tab_'+i).className='flex-cell_homepage'; + if(g('message_list_content_'+i) != null) + g('message_list_content_'+i).className='undis'; + } + g('message_list_content_'+1).className='dis'; + g('user_homepage_tab_'+n).className='homepageClickBackground'; + } <% if is_current_user %> -
-
-
-
+ + <% end %> - - - - - - - - + + + + + + + - + <% end %>
-
-
- 消息动态 -
+
+
+
+ 消息动态 +
<%= @message_count %> 个消息 -
-
-
- <%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %> +
+
+
+ <%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %> +
- + +
+ +
<% else %>
Ta的动态
diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index 62cc100d7..878931598 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -682,4 +682,6 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex .messageApplyContents{ width:200px; max-width:250px; margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; } .longMessageWidth { max-width: 610px; float:left; } .shortMessageWidth { max-width: 540px; float:left; } -.messageInformationContents{ margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height:49px; float:left; } \ No newline at end of file +.messageInformationContents{ margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height:49px; float:left; } +.homepageBackground{ background-color:#90C5EC; flex:1; text-align: center } +.homepageClickBackground{ background-color:#3b94d6; flex:1; text-align: center } \ No newline at end of file