调整首页布局
This commit is contained in:
parent
bad170fdb2
commit
92078e6ac8
|
@ -100,45 +100,62 @@
|
|||
<div class="welcome_left" >
|
||||
<span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_contest) %></span> <span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_contest_description) %></span>
|
||||
</div>
|
||||
<div style="width: 45%; height: 40px; border: 1px solid black; float:right;">
|
||||
|
||||
<!--网站状态-->
|
||||
<div style="width: 20%; height: 60px; border: 1px solid black; float:right;">
|
||||
<tr>
|
||||
<td>竞赛总量:</td>
|
||||
<td></td>
|
||||
</tr><br>
|
||||
<tr>
|
||||
<td>竞赛总人数:</td>
|
||||
<td></td>
|
||||
</tr><br />
|
||||
<tr>
|
||||
<td>竞赛项目或应用总数:</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-bar">
|
||||
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
|
||||
|
||||
<!--搜索框-->
|
||||
<!-- <div class="align-right">
|
||||
<%= text_field_tag 'name', params[:name], :size => 48 %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise" %>
|
||||
</div> -->
|
||||
|
||||
<div style="width: 57%;margin: 10px auto;">
|
||||
<%= form_tag( method: 'post') do %>
|
||||
<%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:400px;'%>
|
||||
|
||||
<%= submit_tag l(:label_search), :class => "enterprise"%>
|
||||
<% end %>
|
||||
<div class='font_lighter' style="display: inline-block; margin-top:3px;">竞赛相关内容搜索,如竞赛题目,参赛题目,参赛人名等。</div>
|
||||
</div>
|
||||
<!-- <div class="search-bar">
|
||||
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
|
||||
</div> -->
|
||||
<div style="clear:both"></div>
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong>热门项目</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
|
||||
|
||||
<h3 style="margin-left: 5px; color: color: (51, 119, 51);"><strong>最新热门竞赛</strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1, :host => Setting.contest_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_miracle_project(10, 3).map do |project| %>
|
||||
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
||||
<div style="float: left;">
|
||||
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
||||
</div>
|
||||
<!-- 上左下右 -->
|
||||
<div style="float: left; margin-left: 10px; width: 380px;">
|
||||
<%= link_to( project.name, project_path(project.id), :class => "d-g-blue d-p-project-name",:title => "#{project.name}" )%>
|
||||
(<%= link_to "#{projectCount(project)}人", project_member_path(project) ,:course =>'0' %>)
|
||||
</div>
|
||||
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=project.description.to_s%>><%=project.description.truncate(50, omission: '...')%></span>
|
||||
</div>
|
||||
<div style="position:absolute; bottom:0;right:0;margin:5px 10px 5px 5px ;">
|
||||
<%= content_tag "span", show_grade(project),
|
||||
:style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ",
|
||||
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
||||
:class => "tooltip",
|
||||
:id => "tooltip-#{project.id}" %>
|
||||
</p>
|
||||
</div>
|
||||
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[10]) %>
|
||||
<li style="background-image:none;">
|
||||
<p class="layout">
|
||||
<span style = "background: url('/images/007.gif') no-repeat scroll ;background-position: left center;"><%= link_to( contest.name, respond_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}",
|
||||
:style => "margin-left: 28px;", :target => "_blank") %></span>
|
||||
</p>
|
||||
<p class="layout-1" >
|
||||
<%= content_tag "span", contest.description.truncate(50, omission: '...'), :class => "d-p-project-intro" , :title => contest.description %>
|
||||
</p>
|
||||
</li>
|
||||
<% end; reset_cycle %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue