[Python-checkins] peps: Further presentation adjustments, use a style sheet for some things.
georg.brandl
python-checkins at python.org
Wed Mar 23 21:23:32 CET 2011
http://hg.python.org/peps/rev/c7065145df09
changeset: 53:c7065145df09
user: Fred Drake <fdrake at acm.org>
date: Thu Jul 27 18:44:44 2000 +0000
summary:
Further presentation adjustments, use a style sheet for some things.
files:
pep2html.py | 19 ++++++++++++-------
style.css | 7 +++++++
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/pep2html.py b/pep2html.py
--- a/pep2html.py
+++ b/pep2html.py
@@ -59,19 +59,24 @@
if pep:
title = "PEP " + pep + " -- " + title
if title:
- fo.write(" <title>%s</title>\n" % cgi.escape(title))
+ fo.write(" <title>%s</title>\n"
+ ' <link rel="STYLESHEET" href="style.css">\n'
+ % cgi.escape(title))
fo.write("</head>\n")
# body
- fo.write('<body bgcolor="white">\n')
- fo.write('[<a href="../">home</a>]\n')
+ fo.write('<body bgcolor="white">\n'
+ '<div class="navigation">\n')
+ fo.write('[<b><a href="../">home</a></b>]\n')
if os.path.basename(infile) != "pep-0000.txt":
- fo.write('[<a href=".">index</a>]\n')
- fo.write('<hr />\n<table border="0">\n')
+ fo.write('[<b><a href=".">index</a></b>]\n')
+ fo.write('</div>\n'
+ '<div class="header">\n<table border="0">\n')
for k, v in header:
fo.write(" <tr><th align='right'>%s:</th><td>%s</td></tr>\n"
% (cgi.escape(k), cgi.escape(v)))
title = 0
- fo.write("</table>\n<hr />\n<pre>")
+ fo.write("</table>\n</div>\n<hr />\n"
+ "<pre>")
while 1:
line = fi.readline()
if not line:
@@ -110,7 +115,7 @@
raise "Syntax: "+sys.argv[0]+" [-n] [sf_username]"
if update:
- os.system("scp pep-*.html " + username + HOST + ":" + HDIR)
+ os.system("scp pep-*.html style.css " + username + HOST + ":" + HDIR)
os.system("ssh " + username + HOST + " chmod 664 " + HDIR + "/*")
diff --git a/style.css b/style.css
new file mode 100644
--- /dev/null
+++ b/style.css
@@ -0,0 +1,7 @@
+.navigation { background: #99ccff;
+ border: thin solid #ffffff;
+ width: 100%;
+ padding: 4pt;
+ }
+
+.header th:after { content: " " }
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list