diff options
| author | scoder <none@none> | 2007-02-23 11:54:07 +0100 |
|---|---|---|
| committer | scoder <none@none> | 2007-02-23 11:54:07 +0100 |
| commit | f64a6fd467fe620f9ef8ec72f7188e287fb6213a (patch) | |
| tree | 8276e821a892d2a32461f1dd71009d1ea64ba2fc | |
| parent | 7d17f21a3ca2f0288e13fc9cc020e5e1f86b6f71 (diff) | |
| download | python-lxml-f64a6fd467fe620f9ef8ec72f7188e287fb6213a.tar.gz | |
[svn r2139] some more layouting, select current submenu with CSS
--HG--
branch : trunk
| -rw-r--r-- | doc/html/style.css | 19 | ||||
| -rw-r--r-- | doc/mkhtml.py | 7 |
2 files changed, 19 insertions, 7 deletions
diff --git a/doc/html/style.css b/doc/html/style.css index c1eda5fc..09925c7b 100644 --- a/doc/html/style.css +++ b/doc/html/style.css @@ -17,7 +17,7 @@ div.document { /*** menu ***/ -div.contents.topic { +div.contents { position: fixed; top: 0px; left: 0px; @@ -28,13 +28,26 @@ div.contents.topic { padding-right: 1ex; } -div.contents.topic ul { +div.contents span.section.title { + line-height: 1.5em; + font-size: 130%; +} + +div.contents ul.submenu.current { + display: block; +} + +div.contents ul.submenu { + display: none; +} + +div.contents ul { line-height: 1em; margin: 1ex; padding-left: 1em; } -div.contents.topic p.topic-title.first { +div.contents p.topic-title.first { display: none; } diff --git a/doc/mkhtml.py b/doc/mkhtml.py index c4b3e868..f73bb3bc 100644 --- a/doc/mkhtml.py +++ b/doc/mkhtml.py @@ -31,7 +31,7 @@ def build_menu(tree, basename, section, menuroot): if not section_head: ul = SubElement(menuroot, "ul", id=section) section_head = SubElement(ul, "li") - title = SubElement(section_head, "span") + title = SubElement(section_head, "span", {"class":"section title"}) title.text = section else: section_head = section_head[0] @@ -48,8 +48,7 @@ def build_menu(tree, basename, section, menuroot): a = SubElement(title, "a", href=basename+".html") a.text = page_title - subul = SubElement(title, "ul", - {"class":"submenu", "style":"display:none"}) + subul = SubElement(title, "ul", {"class":"submenu"}) for heading in headings: li = SubElement(subul, "li", {"class":"menu item"}) ref = replace_invalid('-', heading.lower()) @@ -68,7 +67,7 @@ def merge_menu(tree, menu, name): current_submenu = find_submenu(menu_root, name=name) if current_submenu: for submenu in current_submenu: - submenu.set("style", "") + submenu.set("class", submenu.get("class", "") + " current") else: print "No menu found in", name return tree |
