Browse Source

UI optimize

pull/6/head
Menci 8 years ago
parent
commit
b6e8983f95
  1. 10
      views/problems.ejs
  2. 14
      views/submissions.ejs

10
views/problems.ejs

@ -40,10 +40,10 @@ if (typeof tags !== 'undefined') tagIDs = tags.map(x => x.id);
<script> <script>
if (Cookies.get('show_tag') === '1') { if (Cookies.get('show_tag') === '1') {
document.write('<input type="checkbox" checked>'); document.write('<input type="checkbox" checked>');
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { visibility: visible; }'; document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { width: 0; white-space: nowrap; overflow: hidden; }';
} else { } else {
document.write('<input type="checkbox">'); document.write('<input type="checkbox">');
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { visibility: hidden; }'; document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { white-space: nowrap; overflow: hidden; }';
} }
</script> </script>
@ -53,9 +53,9 @@ if (typeof tags !== 'undefined') tagIDs = tags.map(x => x.id);
let checked = $('#show_tag').checkbox('is checked'); let checked = $('#show_tag').checkbox('is checked');
Cookies.set('show_tag', checked ? '1' : '0'); Cookies.set('show_tag', checked ? '1' : '0');
if (checked) { if (checked) {
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { visibility: visible; }'; document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { width: 0; white-space: nowrap; overflow: hidden; }';
} else { } else {
document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { visibility: hidden; }'; document.getElementById('show_tag_style').innerHTML = '.show_tag_controled { white-space: nowrap; overflow: hidden; }';
} }
}); });
}); });
@ -98,7 +98,7 @@ if (typeof tags !== 'undefined') tagIDs = tags.map(x => x.id);
<tbody> <tbody>
<% for (let problem of problems) { %> <% for (let problem of problems) { %>
<% if (problem.is_public || problem.allowedEdit) { %> <% if (problem.is_public || problem.allowedEdit) { %>
<tr> <tr style="height: 44px; ">
<% if (user) { %> <% if (user) { %>
<td> <td>
<% if (problem.judge_state) { %> <% if (problem.judge_state) { %>

14
views/submissions.ejs

@ -4,15 +4,15 @@
<div class="padding"> <div class="padding">
<form action="<%= syzoj.utils.makeUrl(['submissions']) %>" class="ui mini form" method="get" role="form" id="form"> <form action="<%= syzoj.utils.makeUrl(['submissions']) %>" class="ui mini form" method="get" role="form" id="form">
<div class="inline fields" style="margin-bottom: 25px; "> <div class="inline fields" style="margin-bottom: 25px; ">
<label style="font-size: 1.2em; margin-right: 3px; ">题目 ID:</label> <label style="font-size: 1.2em; margin-right: 1px; ">题目:</label>
<div class="field"><input name="problem_id" style="width: 50px; " type="text" value="<%= form.problem_id %>"></div> <div class="field"><input name="problem_id" style="width: 50px; " type="text" value="<%= form.problem_id %>"></div>
<label style="font-size: 1.2em; margin-right: 3px; ">提交者:</label> <label style="font-size: 1.2em; margin-right: 1px; ">提交者:</label>
<div class="field"><input name="submitter" style="width: 100px; " type="text" value="<%= form.submitter %>"></div> <div class="field"><input name="submitter" style="width: 100px; " type="text" value="<%= form.submitter %>"></div>
<label style="font-size: 1.2em; margin-right: 3px; ">分数:</label> <label style="font-size: 1.2em; margin-right: 1px; ">分数:</label>
<div class="field" style="padding-right: 6px; "><input name="min_score" style="width: 45px; " type="text" value="<%= form.min_score || 0 %>"></div> <div class="field" style="padding-right: 6px; "><input name="min_score" style="width: 48px; " type="text" value="<%= form.min_score || 0 %>"></div>
<label style="font-size: 1.2em; margin-right: 7px; ">~</label> <label style="font-size: 1.2em; margin-right: 7px; ">~</label>
<div class="field"><input name="max_score" style="width: 45px; " type="text" value="<%= form.max_score || 100 %>"></div> <div class="field"><input name="max_score" style="width: 48px; " type="text" value="<%= form.max_score || 100 %>"></div>
<label style="font-size: 1.2em; margin-right: 3px; ">语言:</label> <label style="font-size: 1.2em; margin-right: 1px; ">语言:</label>
<div class="field"> <div class="field">
<div class="ui fluid selection dropdown" id="select_language" style="width: 110px; "> <div class="ui fluid selection dropdown" id="select_language" style="width: 110px; ">
<input type="hidden" name="language" value="<%= form.language %>"> <input type="hidden" name="language" value="<%= form.language %>">
@ -26,7 +26,7 @@
</div> </div>
</div> </div>
</div> </div>
<label style="font-size: 1.2em; margin-right: 3px; ">状态:</label> <label style="font-size: 1.2em; margin-right: 1px; ">状态:</label>
<div class="field"> <div class="field">
<div class="ui fluid selection dropdown" id="select_status" style="width: 210px; "> <div class="ui fluid selection dropdown" id="select_status" style="width: 210px; ">
<input type="hidden" name="status" value="<%= form.status %>"> <input type="hidden" name="status" value="<%= form.status %>">

Loading…
Cancel
Save