diff --git a/web/scoring/index.html b/web/scoring/index.html new file mode 100644 index 0000000..9b159e5 --- /dev/null +++ b/web/scoring/index.html @@ -0,0 +1,19 @@ + + + +Scoring + + + + +

Yendor Guild

+ +
+

The Guild keeps a record of all brave Rogues who venture into the Dungeons of Doom.

+ +
+ + diff --git a/web/scoring/players/index.cgi b/web/scoring/players/index.cgi new file mode 100755 index 0000000..61cebe9 --- /dev/null +++ b/web/scoring/players/index.cgi @@ -0,0 +1,32 @@ +#!/usr/bin/python + +import os +import sys +import rlgall + +playerdir = "/var/www/lighttpd/scoring/players/" +linkstr = '
  • {0}
  • \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("

    No one is here.

    \n") +else: + sys.stdout.write("\n") + +sys.stdout.write(rlgall.pend) diff --git a/web/scoring/scores.css b/web/scoring/scores.css new file mode 100644 index 0000000..526b93e --- /dev/null +++ b/web/scoring/scores.css @@ -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; +}