-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (88 loc) · 2.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<meta charset="UTF-8">
<head>
<script>
function gettitle(){
var t=escape(window.location.href),s="";
if(t.lastIndexOf("%3Fpage%3D")!=-1)
s=t.substr(t.lastIndexOf("%3Fpage%3D")+10);
else
s=t.substr(t.lastIndexOf("/")+1),s=s.substr(0,s.lastIndexOf(".html"));
s=s.replace("_"," ");
s=s.replace("_"," ");
return s;
}
var t=escape(window.location.href);
if(t.indexOf("%3Fpage%3D")==-1)
document.write("<title>AtCoder 中文版</title>");
else
document.write("<title>"+gettitle()+"</title>");
</script>
<link rel="shortcut icon" href="images/favicon.ico">
<script type="text/javascript" src="func.js"></script>
<link href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.css" rel="stylesheet" type="text/css">
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.js"></script>
</head>
<style type="text/css">
.diff-red {color: #ff0000;}
.diff-orange {color: #ff8000;}
.diff-yellow {color: #c0c000;}
.diff-blue {color: #0000ff;}
.diff-cyan {color: #00c0c0;}
.diff-green {color: #008000;}
.diff-brown {color: #804000;}
.diff-grey {color: #808080;}
.diff-black {color: #000000;}
.link-disabled {display: none;}
.link-black {color: #000000;}
a:link{
text-decoration: none;
}
a:visited{
text-decoration: none;
}
.difficulty-circle {
display: inline-block;
border-radius: 50%;
border-style: solid;
border-width: 1px;
margin-right: 5px;
height: 12px;
width: 12px;
}
</style>
<body>
<script>
var lnk=escape(window.location.href);
if(lnk.indexOf("index.html")==-1){
window.location.href="/atcoder-for-chinese/index.html";
}else if(lnk.indexOf("%3Fpage%3D")==-1){
console.log("main page");
document.write("<div class=\"ui main container\">");
buildw();
document.write("</div>");
}else{
let pos=lnk.indexOf("%3Fpage%3D")+10,
name=lnk.substr(pos),content="";
if(name.indexOf("sol")==-1){
console.log("prob page");
readTextFile("./translation/"+name+".md","md",function(text,stat){
if(stat=="200"){
document.write("<scr"+"ipt src=\"mdstyle.js\">"+"</scri"+"pt>");
document.write("<textarea>"+text+"</textarea>");
}else
window.location.href="./translation/"+name+".html";
});
}else{
console.log("solu page");
readTextFile("./solution/"+name+".md","md",function(text,stat){
if(stat=="200"){
document.write("<scr"+"ipt src=\"mdstyle.js\">"+"</scri"+"pt>");
document.write("<textarea>"+text+"</textarea>");
}else
window.location.href="./solution/"+name+".html";
});
}
}
</script>
</body>