Browse Source

UI optimize

pull/6/head
Menci 8 years ago
parent
commit
656d6b700d
  1. 5
      static/style.css
  2. 43
      views/problem_data.ejs
  3. 2
      views/submission_content.ejs
  4. 1
      views/util.ejs

5
static/style.css

@ -39,10 +39,7 @@ pre {
:not(.status_detail).status.accepted, :not(.status_detail).status.accepted,
.title:hover .status_detail.status.accepted, .title:hover .status_detail.status.accepted,
.title.active .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 {
color: forestgreen; color: forestgreen;
} }

43
views/problem_data.ejs

@ -1,11 +1,17 @@
<% this.title = '上传测试数据'; %> <% this.title = '上传测试数据'; %>
<% include header %> <% include header %>
<%
let subtaskType = {
sum: '测试点分数按百分比相加',
min: '取各测试点最低分',
mul: '测试点分数按百分比相乘'
};
%>
<div class="padding"> <div class="padding">
<div class="ui grid"> <div class="ui grid">
<div class="row"> <div class="row">
<div class="seven wide column"> <div class="seven wide column">
<% if (problem.testdata) { %> <% if (problem.testdata) { %>
<p>数据包:<%= problem.testdata.filename %></p>
<% <%
try { try {
let list = syzoj.utils.parseTestData(problem.testdata.getPath()); let list = syzoj.utils.parseTestData(problem.testdata.getPath());
@ -17,26 +23,27 @@
<% } %> <% } %>
<table class="ui very basic table"> <table class="ui very basic table">
<thead> <thead>
<tr> <tr>
<th>输入文件</th> <th>输入文件</th>
<th>输出文件</th> <th>输出文件</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% for (let subtask of list) { %> <% let i = 0; %>
<% if (list.length !== 1) { %> <% for (let subtask of list) { %>
<tr> <% if (list.length !== 1) { %>
<td colspan='2'><strong>→ 子任务评分方式:<%= subtask.type %>,分值:<%= subtask.score %></strong></td> <tr>
</tr> <td colspan='2'><h4 style="margin-bottom: 5px; "><strong>子任务 <%= ++i %></strong></h4><%= subtaskType[subtask.type] %>,总分值 <%= subtask.score %></td>
</tr>
<% } %>
<% for (let testcase of subtask.cases) { %>
<tr>
<td><%= testcase.input %></td>
<td><%= testcase.output %></td>
</tr>
<% } %>
<% } %> <% } %>
<% for (let testcase of subtask.cases) { %> </tbody>
<tr>
<td><%= testcase.input %></td>
<td><%= testcase.output %></td>
</tr>
<% } %>
<% } %>
</tbody>
</table> </table>
<% } catch (e) { %> <% } catch (e) { %>
<h3>数据包错误:<%= e %></h3> <h3>数据包错误:<%= e %></h3>

2
views/submission_content.ejs

@ -97,7 +97,7 @@ for (let s of judge.result.subtasks) {
</div> </div>
</div> </div>
<div class="content auto_update_activation<% if (subtask_cases.isActiveSubtask) { %> active<% } %>"> <div class="content auto_update_activation<% if (subtask_cases.isActiveSubtask) { %> active<% } %>">
<div class="accordion"> <div class="accordion" style="margin-top: 0; ">
<% } %> <% } %>
<% for (let i = 0; i < subtask_cases.case_num; i++) { %> <% for (let i = 0; i < subtask_cases.case_num; i++) { %>
<% let testcase = subtask_cases[i]; %> <% let testcase = subtask_cases[i]; %>

1
views/util.ejs

@ -15,7 +15,6 @@ this.isPending = (status) => {
this.icon = { this.icon = {
'Accepted': 'checkmark', 'Accepted': 'checkmark',
'Passed': 'checkmark',
'Wrong Answer': 'remove', 'Wrong Answer': 'remove',
'Runtime Error': 'bomb', 'Runtime Error': 'bomb',
'Time Limit Exceeded': 'clock', 'Time Limit Exceeded': 'clock',

Loading…
Cancel
Save