Import the web/scoring/ files.
This commit is contained in:
parent
81f7f77450
commit
ffd5e45fd0
3 changed files with 95 additions and 0 deletions
19
web/scoring/index.html
Normal file
19
web/scoring/index.html
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Scoring</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/main.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>Yendor Guild</h1>
|
||||||
|
<div class="nav"><a href="/">rlgallery.org</a> -> Scoring</div>
|
||||||
|
<div class="content">
|
||||||
|
<p>The Guild keeps a record of all brave Rogues who venture into the Dungeons of Doom.</p>
|
||||||
|
<ul>
|
||||||
|
<li><a href="./highscores.html">High Scores</a></li>
|
||||||
|
<li><a href="./players/">Explorers</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
32
web/scoring/players/index.cgi
Executable file
32
web/scoring/players/index.cgi
Executable file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import rlgall
|
||||||
|
|
||||||
|
playerdir = "/var/www/lighttpd/scoring/players/"
|
||||||
|
linkstr = '<li><a href="./{0}.html">{0}</a></li>\n'
|
||||||
|
|
||||||
|
filelist = os.listdir(playerdir)
|
||||||
|
namelist = []
|
||||||
|
|
||||||
|
for filename in filelist:
|
||||||
|
if filename.endswith(".html"):
|
||||||
|
namelist.append(filename.rsplit(".html", 1)[0])
|
||||||
|
namelist.sort()
|
||||||
|
|
||||||
|
sys.stdout.write("Content-type: text/html\r\n\r\n")
|
||||||
|
sys.stdout.write(rlgall.phead.format("Players"))
|
||||||
|
sys.stdout.write(rlgall.ptop)
|
||||||
|
sys.stdout.write(rlgall.navscore.format("Players"))
|
||||||
|
sys.stdout.write(rlgall.pti.format("Players"))
|
||||||
|
|
||||||
|
if not namelist:
|
||||||
|
sys.stdout.write("<p>No one is here.</p>\n")
|
||||||
|
else:
|
||||||
|
sys.stdout.write("<ul>\n")
|
||||||
|
for name in namelist:
|
||||||
|
sys.stdout.write(linkstr.format(name))
|
||||||
|
sys.stdout.write("</ul>\n")
|
||||||
|
|
||||||
|
sys.stdout.write(rlgall.pend)
|
||||||
44
web/scoring/scores.css
Normal file
44
web/scoring/scores.css
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
@import url("/main.css");
|
||||||
|
|
||||||
|
div.stable {
|
||||||
|
display: table;
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #101040;
|
||||||
|
border-style: solid;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sentry {
|
||||||
|
display: table-row;
|
||||||
|
border-width: 1px 0;
|
||||||
|
border-color: #101040;
|
||||||
|
border-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sentry:first-child {
|
||||||
|
background-color: #E0E0E0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sentry:nth-child(3n) {
|
||||||
|
background-color: #E0E0FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sentry:nth-child(3n+4) {
|
||||||
|
background-color: #E0FFE0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.sentry:nth-child(3n+2) {
|
||||||
|
background-color: #FFE0E0;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.shdata {
|
||||||
|
display: table-cell;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.sdata {
|
||||||
|
display: table-cell;
|
||||||
|
padding: 0 1em;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue