Browse Source

bash, improvements, etc etc

pull/24/head
Ben Kurtovic 13 years ago
parent
commit
5e63ae849e
6 changed files with 50 additions and 13 deletions
  1. +17
    -0
      pages/bash.mako
  2. +9
    -0
      pages/debug.mako
  3. +0
    -5
      pages/index.mako
  4. +8
    -3
      pages/support/footer.mako
  5. +4
    -1
      pages/support/header.mako
  6. +12
    -4
      static/css/main.css

+ 17
- 0
pages/bash.mako View File

@@ -0,0 +1,17 @@
<%!
from random import choice
bashes = [
"Now 20% cooler!",
"I make tools and tool accessories."
]
%>\
<%def name="bash()">${choice(bashes)}</%def>\
<%include file="/support/header.mako" args="environ=environ, title='Home'"/>
<div id="content">
<ul>
% for bash in bashes:
<li>${bash}</li>
% endfor
</ul>
</div>
<%include file="/support/footer.mako" args="environ=environ"/>

+ 9
- 0
pages/debug.mako View File

@@ -0,0 +1,9 @@
<%include file="/support/header.mako" args="environ=environ, title='Home'"/>
<div id="content">
% for key, value in environ.items():
% if key != "PATH":
<p><b>${key}</b>: ${value}</p>
% endif
% endfor
</div>
<%include file="/support/footer.mako" args="environ=environ"/>

+ 0
- 5
pages/index.mako View File

@@ -1,9 +1,4 @@
<%include file="/support/header.mako" args="environ=environ, title='Home'"/>
<div id="content">
% for key, value in environ.items():
% if key != "PATH":
<p><b>${key}</b>: ${value}</p>
% endif
% endfor
</div>
<%include file="/support/footer.mako" args="environ=environ"/>

+ 8
- 3
pages/support/footer.mako View File

@@ -1,12 +1,16 @@
<%page args="environ"/>\
<%namespace name="bash" file="/bash.mako"/>\
<%!
from os import path
%>\
<% root = path.dirname(environ["SCRIPT_NAME"]) %>\
<%
root = path.dirname(environ["SCRIPT_NAME"])
pretty = path.split(root)[0]
%>\
</div>
<div id="footer">
<div id="foot-divider"></div>
<table id="footer">
<table id="footer-box">
<tr>
<td>
<a href="http://wiki.toolserver.org/"><img src="${root}/static/images/toolserver-button.png" title="Powered by the Wikimedia Toolserver" alt="Powered by the Wikimedia Toolserver" /></a>
@@ -15,7 +19,8 @@
<p>Copyright &copy; 2009&ndash;2012 <a href="http://earwig.github.com/">Ben Kurtovic</a> &bull; \
<a href="mailto:earwig@toolserver.org">Contact</a> &bull; \
<a href="https://github.com/earwig/toolserver">View Source</a> &bull; \
<a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0 Strict</a>
<a href="http://validator.w3.org/check?uri=referer">Valid XHTML 1.0 Strict</a><br />
<i><a class="incognito" href="${pretty}/bash">"${bash.bash()}"</a></i>
</p>
</td>
<td>


+ 4
- 1
pages/support/header.mako View File

@@ -2,7 +2,10 @@
<%!
from os import path
%>\
<% root = path.dirname(environ["SCRIPT_NAME"]) %>\
<%
root = path.dirname(environ["SCRIPT_NAME"])
pretty = path.split(root)[0]
%>\
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
<head>


+ 12
- 4
static/css/main.css View File

@@ -7,7 +7,7 @@ body {

div#container {
width: 800px;
margin: 20px auto 65px auto;
margin: 20px auto 90px auto;
border: 1px solid #999;
border-radius: 10px;
background-color: #FFF;
@@ -20,22 +20,30 @@ div#content {
div#footer {
position: fixed;
width: 100%;
height: 45px;
height: 70px;
bottom: 0;
background-color: #EEE;
font-size: 12px;
text-align: center;
background-color: #EEE;
line-height: 1.5;
}

div#foot-divider {
border-bottom: 1px solid #999;
}

table#footer {
table#footer-box {
width: 100%;
height: 100%;
}

a:link { color: #373; text-decoration: none; }
a:visited { color: #373; text-decoration: none; }
a:hover { color: #040; text-decoration: underline; }
a:active { color: #404; text-decoration: underline; }

a.incognito:link { color: #000; text-decoration: none; }
a.incognito:visited { color: #000; text-decoration: none; }
a.incognito:hover { color: #000; text-decoration: underline; }
a.incognito:active { color: #000; text-decoration: none; }

Loading…
Cancel
Save