2014-04-03 17:26:56 +08:00
|
|
|
|
<%= stylesheet_link_tag 'welcome' %>
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
|
function clearInfo(id, content) {
|
|
|
|
|
var text = $('#' + id);
|
|
|
|
|
if (text.val() == content) {
|
|
|
|
|
$('#' + id).val('');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(function(){
|
|
|
|
|
$("#main").find("a").attr("target", "_blank");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function showInfo(id, content) {
|
|
|
|
|
var text = $('#' + id);
|
|
|
|
|
if (text.val() == '') {
|
|
|
|
|
$('#' + id).val(content);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 给主页用户弹新页面
|
|
|
|
|
$(document).ready(function($) {
|
|
|
|
|
$("#loggedas").find("a").attr("target", "_blank");
|
|
|
|
|
//$("#content .tabs_new~ .pagination").find("a").removeAttr("target");
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
(function (){
|
|
|
|
|
window.onload = function(){
|
|
|
|
|
function fixedBar(id, options){
|
|
|
|
|
var ele = document.getElementById(id);
|
|
|
|
|
if(!ele) return;
|
|
|
|
|
if(/msie (\d+\.\d+)/i.test(navigator.userAgent)){
|
|
|
|
|
var pageHeight=window.innerHeight;
|
|
|
|
|
var d=document;
|
|
|
|
|
if(typeof pageHeight!="number"){
|
|
|
|
|
if(document.compatMode=="CSS1Compat"){
|
|
|
|
|
pageHeight=document.documentElement.clientHeight;
|
|
|
|
|
}else{
|
|
|
|
|
pageHeight=document.body.clientHeight;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop;
|
|
|
|
|
if(options.addclass) ele.className = options.addclass;
|
|
|
|
|
ele.style.position= 'absolute';
|
|
|
|
|
|
|
|
|
|
if(options.show){
|
|
|
|
|
ele.style.top = 0 + "px";
|
|
|
|
|
ele.style.display= 'block';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.attachEvent('onscroll' , function (){
|
|
|
|
|
|
|
|
|
|
var ieScrollTop=window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop;
|
|
|
|
|
|
|
|
|
|
ele.style.top = 0 + "px";
|
|
|
|
|
if(options.autoHidden){
|
|
|
|
|
if(ieScrollTop==0){
|
|
|
|
|
ele.style.display="none";
|
|
|
|
|
}else{
|
|
|
|
|
ele.style.display="block";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
var ele = document.getElementById(id);
|
|
|
|
|
if(typeof pageHeight!="number"){
|
|
|
|
|
if(document.compatMode=="CSS1Compat"){
|
|
|
|
|
pageHeight=document.documentElement.clientHeight;
|
|
|
|
|
}else{
|
|
|
|
|
pageHeight=document.body.clientHeight;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(options.show) ele.style.display= 'block';
|
|
|
|
|
ele.style.top = 0 +'px';
|
|
|
|
|
window.addEventListener('scroll',function (){
|
|
|
|
|
if(options.autoHidden){
|
|
|
|
|
if(baidu.page.getScrollTop()==0){
|
|
|
|
|
ele.style.display="none";
|
|
|
|
|
}else{
|
|
|
|
|
ele.style.display="block";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fixedBar('backTopBtn' , {autoHidden: true, top : 186});
|
|
|
|
|
fixedBar('identifier-pannel' , {autoHidden: false , top : 956 , show : true});
|
|
|
|
|
}
|
|
|
|
|
})();
|
|
|
|
|
</script>
|
2014-03-31 10:56:29 +08:00
|
|
|
|
<div class='top_bar'>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
<div id="identifier-pannel" style="display:none">
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
<div class="weixin-content">微信扫码</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="main-content-bar">
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<!--文字-->
|
2014-04-25 10:57:52 +08:00
|
|
|
|
<div style="float: left">
|
|
|
|
|
<%= image_tag '/images/transparent.png', size: "75x75" %>
|
2014-04-25 11:01:06 +08:00
|
|
|
|
</div>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
<div class="welcome_left" >
|
2014-04-25 11:01:06 +08:00
|
|
|
|
|
2014-04-03 17:26:56 +08:00
|
|
|
|
<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>
|
2014-04-09 10:24:44 +08:00
|
|
|
|
<!--网站状态-->
|
2014-04-16 09:52:36 +08:00
|
|
|
|
<!-- <div class="contest_count">
|
2014-04-09 10:24:44 +08:00
|
|
|
|
<tr>
|
|
|
|
|
<td>竞赛总量:</td>
|
|
|
|
|
<td></td>
|
|
|
|
|
</tr><br>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>竞赛总人数:</td>
|
|
|
|
|
<td></td>
|
|
|
|
|
</tr><br />
|
|
|
|
|
<tr>
|
|
|
|
|
<td>竞赛项目或应用总数:</td>
|
|
|
|
|
<td></td>
|
|
|
|
|
</tr>
|
2014-04-16 09:52:36 +08:00
|
|
|
|
</div> -->
|
|
|
|
|
<!--搜索框-->
|
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
|
|
|
|
<%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %>
|
2014-04-16 21:16:51 +08:00
|
|
|
|
<%= text_field_tag 'name', params[:name], placeholder:'请输入要搜索的关键字', name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%>
|
2014-04-16 09:52:36 +08:00
|
|
|
|
|
|
|
|
|
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
|
|
|
|
<%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!-- <div class='font_lighter' style="display: inline-block; margin-top:3px;">竞赛相关内容搜索,如竞赛题目,参赛题目,参赛人名等。</div> -->
|
2014-04-03 17:26:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-04-09 10:24:44 +08:00
|
|
|
|
|
2014-04-03 17:26:56 +08:00
|
|
|
|
<div style="clear:both"></div>
|
|
|
|
|
|
2014-04-09 10:24:44 +08:00
|
|
|
|
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<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 => 'contests', :action => 'index', :host => Setting.contest_domain}, :target => "_blank" %></span>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
<div class="d-p-projectlist-box">
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<div class="d-p-projectlist">
|
2014-04-25 10:10:36 +08:00
|
|
|
|
<% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
|
|
|
|
|
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
2014-04-16 20:23:38 +08:00
|
|
|
|
<div class="avatar-4"; style="float: left; margin-top: 7px">
|
2014-04-22 19:27:31 +08:00
|
|
|
|
<%= image_tag('/images/contest1.png')%>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2014-04-22 19:27:31 +08:00
|
|
|
|
<div style="float: left; margin-left: 12px; margin-top: 10px; margin-bottom: -4px; width: 380px;">
|
2014-04-25 10:10:36 +08:00
|
|
|
|
<!-- <%= link_to(contest.name, contest.event_url, :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %> -->
|
|
|
|
|
<%= link_to(contest.name, show_contest_contest_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %>
|
2014-05-04 21:16:00 +08:00
|
|
|
|
<span class="font_lighter">(<span style="font-size: 17px"><%= link_to("含#{contest.contesting_softapplications.count}个app", show_softapplication_contest_path(contest), :target => "_blank") %></span>)</span>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2014-04-22 19:27:31 +08:00
|
|
|
|
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 12px; margin-bottom: 2px; width: 380px;">
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<span class='font_lighter' title =<%=contest.description.to_s%>><%=contest.description.truncate(50, omission: '...')%></span>
|
|
|
|
|
</div><br />
|
|
|
|
|
|
2014-04-22 19:27:31 +08:00
|
|
|
|
<div style="padding-left: 57px; clear: left;">
|
2014-04-19 13:10:25 +08:00
|
|
|
|
|
2014-04-19 10:56:18 +08:00
|
|
|
|
<span class="font_lighter">发布时间:<%=format_time contest.created_on %></span>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2014-04-03 17:26:56 +08:00
|
|
|
|
</li>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<% end; reset_cycle %>
|
|
|
|
|
|
|
|
|
|
</div>
|
2014-03-31 10:56:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
|
2014-04-16 17:32:58 +08:00
|
|
|
|
|
2014-04-03 17:26:56 +08:00
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
|
2014-04-16 09:52:36 +08:00
|
|
|
|
<h3 style="padding-bottom:px ;margin-left: 5px; color: #e8770d;">
|
|
|
|
|
<strong>问题和反馈动态</strong>
|
|
|
|
|
<%= link_to "我要提问" , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
|
|
|
|
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
|
|
|
|
</h3>
|
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
|
|
|
|
<div class="d-p-projectlist-box">
|
|
|
|
|
<ul class="d-p-projectlist">
|
2014-04-16 21:16:51 +08:00
|
|
|
|
<% find_new_forum_topics(11).each do |topic|%>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<li class="message-brief-intro" style="min-height: 60px; line-height:2em; ">
|
2014-04-16 09:52:36 +08:00
|
|
|
|
<div style="display: inline-block; width: 100%;">
|
2014-05-09 14:49:03 +08:00
|
|
|
|
<span class="memo_activity" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">
|
|
|
|
|
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
|
2014-04-16 09:52:36 +08:00
|
|
|
|
</span>
|
|
|
|
|
<br>
|
|
|
|
|
<span style="margin-left: 24px; color: rgb(172, 174, 177); white-space: nowrap; font-size: 9pt !important;;"><%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前</span>
|
|
|
|
|
<span style="margin-left: 8px; margin-bottom: 0px; color: rgb(172, 174, 177) !important; white-space: nowrap;">
|
|
|
|
|
由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);" %> 发表
|
|
|
|
|
</span>
|
|
|
|
|
<span style="float: right; color: rgb(172, 174, 177); white-space: nowrap; font-size: 9pt !important;;">回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url %>)</span>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
</li>
|
2014-04-16 09:52:36 +08:00
|
|
|
|
<% end %>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2014-04-16 09:52:36 +08:00
|
|
|
|
</div>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
|
|
|
|
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong>最新参赛应用</strong></h3>
|
2014-04-30 15:28:22 +08:00
|
|
|
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", {:controller => 'softapplications', :action => 'index', :host => Setting.contest_domain}, :target => "_blank" %></span>
|
2014-04-11 09:00:00 +08:00
|
|
|
|
<div class="d-p-projectlist-box">
|
2014-04-21 19:36:05 +08:00
|
|
|
|
<% if Softapplication.count > 0%>
|
|
|
|
|
<div class="d-p-projectlist">
|
|
|
|
|
<% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
|
2014-04-21 19:36:05 +08:00
|
|
|
|
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
|
|
|
|
<div class="avatar-4"; style="float: left; margin-top: 7px">
|
2014-04-22 19:27:31 +08:00
|
|
|
|
<%= image_tag('/images/app1.png')%>
|
2014-04-21 19:36:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2014-04-22 19:27:31 +08:00
|
|
|
|
<div style="float: left; margin-left: 10px; margin-top: 7px;margin-bottom: -2px; width: 380px;">
|
2014-04-21 19:36:05 +08:00
|
|
|
|
<%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %>
|
|
|
|
|
</div>
|
|
|
|
|
|
2014-04-22 19:27:31 +08:00
|
|
|
|
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; margin-bottom:1px; width: 380px;">
|
2014-04-21 19:36:05 +08:00
|
|
|
|
<span class='font_lighter' title =<%=softapplication.description.to_s%>><%=softapplication.description.truncate(50, omission: '...')%></span>
|
|
|
|
|
</div><br />
|
|
|
|
|
|
2014-04-22 19:27:31 +08:00
|
|
|
|
<div style="padding-left: 55px; clear: left;">
|
2014-04-21 19:36:05 +08:00
|
|
|
|
<span class="font_lighter">发布时间:<%=format_time softapplication.created_at %></span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
<% end; reset_cycle %>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
|
2014-04-21 19:36:05 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
2014-04-21 19:37:23 +08:00
|
|
|
|
<p class="font_lighter"><%= l(:label_no_ftapplication) %></p>
|
2014-04-16 17:32:58 +08:00
|
|
|
|
|
2014-04-21 19:36:05 +08:00
|
|
|
|
<% end %>
|
2014-04-11 09:00:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
|
2014-04-16 17:32:58 +08:00
|
|
|
|
<div class="clearfix"></div>
|
2014-04-03 17:26:56 +08:00
|
|
|
|
|
2014-03-31 10:56:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|