Refactored the menu into a separate header file...
...that can be imported into other files. Added a footer. Added a link to the stats in the main menu. Removed a stub file that I ended up not using.
This commit is contained in:
parent
eef90f161c
commit
802c46b797
7 changed files with 61 additions and 94 deletions
|
@ -1,8 +0,0 @@
|
|||
import os,sys
|
||||
|
||||
for infile in sys.argv[1:]:
|
||||
map = open(infile,"r")
|
||||
lines = map.readlines()
|
||||
rows = len(lines) - 3
|
||||
columns = lines[3].count(',')+1
|
||||
print "%d rows x %d columns" % (rows,columns)
|
|
@ -3,15 +3,10 @@
|
|||
py:strip="">
|
||||
<py:def function="footer">
|
||||
<div id="footer">
|
||||
<div class="flogo">
|
||||
<img src="${tg.url('/images/under_the_hood_blue.png')}" alt="TurboGears" />
|
||||
<p><a href="http://www.turbogears.org/2.0/">Powered by TurboGears 2</a></p>
|
||||
</div>
|
||||
<div class="foottext">
|
||||
<p>TurboGears is a open source front-to-back web development
|
||||
framework written in Python. Copyright (c) 2005-2008 </p>
|
||||
</div>
|
||||
<div class="clearingdiv"></div>
|
||||
<div class="visualClear"></div>
|
||||
<div id="note">
|
||||
<p><a href="http://www.wesnoth.org/wiki/Wesnoth:Copyrights">Copyright</a> © 2003-2009 The Battle for Wesnoth</p>
|
||||
</div>
|
||||
</div>
|
||||
</py:def>
|
||||
</html>
|
||||
|
|
|
@ -2,11 +2,22 @@
|
|||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
py:strip="">
|
||||
<py:def function="header">
|
||||
<div id="header">
|
||||
<h1>
|
||||
Welcome to TurboGears 2
|
||||
<span class="subtitle">The Python web metaframework</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
<a href="http://www.wesnoth.org/"><img alt="Wesnoth logo" src="http://www.wesnoth.org/mw/skins/glamdrol/wesnoth-logo.jpg" /></a>
|
||||
</div>
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li><a href="http://www.wesnoth.org/">Home</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Play">Play</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Create">Create</a></li>
|
||||
<li><a href="http://www.wesnoth.org/forum/">Forums</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Support">Support</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Project">Project</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Credits">Credits</a></li>
|
||||
<li><a href="http://cornmander.com/wesstats">Game Stats</a></li> <!-- @TODO: update reference to wesnoth.org -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</py:def>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -12,7 +12,13 @@
|
|||
See the COPYING file for more details.
|
||||
-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns:py="http://genshi.edgewall.org/" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
>
|
||||
<xi:include href="header.html" />
|
||||
<xi:include href="footer.html" />
|
||||
<?python
|
||||
import urllib
|
||||
?>
|
||||
|
@ -21,24 +27,10 @@ import urllib
|
|||
<style type="text/css">@import url('http://www.cornmander.com/wesstats/css/main.css');</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
<a href="http://www.wesnoth.org/"><img alt="Wesnoth logo" src="http://www.wesnoth.org/mw/skins/glamdrol/wesnoth-logo.jpg" /></a>
|
||||
</div>
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li><a href="http://www.wesnoth.org/">Home</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Play">Play</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Create">Create</a></li>
|
||||
<li><a href="http://www.wesnoth.org/forum/">Forums</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Support">Support</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Project">Project</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Credits">Credits</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
${header()}
|
||||
<div id="main">
|
||||
<h3 py:for="view in views"><a href="/wesstats/${urllib.quote(view[1])}">${view[0]} (${view[2].capitalize()} Graph)</a></h3>
|
||||
</div>
|
||||
${footer()}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -12,7 +12,13 @@
|
|||
See the COPYING file for more details.
|
||||
-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns:py="http://genshi.edgewall.org/" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
>
|
||||
<xi:include href="header.html" />
|
||||
<xi:include href="footer.html" />
|
||||
<head>
|
||||
<script type="text/javascript" src="/wesstats/js/calendar.js"></script>
|
||||
<link rel="stylesheet" rev="stylesheet" href="/wesstats/css/calendar.css" media="screen" />
|
||||
|
@ -92,23 +98,10 @@
|
|||
</script>
|
||||
</head>
|
||||
<body onload="initialize()" onunload="GUnload()">
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
<a href="http://www.wesnoth.org/"><img alt="Wesnoth logo" src="http://www.wesnoth.org/mw/skins/glamdrol/wesnoth-logo.jpg" /></a>
|
||||
</div>
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li><a href="http://www.wesnoth.org/">Home</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Play">Play</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Create">Create</a></li>
|
||||
<li><a href="http://www.wesnoth.org/forum/">Forums</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Support">Support</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Project">Project</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Credits">Credits</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map_canvas" style="width: 800px; height: 600px"><noscript>You must enable Javascript in order to see the kill map.</noscript></div>
|
||||
${header()}
|
||||
<div id="map_canvas" style="width: 800px; height: 600px">
|
||||
<noscript>You must enable Javascript in order to see the kill map.</noscript>
|
||||
</div>
|
||||
<br />
|
||||
<div id="map_selection">
|
||||
Map: ${cur_map_name}
|
||||
|
@ -162,5 +155,6 @@ Killed level range: <input name="minkilledlev" value="${minkilledlev}" /> - <inp
|
|||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</div>
|
||||
${footer()}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -12,7 +12,13 @@
|
|||
See the COPYING file for more details.
|
||||
-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns:py="http://genshi.edgewall.org/" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
>
|
||||
<xi:include href="header.html" />
|
||||
<xi:include href="footer.html" />
|
||||
<head>
|
||||
<script type="text/javascript" src="/wesstats/js/calendar.js"></script>
|
||||
<link rel="stylesheet" rev="stylesheet" href="/wesstats/css/calendar.css" media="screen" />
|
||||
|
@ -39,22 +45,7 @@
|
|||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
<a href="http://www.wesnoth.org/"><img alt="Wesnoth logo" src="http://www.wesnoth.org/mw/skins/glamdrol/wesnoth-logo.jpg" /></a>
|
||||
</div>
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li><a href="http://www.wesnoth.org/">Home</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Play">Play</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Create">Create</a></li>
|
||||
<li><a href="http://www.wesnoth.org/forum/">Forums</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Support">Support</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Project">Project</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Credits">Credits</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
${header()}
|
||||
<div id="visualization" style="width: 800px; height: 600px;">
|
||||
</div>
|
||||
<div id="filter_box">
|
||||
|
@ -93,5 +84,6 @@ End date: <input name="enddate" value="${enddate}" />
|
|||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</div>
|
||||
${footer()}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -12,7 +12,13 @@
|
|||
See the COPYING file for more details.
|
||||
-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns:py="http://genshi.edgewall.org/" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
>
|
||||
<xi:include href="header.html" />
|
||||
<xi:include href="footer.html" />
|
||||
<head>
|
||||
<script type="text/javascript" src="/wesstats/js/calendar.js"></script>
|
||||
<link rel="stylesheet" rev="stylesheet" href="/wesstats/css/calendar.css" media="screen" />
|
||||
|
@ -38,23 +44,7 @@
|
|||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
<a href="http://www.wesnoth.org/"><img alt="Wesnoth logo" src="http://www.wesnoth.org/mw/skins/glamdrol/wesnoth-logo.jpg" /></a>
|
||||
</div>
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li><a href="http://www.wesnoth.org/">Home</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Play">Play</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Create">Create</a></li>
|
||||
<li><a href="http://www.wesnoth.org/forum/">Forums</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Support">Support</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Project">Project</a></li>
|
||||
<li><a href="http://www.wesnoth.org/wiki/Credits">Credits</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
${header()}
|
||||
<div id="visualization" style="width: 300px; height: 300px;">
|
||||
</div>
|
||||
|
||||
|
@ -94,5 +84,6 @@ End date: <input name="enddate" value="${enddate}" />
|
|||
<input type="submit" value="Submit" />
|
||||
</form>
|
||||
</div>
|
||||
${footer()}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Reference in a new issue