1.1 --- a/viewer.py Wed May 02 00:23:19 2007 +0200
1.2 +++ b/viewer.py Sat May 26 02:28:02 2007 +0200
1.3 @@ -32,11 +32,15 @@
1.4 # HTML-related output production.
1.5
1.6 html_header = """<?xml version="1.0" encoding="iso-8859-15"?>
1.7 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
1.8 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.9 <html xmlns="http://www.w3.org/1999/xhtml">
1.10 <head>
1.11 <title>Module</title>
1.12 <style type="text/css">
1.13 + html {
1.14 + background-color: black; color: white;
1.15 + }
1.16 +
1.17 body {
1.18 padding-bottom: 4em;
1.19 font-size: 14pt; font-family: monospace;
1.20 @@ -56,7 +60,7 @@
1.21
1.22 .popup {
1.23 display: none; z-index: 2;
1.24 - position: absolute; top: 1em; left: 0.5em;
1.25 + position: absolute; top: 2ex; left: 0;
1.26 padding: 0.2em; background-color: #000000; color: white;
1.27 border: 2px solid #dddddd;
1.28 }
1.29 @@ -198,7 +202,7 @@
1.30 definition = node._node
1.31 definitions = definition.active()
1.32 structure = definition.expr.ref
1.33 - self.stream.write("<div class='class' id='%s'>\n" % self._url(structure.full_name()))
1.34 + self.stream.write("<div class='class' id='%s'>\n" % structure.full_name())
1.35 self.stream.write("<div>\n")
1.36 self._keyword("class")
1.37 self._name_start(structure.name, "class-name")
1.38 @@ -308,7 +312,7 @@
1.39 definitions = [n for n in definition.active() if not isinstance(n, Subprogram)]
1.40 subprogram = node._subprogram
1.41 subprograms = subprogram.active()
1.42 - self.stream.write("<div class='function' id='%s'>\n" % self._url(subprogram.full_name()))
1.43 + self.stream.write("<div class='function' id='%s'>\n" % subprogram.full_name())
1.44 self.stream.write("<div>\n")
1.45 self._keyword("def")
1.46 self._name_start(subprogram.name, "function-name")
1.47 @@ -1048,8 +1052,8 @@
1.48
1.49 if links:
1.50 popup_labels = []
1.51 - for label, link in links.items():
1.52 - popup_labels.append("<a href='%s.html#%s'>%s</a>" % (link + (label,)))
1.53 + for label, (module_name, target_name) in links.items():
1.54 + popup_labels.append("<a href='%s%sxhtml#%s'>%s</a>" % (module_name, os.path.extsep, target_name, label))
1.55 else:
1.56 popup_labels = []
1.57
1.58 @@ -1162,6 +1166,6 @@
1.59 if not os.path.exists(dirname):
1.60 os.mkdir(dirname)
1.61 for m in [module, builtins] + modules:
1.62 - makedoc(m, os.path.join(dirname, "%s%shtml" % (m.name, os.path.extsep)))
1.63 + makedoc(m, os.path.join(dirname, "%s%sxhtml" % (m.name, os.path.extsep)))
1.64
1.65 # vim: tabstop=4 expandtab shiftwidth=4