From 1af4e4f71232f2e93d7a8708c880bc186c9a9c24 Mon Sep 17 00:00:00 2001 From: yanxd Date: Mon, 23 Dec 2013 19:45:51 +0800 Subject: [PATCH] welcome index css. --- app/views/layouts/_base_header.html.erb | 10 - app/views/welcome/index.html.erb | 369 ++++++++---------------- public/stylesheets/application.css | 6 +- 3 files changed, 116 insertions(+), 269 deletions(-) diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 516bdaa4e..a2f0cde18 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -8,16 +8,6 @@ <%= content_tag('div', "#{link_to(l(:label_layouts_feedback)+'(' + User.current.count_new_jour.to_s + ')', feedback_path(User.current))}".html_safe, :id => 'loggedas') if User.current.logged? %> <%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %> <%= render_menu :top_menu if User.current.logged? || !Setting.login_required? -%> - - - - - -
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 5d142c4f4..0ff079978 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,83 +1,71 @@ - -
-
- - -
<%= l(:label_welcome_trustie) %> , <%= l(:label_welcome_trustie_description) %>
+
+
+

+ <%= l(:label_welcome_trustie) %> , <%= l(:label_welcome_trustie_description) %> +

- - - + + + +
<%= call_hook :view_account_login_top %> -
- <%= form_tag(signin_path) do %> - <%= back_url_hidden_field_tag if is_logout? %> - <% unless User.current.logged? %> - - - - +
+ <%= call_hook :view_account_login_top %> +
+ <%= form_tag(signin_path) do %> + <%= back_url_hidden_field_tag if is_logout? %> + <% unless User.current.logged? %> +
<%= text_field_tag 'username', params[:username], :tabindex => '1' %>
+ + + + + + + + + + + - - - - - <% if Setting.openid? %> - - - - - <% end %> - - - - - - - - -
<%= text_field_tag 'username', params[:username], :tabindex => '1' %>
<%= password_field_tag 'password', nil, :tabindex => '2' %>
<% if Setting.autologin? %> <% end %>
<%= 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 %> -
- -
- <% 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 %> +
+
<% end %> -
<%= call_hook :view_account_login_bottom %> + <% end %> +
+ <%= call_hook :view_account_login_bottom %> - <% if params[:username].present? %> - <%= javascript_tag "$('#password').focus();" %> - <% else %> - <%= javascript_tag "$('#username').focus();" %> - <% end %> - - - + <% if params[:username].present? %> + <%= javascript_tag "$('#password').focus();" %> + <% else %> + <%= javascript_tag "$('#username').focus();" %> + <% end %>
- - - + - + <%= stylesheet_link_tag 'welcome' %>
-
-
    -
    -

    贴吧动态

    - - <%= link_to "更多>>", forums_path %> -
    - - -
    - <% find_new_forum_topics(8).each do |topic|%> -
  • -
    -       - <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;"%> - -
    - <%=time_tag_welcome(topic_last_time topic)%>前 - - 由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);"%> 发表 - - 回复(<%= link_to topic.replies_count, topic.event_url %>) -
    -
  • - <% end %> -
    -
-
+
+
    +
    +

    贴吧动态

    -
    -
      -

      用户动态

      - <%= link_to "更多>>", { :controller => 'users', :action => 'index'} %> -
      - <% find_all_activities.each do |event| %> -
    • -
      - <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> -
      -
      - <%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;" %><%= show_user_content event %> -

      <%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

      -
      -
    • - <% end %> + <%= link_to "更多>>", forums_path %> +
      + +
      + <% find_new_forum_topics(8).each do |topic|%> +
    • +
      +       + <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;"%> + +
      + <%=time_tag_welcome(topic_last_time topic)%>前 + + 由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);"%> 发表 + + 回复(<%= link_to topic.replies_count, topic.event_url %>) +
      +
    • + <% end %>
    +
    + +
    +
      +

      用户动态

      + <%= link_to "更多>>", { :controller => 'users', :action => 'index'} %> +
      + <% find_all_activities.each do |event| %> +
    • +
      + <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> +
      +
      + <%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;" %><%= show_user_content event %> +

      <%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

      +
      +
    • + <% end %> +
      +
    +
    -

    热门项目

    - <%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0} %> -
    +

    热门项目

    + <%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0} %> +
      <% find_all_hot_project.map do |project| break if(project == find_all_hot_project[15]) %>
    • @@ -294,7 +154,6 @@

      <%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name", :title => "#{project.name}")%> - <%= content_tag "span", show_grade(project), :style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ", :title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度", @@ -362,8 +221,8 @@

      -

      热门众包

      - <%= link_to "更多>>", {:controller => 'bids', :action => 'index'} %> +

      热门众包

      + <%= link_to "更多>>", {:controller => 'bids', :action => 'index'} %>
        <% find_all_hot_bid.map do |bid| break if(bid == find_all_hot_bid[5]) %> @@ -388,9 +247,7 @@






        -
        - diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 9f0f648ba..533126eb2 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -732,7 +732,7 @@ ul.tool li{list-style-type:none; .font_tool{ font-family:微软雅黑; font-size:14px; - color: 1a1a1a; + color: #1a1a1a; padding-left: 6px; } @@ -743,8 +743,8 @@ ul.tool li{list-style-type:none; .welcome_left{ margin-top: 70px; float:left; + padding-left: 10px; width: 49%; - padding-left: 0px; } .welcome_right{ @@ -1490,7 +1490,7 @@ margin-left:-10px; background:#fff; text-align:left; - margin-top: 50px; + margin-top: 50px; width:320px; font-family:微软雅黑,lucida grande,verdana;