Removed sponsors

This commit is contained in:
Jack Miner 2016-02-23 10:56:01 -07:00
parent a1bd79ae26
commit 0df56eaf04
7 changed files with 38 additions and 56 deletions

View File

@ -63,9 +63,6 @@ EOF
</section>
<address>Puzzle by <span class="author" data-handle="$author">$author</span></address>
<section id="sponsors">
<img src="../../images/lanl.png" alt="Los Alamos National Laboratory">
<img src="../../images/doe.png" alt="US Department Of Energy">
<img src="../../images/sandia.png" alt="Sandia National Laboratories">
</section>
</body>
</html>
@ -140,7 +137,7 @@ for dn in $indir/[0-9]*; do
done
fi
# Append answers
# Append answers
if [ -f $dn/00answer.txt ]; then
awk -v P=$points '/./ { printf("%d %s\n", P, $0); }' < $dn/00answer.txt >> $uanswers
else

View File

@ -8,7 +8,7 @@ function moth.anchored_search(haystack, needle, anchor)
if (not f) then
return false, err
end
for line in f:lines() do
if (anchor) then
pos = line:find(anchor)
@ -16,13 +16,13 @@ function moth.anchored_search(haystack, needle, anchor)
line = line:sub(pos+1)
end
end
if (line == needle) then
f:close()
return true
end
end
f:close()
return false
end
@ -41,9 +41,6 @@ function moth.page(title, body)
print("</section>")
end
print('<section id="sponsors">')
print('<img src="../images/lanl.png" alt="Los Alamos National Laboratory">')
print('<img src="../images/doe.png" alt="US Department Of Energy">')
print('<img src="../images/sandia.png" alt="Sandia National Laboratories">')
print('</section>')
print("</body></html>")
os.exit(0)
@ -60,31 +57,31 @@ function moth.award_points(team, category, points, comment)
local filename = team .. "." .. category .. "." .. points
local entry = team .. " " .. category .. " " .. points
if (comment) then
entry = entry .. " " .. comment
end
local f = io.open(moth.path("state/teams/" .. team))
if (f) then
f:close()
else
return false, "No such team"
end
local ok = moth.anchored_search(moth.path("state/points.log"), entry, " ")
if (ok) then
return false, "Points already awarded"
end
local f = io.open(moth.path("state/points.new/" .. filename), "a")
if (not f) then
return false, "Unable to write to points file"
end
f:write(os.time(), " ", entry, "\n")
f:close()
return true
end

View File

@ -16,7 +16,7 @@ f:close()
for line in io.lines(moth.path("state/points.log")) do
local ts, team, cat, points, comment = line:match("^(%d+) (%w+) ([%w-]+) (%d+) ?(.*)")
points = tonumber(points) or 0
-- Skip scores for removed categories
if (max_by_cat[cat] ~= nil) then
max_by_cat[cat] = math.max(max_by_cat[cat], points)
@ -32,7 +32,7 @@ for cat, biggest in pairs(max_by_cat) do
for line in io.lines(moth.path("packages/" .. cat .. "/map.txt")) do
points, dirname = line:match("^(%d+) (.*)")
points = tonumber(points)
body = body .. "<a href=\"" .. cat .. "/" .. dirname .. "/index.html\">" .. points .. "</a> "
if (points > biggest) then
break
@ -44,8 +44,8 @@ for cat, biggest in pairs(max_by_cat) do
body = body .. "</dd>\n"
end
body = body .. "</dl>\n"
body = body .. "<fieldset><legend>Sandia Token:</legend>"
body = body .. "<p>Example: <samp>sandia:5:xylep-radar-nanox</samp></p>"
body = body .. "<fieldset><legend>External Token:</legend>"
body = body .. "<p>Example: <samp>external:5:xylep-radar-nanox</samp></p>"
body = body .. "<form action='cgi-bin/token.cgi'>"
body = body .. "Team Hash: <input name='t'><br>"
body = body .. "Token: <input name='k'>"

View File

