You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

71 lines
3.4 KiB

<%
this.getStatusMeta = (status) => {
if (status.startsWith('Running')) return 'Running';
else return status;
}
this.icon = {
'Accepted': 'checkmark',
'Wrong Answer': 'remove',
'Runtime Error': 'bomb',
'Time Limit Exceeded': 'clock',
'Memory Limit Exceeded': 'disk outline',
'Output Limit Exceeded': 'print',
'File Error': 'file outline',
'Waiting': 'hourglass half',
'Running': 'spinner',
'Compiling': 'spinner',
'Compile Error': 'code',
'System Error': 'server',
'No Testdata': 'folder open outline'
}
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<title><%= title %> - <%= syzoj.config.title %></title>
<link href="//cdn.bootcss.com/semantic-ui/2.2.6/semantic.min.css" rel="stylesheet">
<link href="/tomorrow.css" rel="stylesheet">
<link href="//cdn.bootcss.com/KaTeX/0.6.0/katex.min.css" rel="stylesheet">
<link href="https://cdn.moefont.com/fonts/css?family=Raleway:300" rel="stylesheet">
<link href="/style.css" rel="stylesheet">
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
</head>
<body>
<div class="ui fixed borderless menu">
<div class="ui container">
<a class="header item" href="/"><span style="font-family: Raleway; font-size: 1.5em; font-weight: 500; "><%= syzoj.config.title %></span></a>
<a class="item<% if (active === '') { %> active<% } %>" href="/"><i class="home icon"></i> 首页</a>
<a class="item<% if (active === 'problem') { %> active<% } %>" href="/problem"><i class="list icon"></i> 题库</a>
<a class="item<% if (active === 'contest') { %> active<% } %>" href="/contest"><i class="calendar icon"></i> 比赛</a>
<a class="item<% if (active.startsWith('judge')) { %> active<% } %>" href="/judge_state"><i class="tasks icon"></i> 评测</a>
<a class="item<% if (active === 'ranklist') { %> active<% } %>" href="/ranklist"><i class="signal icon"></i> 排名</a>
<a class="item<% if (active === 'discussion' || active === 'article') { %> active<% } %>" href="/discussion"><i class="comments icon"></i> 讨论</a>
<a class="item<% if (active === 'help') { %> active<% } %>" href="/help"><i class="help circle icon"></i> 帮助</a>
<div class="right menu">
<% if (user) { %>
<a href="<%= syzoj.utils.makeUrl(['user', user.id]) %>" style="color: inherit; ">
<div class="ui simple dropdown item">
<%= user.username %><% if (user.nameplate) { %><%- user.nameplate %><% } %> <i class="dropdown icon"></i>
<div class="menu">
<a class="item" href="<%= syzoj.utils.makeUrl(['user', user.id, 'edit']) %>"><i class="edit icon"></i>修改资料</a>
<a class="item" href="#" id="logout"><i class="power icon"></i>注销</a>
</div>
</div>
</a>
<% } else { %>
<div class="item">
<div class="ui button" style="margin-right: 0.5em" onclick="window.location.href='/login'">
登录
</div>
<div class="ui primary button" onclick="window.location.href='/sign_up'">
注册
</div>
</div>
<% } %>
</div>
</div>
</div>
<div class="ui main container">