From 656d6b700d6cf5bdbf639b703546d8031b8a2c3c Mon Sep 17 00:00:00 2001 From: Menci Date: Fri, 17 Feb 2017 18:20:03 +0800 Subject: [PATCH] UI optimize --- static/style.css | 5 +---- views/problem_data.ejs | 43 +++++++++++++++++++++--------------- views/submission_content.ejs | 2 +- views/util.ejs | 1 - 4 files changed, 27 insertions(+), 24 deletions(-) diff --git a/static/style.css b/static/style.css index 7c47612..38d21c2 100644 --- a/static/style.css +++ b/static/style.css @@ -39,10 +39,7 @@ pre { :not(.status_detail).status.accepted, .title:hover .status_detail.status.accepted, -.title.active .status_detail.status.accepted, -:not(.status_detail).status.passed, -.title:hover .status_detail.status.passed, -.title.active .status_detail.status.passed { +.title.active .status_detail.status.accepted { color: forestgreen; } diff --git a/views/problem_data.ejs b/views/problem_data.ejs index b539f60..83651b6 100644 --- a/views/problem_data.ejs +++ b/views/problem_data.ejs @@ -1,11 +1,17 @@ <% this.title = '上传测试数据'; %> <% include header %> +<% +let subtaskType = { + sum: '测试点分数按百分比相加', + min: '取各测试点最低分', + mul: '测试点分数按百分比相乘' +}; +%>
<% if (problem.testdata) { %> -

数据包:<%= problem.testdata.filename %>

<% try { let list = syzoj.utils.parseTestData(problem.testdata.getPath()); @@ -17,26 +23,27 @@ <% } %> - + - - - - <% for (let subtask of list) { %> - <% if (list.length !== 1) { %> - - - + + + + <% let i = 0; %> + <% for (let subtask of list) { %> + <% if (list.length !== 1) { %> + + + + <% } %> + <% for (let testcase of subtask.cases) { %> + + + + + <% } %> <% } %> - <% for (let testcase of subtask.cases) { %> - - - - - <% } %> - <% } %> - +
输入文件 输出文件
→ 子任务评分方式:<%= subtask.type %>,分值:<%= subtask.score %>

子任务 <%= ++i %>

<%= subtaskType[subtask.type] %>,总分值 <%= subtask.score %>
<%= testcase.input %><%= testcase.output %>
<%= testcase.input %><%= testcase.output %>
<% } catch (e) { %>

数据包错误:<%= e %>

diff --git a/views/submission_content.ejs b/views/submission_content.ejs index e7fbfe6..32ad795 100644 --- a/views/submission_content.ejs +++ b/views/submission_content.ejs @@ -97,7 +97,7 @@ for (let s of judge.result.subtasks) {
-
+
<% } %> <% for (let i = 0; i < subtask_cases.case_num; i++) { %> <% let testcase = subtask_cases[i]; %> diff --git a/views/util.ejs b/views/util.ejs index 745a369..932b7b9 100644 --- a/views/util.ejs +++ b/views/util.ejs @@ -15,7 +15,6 @@ this.isPending = (status) => { this.icon = { 'Accepted': 'checkmark', - 'Passed': 'checkmark', 'Wrong Answer': 'remove', 'Runtime Error': 'bomb', 'Time Limit Exceeded': 'clock',