From 67bec27f34a20616e702d1c0af9983653a659221 Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 21 Nov 2013 17:11:55 +0800 Subject: [PATCH] . --- app/views/welcome/index.html.erb | 199 +++++++++++++++++++------------ public/stylesheets/welcome.css | 62 ++++++++++ 2 files changed, 182 insertions(+), 79 deletions(-) create mode 100644 public/stylesheets/welcome.css diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 9b25e5acd..1f279bb7a 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -5,9 +5,6 @@ <%= l(:label_welcome_trustie) %> , <%= l(:label_welcome_trustie_description) %> - @@ -15,63 +12,66 @@ + + + + + +
<%= call_hook :view_account_login_top %>
<%= form_tag(signin_path) do %> - <%= back_url_hidden_field_tag if is_logout? %> - <% unless User.current.logged? %> - - - - - - - - - - <% if Setting.openid? %> - - - - - <% end %> - - - - - - - - -
<%= text_field_tag 'username', params[:username], :tabindex => '1' %>
<%= password_field_tag 'password', nil, :tabindex => '2' %>
<%= text_field_tag "openid_url", nil, :tabindex => '3' %>
<% if Setting.autologin? %> <% end %>
<% if Setting.lost_password? %> - <%= link_to l(:label_password_lost), lost_password_path %> - <% end %> - -
- <% else %> -
- - - - - - - - + <%= back_url_hidden_field_tag if is_logout? %> + <% unless User.current.logged? %> +
<%= l(:label_welcome) %> <%=link_to User.current.lastname< <%= l(:label_join) %>
+ + + + + + + + + <% if Setting.openid? %> + + + + + <% end %> + + + + + + + + +
<%= text_field_tag 'username', params[:username], :tabindex => '1' %>
<%= password_field_tag 'password', nil, :tabindex => '2' %>
<%= text_field_tag "openid_url", nil, :tabindex => '3' %>
+ <% if Setting.autologin? %> + <% end %> +
+ <% if Setting.lost_password? %> + <%= link_to l(:label_password_lost), lost_password_path %> + <% end %> + + +
+ <% else %> +
+ + + + + + - - - - - - -
<%= l(:label_welcome) %> <%=link_to User.current.lastname< <%= l(:label_join) %>
<%= image_tag(url_to_avatar(User.current), :class => 'avatar') %><%= link_to l(:label_user_watcher)+"("+User.watched_by(User.current).count.to_s+")", user_path(User.current) %>  - <%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+User.current.watcher_users(User.current.id).count.to_s+")", user_path(User.current) %>
<% unless User.current.memberships.empty? %> - <%= l(:label_x_welcome_participate, :count => User.current.memberships.count) %> <%= link_to User.current.memberships.count, {:controller => 'users', :action => 'user_projects', :id => User.current} %> <%= l(:label_welcome_participate_project)%> - <% end %> -
- -
+
<%= image_tag(url_to_avatar(User.current), :class => 'avatar') %><%= link_to l(:label_user_watcher)+"("+User.watched_by(User.current).count.to_s+")", user_path(User.current) %>  + <%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+User.current.watcher_users(User.current.id).count.to_s+")", user_path(User.current) %>
<% unless User.current.memberships.empty? %> + <%= l(:label_x_welcome_participate, :count => User.current.memberships.count) %> <%= link_to User.current.memberships.count, {:controller => 'users', :action => 'user_projects', :id => User.current} %> <%= l(:label_welcome_participate_project)%> + <% end %> +
+ + <% end %> <% end %> - <% end %> - <%= call_hook :view_account_login_bottom %> + + <%= call_hook :view_account_login_bottom %> <% if params[:username].present? %> <%= javascript_tag "$('#password').focus();" %> @@ -100,37 +100,78 @@ } } +<%= stylesheet_link_tag 'welcome' %> +
+
+
热门项目
+ + +
+ + +
+
+
新手指引 & 问答
+ + + + +
+
+ + +






- + + + - + + - - -
<%= l(:label_welcome_leave_message) %> <%= toggle_link l(:label_welcome_click_me), 'put-bid-form', {:focus => 'new_form_project_message'} %>
<%= l(:label_welcome_leave_message) %> <%= toggle_link l(:label_welcome_click_me), 'put-bid-form', {:focus => 'new_form_project_message'} %> +
-
+ +
+
diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css new file mode 100644 index 000000000..dfe99573c --- /dev/null +++ b/public/stylesheets/welcome.css @@ -0,0 +1,62 @@ +.body_resize { width:950px; margin:0 auto; padding:0;} +.left { width:371px; float:left; margin:20px 5px 10px 5px; padding:5px;} + +.right { width:527px; float:left; margin:20px 5px 10px 5px; padding:5px;} +.right ul { list-style:none; margin:5px 20px; padding:0;} +.right li { font: bold 12px Arial, Helvetica, sans-serif; color:#6f6f6f; padding:5px 20px; margin:0; background:url(images/about_ul_li.gif) left no-repeat;} + + +.body { background:#ebebeb; border-bottom:1px solid #fff; } /*没用到*/ + +.home { + font:bold 16px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif; + color:#2c2c2c; + border-bottom:1px solid #cccccc; + padding:10px 5px; + margin:0 0 10px 0; +} + +p { + font:normal 13px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif; + color:#6f6f6f; + line-height:1.8em; + padding:5px 5px; + margin:0; +} + +div.project { + font:normal 15px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif; + color:#6f6f6f; + line-height:1.8em; + padding:5px 5px; + margin:0; + border-bottom:1px solid #eeeeee; + width: 95%; + float: right; +} +div.project a{ + color: #5B5B5B; +} +/*div.project{ + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; +}*/ + +span.grey { + float: right; + font: normal 13px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif; + color:#afaeae; + line-height:1.8em; + padding:5px 5px; + margin:0; +} +p.clr, .clr { clear:both; padding:0; margin:0; background:none;} + + + + + + +