From 2e21a3b98320392afedd5226e6c5ed2bd7b52f6a Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 1 Jul 2019 09:20:12 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=A6=96=E9=A1=B5-?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=8F=90=E4=BA=A4=E5=AD=90=E7=BA=A7-?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/educoder/edu-all.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index db1a8de5..24d992c9 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -103,7 +103,8 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px} /*门户左侧导航栏*/ .user_navlist{position: absolute;left: 0px;width: 160px;top:0px;height: 100%;} .user_navlist_black{position: relative;width: 100%;height: 100%;border-radius: 8px 0px 0px 8px;background: rgba(0,0,0,0.8);} -.user_navlist_white{position: absolute;left: 160px;background: #FFFFff;width: 622px;min-height: 345px;top: 0px;z-index: 1;display: none;padding:0px 30px;box-sizing: border-box;box-shadow: 0px 0px 10px rgba(76,76,76,0.2);z-index: 99} +.user_navlist_white{position: absolute;left: 160px;background: #FFFFff;width: 622px;min-height: 345px;top: 0px;z-index: 1;display: none;padding:0px 30px; + box-sizing: border-box;box-shadow: 0px 0px 10px rgba(76,76,76,0.2);z-index: 99;max-height: 345px;overflow-y: auto;} .user_navlist_white a{color: #989898;margin-right: 15px;font-size: 14px;display: block;float: left;height: 30px;line-height: 30px;} .user_navlist_white a:hover{color: #4cacff} .headIcon{height: 100%;box-sizing: border-box;margin: 0px!important;} From 90ff7854693f81fa6b2253ce7763d13ee7199346 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Mon, 1 Jul 2019 09:30:02 +0800 Subject: [PATCH 2/4] modify competition show page link button --- app/controllers/competitions_controller.rb | 2 + .../_gq_second_code_competition.html.erb | 40 +++++++++++++++---- .../_qg_second_competition.html.erb | 30 ++++++++++++-- app/views/layouts/base_competition.html.erb | 2 +- 4 files changed, 63 insertions(+), 11 deletions(-) diff --git a/app/controllers/competitions_controller.rb b/app/controllers/competitions_controller.rb index c1d918f6..c890ff6b 100644 --- a/app/controllers/competitions_controller.rb +++ b/app/controllers/competitions_controller.rb @@ -20,6 +20,8 @@ class CompetitionsController < ApplicationController def show @images = @competition.attachments + @user = current_user + @enrolled = @user && @user.logged? && @competition.team_members.exists?(user_id: @user.id) end def index diff --git a/app/views/competitions/_gq_second_code_competition.html.erb b/app/views/competitions/_gq_second_code_competition.html.erb index 35c5dd17..8d66af1a 100644 --- a/app/views/competitions/_gq_second_code_competition.html.erb +++ b/app/views/competitions/_gq_second_code_competition.html.erb @@ -12,21 +12,21 @@ description: "Weka是基于Java的机器学习与数据挖掘平台,汇集了最前沿的机器学习算法,包括处理标准数据挖掘问题的几乎所有方法:回归、分类、聚类、关联规则以及属性选择等,是Java机器学习入门的首选平台。

本项目的Clusters目录中包含了K-Means、层次聚类等多种聚类算法以及相应的聚类效果评估方法的java实现", task: '标注../weka/clusterers/目录下的所有代码文件。', link_name: 'CSDN,经典聚类算法', - link_url: 'javascript:void(0)' + link_url: 'https://blog.csdn.net/qq_30262201/article/details/78799926' }, { name: 'C++项目', description: "该项目是GitHub上最受欢迎的C++语言实现经典算法与数据结构的项目之一,内容涵盖排序、链表、树结构、图搜索、贪心算法等。学习这些算法的代码实现,可以深刻理解和掌握算法的核心思想,感受算法之美,代码之美,是人工智能时代的基础入门一课。

本项目的sort_search_problems目录涵盖了冒泡排序、快速排序等各类经典排序算法的C++实现。", task: '标注../sort_search_problems目录下的所有代码文件及对应引用的../include目录中自定义的头文件。', link_name: 'CSDN,十大经典排序算法', - link_url: 'javascript:void(0)' + link_url: 'https://blog.csdn.net/wfq784967698/article/details/79551476' }, { name: 'Python项目', description: "该项目是GitHub上最受欢迎的Python语言实现经典算法的项目之一,包含了前沿的神经网络和经典数据结构及算法的Python实现。项目具有兼顾经典和前沿的特点。学习经典算法的源码实现,感受经典算法的思想之美、代码之美。

本项目的Sorts目录中包含了冒泡排序、快速排序等各类经典排序算法的Python实现。", task: '标注../sorts/目录下的所有代码文件。', link_name: 'CSDN,十大经典排序算法', - link_url: 'javascript:void(0)' + link_url: 'https://blog.csdn.net/wfq784967698/article/details/79551476' }, ], [{},{},{}], @@ -70,8 +70,8 @@ btn_url = is_start ? "#{entry.url}" : "javascript:void(0);" %> first_section.start_time ? 'target="_blank"' : "" %> ><%= entry.name %> + href="javascript:void(0);" + data-url="<%= btn_url %>"><%= entry.name %>

<% if row_data.present? %> @@ -84,7 +84,9 @@ <%= row_data[:link_name] %>

- 点击进入代标注模块 + 点击进入代标注模块

<% end %> @@ -99,4 +101,28 @@ <% index += 1 %>

<% index += 1 %> -

\ No newline at end of file +

+ + \ No newline at end of file diff --git a/app/views/competitions/_qg_second_competition.html.erb b/app/views/competitions/_qg_second_competition.html.erb index 7c69854b..aa45d32e 100644 --- a/app/views/competitions/_qg_second_competition.html.erb +++ b/app/views/competitions/_qg_second_competition.html.erb @@ -17,9 +17,9 @@ <% "@urls[i][j][k]表示: 第i个比赛的第j个对象,的第k个url入口" %> <% is_start = Time.now > section.start_time %> <% section.competition_entries.each_with_index do |entry| %> - " - <%= Time.now > section.start_time ? 'target="_blank"' : "" %> ><%= entry.name %> + <%= link_to entry.name, 'javascript:void(0);', + class: "li-1 #{ is_start ? 'active' : ''}", + data: { url: is_start ? entry.url : 'javascript:void(0);' } %> <% end %> @@ -34,3 +34,27 @@
<% index += 1 %>
+ + diff --git a/app/views/layouts/base_competition.html.erb b/app/views/layouts/base_competition.html.erb index 6124bad8..31185960 100644 --- a/app/views/layouts/base_competition.html.erb +++ b/app/views/layouts/base_competition.html.erb @@ -11,7 +11,7 @@ <%= favicon %> <%= javascript_heads %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'educoder/edu-main', 'educoder/edu-all', 'educoder/magic-check' %> - <%= javascript_include_tag 'educoder/edu_application' %> + <%= javascript_include_tag 'educoder/edu_application', 'edu/application' %>