@ -88,9 +88,6 @@ window.addEventListener("load", init);
</ul>
</nav>
<section id="sponsors">
<img src="images/lanl.png" alt="Los Alamos National Laboratory">
<img src="images/doe.png" alt="US Department Of Energy">
<img src="images/sandia.png" alt="Sandia National Laboratories">
</section>
</body>
</html>

View File

@ -16,10 +16,10 @@
<li><a href="scoreboard.html">Scoreboard</a></li>
</ul>
</nav>
<section>
<h2>Getting Started</h2>
<p>
Here is what you need to do:
</p>
@ -46,15 +46,15 @@
</li>
</ol>
</section>
<section>
<h2>Reading Material</h2>
<p>
Stuck? Taking a break?
Here are some things to read.
</p>
<ul>
<li><a href="credits.html">Credits</a></li>
<li>
@ -67,9 +67,6 @@
</section>
<section id="sponsors">
<img src="images/lanl.png" alt="Los Alamos National Laboratory">
<img src="images/doe.png" alt="US Department Of Energy">
<img src="images/sandia.png" alt="Sandia National Laboratories">
</section>
</body>
</html>

View File

@ -7,7 +7,7 @@
</head>
<body>
<h1>Team Registration</h1>
<section>
<h2>Register Your Team</h2>
@ -18,19 +18,19 @@
so make sure it's the team name you actually want.
Staff are unable to make changes to team names.
</p>
<p>
If somebody on your team has already registered your hash,
you don't need to do it again.
</p>
<form method="get" action="cgi-bin/register.cgi">
<label>Team Hash:</label>
<input type="text" name="h">
<br>
<label>Team Name:</label>
<input type="text" name="n">
<br>
<br>
<input type="submit" value="Register">
</form>
</section>
@ -42,9 +42,6 @@
</ul>
</nav>
<section id="sponsors">
<img src="images/lanl.png" alt="Los Alamos National Laboratory">
<img src="images/doe.png" alt="US Department Of Energy">
<img src="images/sandia.png" alt="Sandia National Laboratories">
</section>
</body>
</html>

View File

@ -8,7 +8,7 @@
</head>
<body>
<h1>About scoring</h1>
<section>
<h2>How we compute scores</h2>
@ -17,7 +17,7 @@
Each category is worth one point toward the total score;
your team's score in a category is the fraction of the total points unlocked so far in that category.
</p>
<p>
The team that has 30% of the points
in each of five categories has 1.5 points, whereas the team that
@ -25,22 +25,22 @@
typically better to have a few points in many categories, than
many points in a few categories.
</p>
<p>
When points are unlocked in a category,
every other team's score in that category goes down until they too score that point.
Unlike previous years, however,
unlocking points is the only way to reduce another team's score.
</p>
<p>
There are two main ways to make points: <em>puzzles</em>
and <em>tokens</em>. Your contest may have other ways to make
points: these will either be automatic, or explained elsewhere.
</p>
</section>
<section>
<h2>Puzzles</h2>
<p>
@ -52,8 +52,8 @@
correctly answers the highest-valued puzzle in that category.
</p>
</section>
<section>
<h2 id="tokens">Tokens</h2>
<p>
@ -61,31 +61,31 @@
two forms: a single or multipoint token. A single point
token for the "example" category might look like this:
</p>
<pre>example:xylep-radar-nanox</pre>
<p>
A 42 point
token for the "example" category might look like this:
</p>
<pre>example:42:xihyp-ropar-nanix</pre>
<p>
Tokens are typically associated with "live" categories, such as a
network-based service or a treasure hunt. Tokens can be submitted
with the form on the <a href="index.html">welcome page</a>, or you
can write your own script to automate token submission.
</p>
<p>
Some tokens change periodically, typically once a minute. If you
find a token, it's worth looking in the same place again later to
see if the token changes.
</p>
</section>
<section>
<h2>About time</h2>
<p>
@ -114,9 +114,6 @@
</ul>
</nav>
<section id="sponsors">
<img src="images/lanl.png" alt="Los Alamos National Laboratory">
<img src="images/doe.png" alt="US Department Of Energy">
<img src="images/sandia.png" alt="Sandia National Laboratories">
</section>
</body>
</html>