From 2ba8bb8fd0e3348245ce726005924e7d86155f4d Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Thu, 28 Nov 2013 17:15:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86forums=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E6=98=BE=E7=A4=BA=EF=BC=8C=E9=99=90=E5=88=B6=E4=BA=86?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E7=94=A8=E6=88=B7=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_forum_list.html.erb | 52 +++--------- app/views/layouts/base_forums.html.erb | 2 +- app/views/layouts/base_memos.html.erb | 2 +- public/stylesheets/application.css | 112 +++++++++++++++---------- 4 files changed, 81 insertions(+), 87 deletions(-) diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index 671bb3a0..faf1cbe5 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -2,47 +2,17 @@
<% if forums.any? %> <% forums.each do |forum| %> - - - - - -
<%= link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator) %> - - - - - - - - - - - - - - -
<%= link_to h(forum.name), forum_path(forum) %> - - - - - - - - - -
<%= link_to (forum.topic_count), forum_path(forum) %><%= link_to (forum.memo_count), forum_path(forum) %>
帖子回答
<%= forum.description%>
-
-
- <%= image_tag( "/images/sidebar/tags.png") %> - <%= render :partial => 'tags/tag_name', :locals => {:obj => forum,:object_flag => "5",:non_list_all => true }%> -
-
-
<%= authoring forum.created_at, forum.creator %> -
-
- <% end %> +
+
<%= link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator) %>
+
+

<%= link_to h(forum.name), forum_path(forum) %>

+

<%= forum.description%>

+

<%= authoring forum.created_at, forum.creator %>

+
+ +
<%= link_to (forum.memo_count), forum_path(forum) %><%= link_to (forum.topic_count), forum_path(forum) %>
回答帖子
+
+ <% end %> <% else %> <% end %> diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 25d9b5d5..782a940c 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -55,7 +55,7 @@
创建人信息
- <%= image_tag(url_to_avatar(@forum.creator), :class => 'avatar2') %> + <%= image_tag(url_to_avatar(@forum.creator), :class =>'vatar-size') %> <%=link_to @forum.creator.show_name, user_path(@forum.creator) %>
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@forum.creator.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist", :id => @forum.creator.id %> diff --git a/app/views/layouts/base_memos.html.erb b/app/views/layouts/base_memos.html.erb index f1b4258e..37d58c14 100644 --- a/app/views/layouts/base_memos.html.erb +++ b/app/views/layouts/base_memos.html.erb @@ -57,7 +57,7 @@
创建人信息
- <%= image_tag(url_to_avatar(@forum.creator), :class => 'avatar2') %> + <%= image_tag(url_to_avatar(@forum.creator), :class => 'vatar-size') %> <%=link_to @forum.creator.show_name, user_path(@forum.creator) %>
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@forum.creator.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist", :id => @forum.creator.id %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 96333e2d..72da6759 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -7,46 +7,70 @@ h2, .wiki h1 {font-size: 20px;} h3, .wiki h2 {font-size: 15px;} h4, .wiki h3 {font-size: 13px;} h4 {border-bottom: 1px dotted #bbb;} - - -/*new by huang*/ -/**/ -/*new code reconstruction*/ -/*div.forums-welcome{ - width: 30%; -} - -.forums-welcome-title{ - font-weight: bold; - margin-bottom:10px; - border-bottom: solid 1px rgb(204, 204, 204); -} - -span.forums-welcome-massage{ - display: block; - height: 30px; - border: 1px solid #15bccf; - border-bottom: 1px solid #15bccf; - border-right: 1px solid #15bccf; - background: white; - position: relative; +/*huang*/ +/*current position*/ +div.positon-f{ float: left; - width: 80%; } -span.forums-welcome-massage-right{ - display: block; - height: 30px; - border: 1px solid #15bccf; - border-bottom: 1px solid #15bccf; - border-right: 1px solid #15bccf; - background: white; - position: relative; - float: right; - width: 18.5%; - background-color: #15bccf; - height: 30px; -}*/ +div.position-s{ + +} + +div.position-t{ + +} +/*end current position*/ +/*forums-index*/ +div.forums-index{ + padding-left: 10px; + padding-top: 10px; + float: left; + width: 100%; + border-bottom: 1px dashed rgb(204, 204, 204); +} +div.forums-inex-avatar{ + padding-left: 15px; + float: left; + width: 7%; +} + +div.forums-index-content{ + float: left; + width: 72%; + line-height: 1em; +} + +div.forums-index-count{ + padding-top: 10px; + float: right; + padding-right: 40px; + +} +table.forums-count-color{ + width: 80px; + height: 60px; + background-color: #e5e2e2; + +} + +table.forums-count-color tr{ + font-weight: bold; + font-size: 14px; + background-color: #e5e2e2; + vertical-align: middle; + alignment-adjust: middle; + +} +/*forums-index end*/ +.vatar-size{ + height: 70px; + width: 70px; +} + +div.position-title{ + line-height: 0.5em; +} div.sidebar-forums{ padding-left: 8px; @@ -86,12 +110,12 @@ div.forums-description{ span.forums-avatar-left{ float:left; - width: 23%; + width: 27%; } span.forums-avatar-right{ float: right; - width: 70%; + width: 65%; } .formus-first-title{ @@ -584,16 +608,15 @@ ul.tool li{list-style-type:none; .spaceright{float:left; width:620px;} .welcome_left{ - margin-top: 70px; - margin-left: -20px; + margin-top: 70px; float:left; - width: 30%; + width: 49%; } .welcome_right{ - float:right; + float:left; width: 49%; - padding-left: 30px; + } .inf_user_motto{ @@ -1060,6 +1083,7 @@ html>body #content { min-height: 600px; } #main.nosidebar #sidebar{ display: none; } #main.nosidebar #content{ width: auto; border-right: 0; } + #footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;} #login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; }