@ -7,9 +7,9 @@
<div class="banner">
<div class="banner">
<ul class="img">
<ul class="img">
<!--<li><a href="https://www.educoder.net/courses/1410" target="_blank"><img src="/images/educoder/recom_1.jpg" id="b-img-1"/></a></li>-->
<!--<li><a href="https://www.educoder.net/courses/1410" target="_blank"><img src="/images/educoder/recom_1.jpg" id="b-img-1"/></a></li>-->
<% if @images.present? %>
<% if @images_url .present? %>
<% @images.each do |image| %>
<% @images_url .each do |image| %>
<li><a href="<%= image.link %>" target="_blank"><img src="/images/avatars/PortalImage/<%= image.id %>" id="b-img-1"/></a></li>
<li><a href="<%= image[:path] %>" target="_blank"><img src="<%= image[:image_url] %>" id="b-img-1"/></a></li>
<% end %>
<% end %>
<% else %>
<% else %>
<li><a href="<%= competition_path(:id => "gcc-dev-2018") %>" target="_blank"><img src="/images/educoder/recom_1.jpg" id="b-img-1"/></a></li>
<li><a href="<%= competition_path(:id => "gcc-dev-2018") %>" target="_blank"><img src="/images/educoder/recom_1.jpg" id="b-img-1"/></a></li>
@ -28,15 +28,17 @@
<div class="user_navlist">
<div class="user_navlist">
<div class="user_navlist_black">
<div class="user_navlist_black">
<ul class="black_nav_list">
<ul class="black_nav_list">
<% @repertoires .each do |rep| %>
<% @rep_list .each do |rep| %>
<li class="welcome_shixun_index" data-id="<%= rep.id %>" data-type="rep">
<li class="welcome_shixun_index" data-id="<%= rep[:rep_id] %>" data-type="rep">
<span class="black_nav_span clearfix font-12"><%= rep.name %><img src="/images/educoder/icon/downarrowsmall-right.svg" class="fr mt15 transform-90"></span>
<span class="black_nav_span clearfix font-12"><%= rep[:rep_name] %><img src="/images/educoder/icon/downarrowsmall-right.svg" class="fr mt15 transform-90"></span>
<ul class="user_navlist_white">
<ul class="user_navlist_white">
<% rep.sub_repertoires .each do |sub| %>
<% rep[:sub_rep_list] .each do |sub| %>
<div class="clearfix mt20 mb5 pb10 navlistpanel-line">
<div class="clearfix mt20 mb5 pb10 navlistpanel-line">
<p class="little-title clearfix welcome_shixun_index" data-id="<%= sub.id %>" data-rep-id="<%= rep.id %>" data-type="sub"><%= sub.name %></p>
<p class="little-title clearfix welcome_shixun_index" data-id="<%= sub[:sub_rep_id] %>"
<% sub.tag_repertoires.each do |tag| %>
data-rep-id="<%= rep[:id] %>" data-type="sub"><%= sub[:sub_rep_name] %></p>
<a href="javascript:void(0)" class="welcome_shixun_index" data-id="<%= tag.id %>" data-rep-id="<%= rep.id %>" data-sub-id="<%= sub.id %>" data-type="tag"><%= tag.name %></a>
<% sub[:tag_rep_list].each do |tag| %>
<a href="javascript:void(0)" class="welcome_shixun_index" data-id="<%= tag[:tag_id] %>"
data-rep-id="<%= rep[:id] %>" data-sub-id="<%= sub[:sub_rep_id] %>" data-type="tag"><%= tag[:tag_name] %></a>
<% end %>
<% end %>
</div>
</div>
<% end %>
<% end %>
@ -55,7 +57,7 @@
<p class="color-dark edu-txt-center font-24" style="line-height: 30px">精选实训</p>
<p class="color-dark edu-txt-center font-24" style="line-height: 30px">精选实训</p>
<p class="color-grey-cd font-12">SELECTED TRAINING</p>
<p class="color-grey-cd font-12">SELECTED TRAINING</p>
</div>
</div>
<a href="<%= shixuns_path() %>" class="moreitem">更多<i class="fa fa-angle-right ml5"></i></a>
<a href="<%= shixuns_path %>" class="moreitem">更多<i class="fa fa-angle-right ml5"></i></a>
<div class="square-list clearfix">
<div class="square-list clearfix">
<%= render :partial => "shixuns/shixun_item", :locals => {:shixuns => @shixuns} %>
<%= render :partial => "shixuns/shixun_item", :locals => {:shixuns => @shixuns} %>
</div>
</div>
@ -133,35 +135,35 @@
</div>
</div>
<div class="ranking clearfix">
<div class="ranking clearfix">
<ul class="grade color-dark">
<ul class="grade color-dark">
<% if @eng _users[1] %>
<% if @stu _users[1] %>
<li class="mt35 pr">
<li class="mt35 pr">
<img src="/images/educoder/huangguan-two.png" class="huangguan"/>
<img src="/images/educoder/huangguan-two.png" class="huangguan"/>
<a href="/users/<%= @eng_users[1].try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(@eng _users[1])) %>
<a href="/users/<%= @stu_users[1].try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(@stu _users[1])) %>
<span class="task-hide rankName"><%= @eng _users[1].try(:show_name) %></span>
<span class="task-hide rankName"><%= @stu _users[1].try(:show_name) %></span>
</a>
</a>
</li>
</li>
<% end %>
<% end %>
<% if @eng _users[0] %>
<% if @stu _users[0] %>
<li class="pr">
<li class="pr">
<img src="/images/educoder/huangguan.png" class="huangguan"/>
<img src="/images/educoder/huangguan.png" class="huangguan"/>
<a href="/users/<%= @eng_users[0].try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(@eng _users[0])) %>
<a href="/users/<%= @stu_users[0].try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(@stu _users[0])) %>
<span class="task-hide rankName"><%= @eng _users[0].try(:show_name) %></span>
<span class="task-hide rankName"><%= @stu _users[0].try(:show_name) %></span>
</a>
</a>
</li>
</li>
<% end %>
<% end %>
<% if @eng _users[2] %>
<% if @stu _users[2] %>
<li class="mt35 pr">
<li class="mt35 pr">
<img src="/images/educoder/huangguan-three.png" class="huangguan"/>
<img src="/images/educoder/huangguan-three.png" class="huangguan"/>
<a href="/users/<%= (@eng_users[2].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@eng _users[2])) %>
<a href="/users/<%= (@stu_users[2].try(:login)) %>" class="color-dark"><%= image_tag(url_to_avatar(@stu _users[2])) %>
<span class="task-hide rankName"><%= @eng _users[2].try(:show_name) %></span>
<span class="task-hide rankName"><%= @stu _users[2].try(:show_name) %></span>
</a>
</a>
</li>
</li>
<% end %>
<% end %>
</ul>
</ul>
<br/>
<br/>
<ul class="grade mt30">
<ul class="grade mt30">
<% if @eng _users.size > 3 %>
<% if @stu _users.size > 3 %>
<% @eng_users[3..@eng _users.size].each do |e_u| %>
<% @stu_users[3..@stu _users.size].each do |e_u| %>
<li>
<li>
<a href="/users/<%= e_u.try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(e_u)) %>
<a href="/users/<%= e_u.try(:login) %>" class="color-dark"><%= image_tag(url_to_avatar(e_u)) %>
<span class="task-hide rankName"><%= e_u.try(:show_name) %></span>
<span class="task-hide rankName"><%= e_u.try(:show_name) %></span>