import cgi
from docutils.core import publish_parts
+# Before importing the config, add our cwd to the Python path
+sys.path.append(os.getcwd())
+
# Load the config file, if there is one
try:
from config import *
pass
+# Pimp *_path config variables to support relative paths
+data_path = os.path.realpath(data_path)
+templates_path = os.path.realpath(templates_path)
+
# Default template
default_main_header = """
"""
default_main_footer = """
-</div><p/>
-<hr/><br/>
+</div>
<div class="footer">
%(showyear)s: %(monthlinks)s<br/>
years: %(yearlinks)s<br/>
body {
font-family: sans-serif;
font-size: small;
+ width: 52em;
}
div.content {
- width: 50%;
+ width: 96%;
}
h1 {
font-size: large;
border-bottom: 2px solid #99F;
- width: 60%;
+ width: 100%;
margin-bottom: 1em;
}
margin-bottom: 2em;
}
-hr {
- float: left;
- height: 2px;
- border: 0;
- background-color: #99F;
- width: 60%;
-}
-
div.footer {
+ margin-top: 1em;
+ padding-top: 0.4em;
+ width: 100%;
+ border-top: 2px solid #99F;
font-size: x-small;
}
def render_style():
- print 'Content-type: text/plain\n'
+ print 'Content-type: text/css\r\n\r\n',
print default_css
def handle_cgi():