Browse Source

Some UI changes

pull/6/head
Menci 6 years ago
parent
commit
74a7d3758d
  1. 40
      static/style.css
  2. 2
      views/admin_header.ejs
  3. 4
      views/admin_rating.ejs
  4. 13
      views/article.ejs
  5. 2
      views/discussion.ejs
  6. 6
      views/index.ejs
  7. 2
      views/problems.ejs
  8. 4
      views/ranklist.ejs
  9. 4
      views/submissions_item.ejs
  10. 4
      views/user.ejs

40
static/style.css

@ -35,40 +35,12 @@ body
sans-serif;
}
.ui.header,
.ui.button,
.ui.input input,
.ui.menu,
.ui.form input:not([type]),
.ui.form input[type=date],
.ui.form input[type=datetime-local],
.ui.form input[type=email],
.ui.form input[type=file],
.ui.form input[type=number],
.ui.form input[type=password],
.ui.form input[type=search],
.ui.form input[type=tel],
.ui.form input[type=text],
.ui.form input[type=time],
.ui.form input[type=url],
h1,
h2,
h3,
h4,
h5,
body
{
font-family:
-apple-system,
'PingFang SC',/* Apple */
'Source Han Sans SC',
'Noto Sans CJK SC', /* Google */
'Microsoft Yahei',
'Lantinghei SC',
'Hiragino Sans GB',
'Microsoft Sans Serif', /* M$ */
'WenQuanYi Micro Hei', /* *nix */
sans-serif;
a.black-link {
color: #000;
}
a.black-link:hover {
color: #4183c4;
}
.font-content {

2
views/admin_header.ejs

@ -5,7 +5,7 @@ let items = {
privilege: '权限管理',
rejudge: '一键重测',
links: '友链管理',
rating: 'Rating 管理',
rating: '积分管理',
raw: '配置文件',
other: '其他操作'
};

4
views/admin_rating.ejs

@ -14,10 +14,10 @@
</div>
</div>
</div>
<button class="ui blue button" name="type" value="doit" type="submit">计算此比赛的 Rating</button>
<button class="ui blue button" name="type" value="doit" type="submit">计算此比赛的积分</button>
</form>
注意:如果删除一个比赛的 Rating,则该比赛之上的所有比赛也将被删除,Rating 将还原至该比赛之前的状态!
注意:如果删除一个比赛的积分,则该比赛之上的所有比赛也将被删除,积分将还原至该比赛之前的状态!
<form action="<%= syzoj.utils.makeUrl(['admin', 'rating', 'delete']) %>" method="POST">
<div class="ui relaxed divided list">
<% for (const calc of calcs) { %>

13
views/article.ejs

@ -18,12 +18,15 @@
<% } %>
</div>
<h1><%= article.title %></h1>
<p style="font_size: 0.7em"><img style="vertical-align: middle;" src="<%= syzoj.utils.gravatar(article.user.email, 64) %>" width="32" height="32">
<a href="<%= syzoj.utils.makeUrl(['user', article.user_id]) %>"><%= article.user.username %></a><% if (article.user.nameplate) { %><%- article.user.nameplate %><% } %> 于 <%= syzoj.utils.formatDate(article.public_time) %> 发表,<%= syzoj.utils.formatDate(article.update_time) %> 最后更新
<p style="margin-bottom: -5px; ">
<img style="vertical-align: middle; margin-bottom: 2px; margin-right: 2px; " src="<%= syzoj.utils.gravatar(article.user.email, 34) %>" width="17" height="17">
<b style="margin-right: 30px; "><!--i class="user icon"></i--><a class="black-link" href="<%= syzoj.utils.makeUrl(['user', article.user_id]) %>"><%= article.user.username %></a><% if (article.user.nameplate) { %><%- article.user.nameplate %><% } %></b>
<b style="margin-right: 30px; "><i class="calendar icon"></i> <%= syzoj.utils.formatDate(article.public_time) %></b>
<% if (article.public_time !== article.update_time) { %><b style="margin-right: 30px; "><i class="edit icon"></i> <%= syzoj.utils.formatDate(article.update_time) %></b><% } %>
<% if (article.allowedEdit) { %>
<a class="ui mini red button" onclick="$('#modal-delete').modal('show')">删除文章</a>
<a class="ui mini button" href="<%= syzoj.utils.makeUrl(['article', article.id, 'edit']) %>">编辑文章</a>
<div class="ui basic modal" id="modal-delete">
<a style="margin-top: -4px; " class="ui mini right floated button" href="<%= syzoj.utils.makeUrl(['article', article.id, 'edit']) %>">编辑文章</a>
<a style="margin-top: -4px; " class="ui mini red right floated button" onclick="$('#modal-delete').modal('show')">删除文章</a>
<div class="ui basic modal right floated" id="modal-delete">
<div class="ui icon header">
<i class="trash icon"></i>
<p style="margin-top: 15px; ">删除文章</p>

2
views/discussion.ejs

@ -18,7 +18,7 @@
<% } %>
</div>
</div>
<div class="six wide right aligned column">
<div class="six wide right aligned column" style="margin-bottom: 15px; ">
<% if(in_problems) { %>
<a style="margin-left: 10px; " href="<%= syzoj.utils.makeUrl(['discussion', 'global']) %>" class="ui labeled icon mini blue button">
<i class="world icon"></i>

6
views/index.ejs

@ -51,7 +51,7 @@
++i;
%>
<tr>
<td><%= i %></td>
<td><b><%= i %></b></td>
<td><a href="<%= syzoj.utils.makeUrl(['user', user.id]) %>"><%= user.username %></a><% if (user.nameplate) { %><%- user.nameplate %><% } %></td>
<td style="font-content">
<script id="user-infomation-script-<%= i %>">
@ -95,7 +95,7 @@
<%
if (fortune) {
let color;
if (fortune.fortune.indexOf('吉') != -1) color = '#1fb752';
if (fortune.fortune.indexOf('吉') != -1) color = '#0ccf00';
else if (fortune.fortune.indexOf('凶') != -1) color = '#f25e65';
else color = '#444';
%>
@ -110,7 +110,7 @@
</div>
<div class="two column row">
<div class="column">
<div style="color: #1fb752; ">
<div style="color: #0ccf00; ">
<% if (fortune.good.length) { %>
<strong>宜:</strong><%= fortune.good[0].title %>
<br>

2
views/problems.ejs

@ -113,7 +113,7 @@ if (typeof tags !== 'undefined') tagIDs = tags.map(x => x.id);
<% } %>
</td>
<% } %>
<td><%= problem.id %></td>
<td><b><%= problem.id %></b></td>
<td class="left aligned">
<a style="vertical-align: middle; " href="<%= syzoj.utils.makeUrl(['problem', problem.id]) %>"><%= problem.title %>
<% if (!problem.is_public) { %><span class="ui header"><span class="ui tiny red label">未公开</span></span><% } %>

4
views/ranklist.ejs

@ -15,7 +15,7 @@
<th style="width: 150px; "><%- createSortableTitle('username', '用户名', true) %></th>
<th>个性签名</th>
<th style="width: 100px; "><%- createSortableTitle('ac_num', '通过数量', false) %></th>
<th style="width: 100px; "><%- createSortableTitle('rating', 'Rating', false) %></th>
<th style="width: 100px; "><%- createSortableTitle('rating', '积分', false) %></th>
</tr>
</thead>
<script>
@ -37,7 +37,7 @@
++i;
%>
<tr>
<td><%= i %></td>
<td><b><%= i %></b></td>
<td><a href="<%= syzoj.utils.makeUrl(['user', user.id]) %>"><%= user.username %></a><% if (user.nameplate) { %><%- user.nameplate %><% } %></td>
<td class="font-content">
<script id="user-infomation-script-<%= i %>">

4
views/submissions_item.ejs

@ -50,9 +50,9 @@ Vue.component('submission-item', {
<script id="submissionItemTemplate" type="text/x-template">
<tr>
<td><a :href="submissionLink">#{{ data.info.submissionId }}</a></td>
<td><a :href="submissionLink"><b>#{{ data.info.submissionId }}</b></a></td>
<td ref="problemLabel"><a ref="problemLabelTextFit" style="width: 230px; height: 22px; display: block; margin: 0 auto; line-height: 22px;" :href="problemLink">#{{ config.inContest ? alpha(data.info.problemId) : data.info.problemId }}. {{ data.info.problemName }}</a></td>
<td><a :href="submissionLink"><status-label :status="statusString"></status-label></a></td>
<td><a :href="submissionLink"><b><status-label :status="statusString"></status-label></b></a></td>
<template v-if="data.result">
<td v-if="config.showScore"><a :href="submissionLink"><span class="score" :class="scoreClass">{{ (data.result.score != null && data.result.score !== NaN) ? Math.floor(data.result.score) : '' }}</span></a></td>

4
views/user.ejs

@ -32,7 +32,7 @@
</div>
<div class="extra content">
<a><i class="check icon"></i>通过 <%= show_user.ac_problems.length %> 题</a>
<a><i class="star icon"></i>Rating <%= show_user.rating %></a>
<a style="float: right; "><i class="star icon"></i>积分 <%= show_user.rating %></a>
</div>
</div>
@ -135,7 +135,7 @@
<tr>
<th>比赛</th>
<th>名次</th>
<th>Rating</th>
<th>积分</th>
</tr>
</thead>
<tbody>

Loading…
Cancel
Save