* src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.

For `Index' and `TOC' links, we now simply use the `text-align' CSS
property of `<td>' to enforce flush-left and flush-right,
eliminating the hack with an empty, full-width `<td>' element
inbetween.

The change also enforces the same (smaller) size for all index and
TOC links.
This commit is contained in:
Werner Lemberg 2014-11-27 19:22:52 +01:00
parent 1b12f5d126
commit 26d699ed84
2 changed files with 40 additions and 31 deletions

View File

@ -1,3 +1,15 @@
2014-11-27 Werner Lemberg <wl@gnu.org>
* src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
For `Index' and `TOC' links, we now simply use the `text-align' CSS
property of `<td>' to enforce flush-left and flush-right,
eliminating the hack with an empty, full-width `<td>' element
inbetween.
The change also enforces the same (smaller) size for all index and
TOC links.
2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),

View File

@ -65,14 +65,23 @@ html_header_2 = """\
table.center { margin: auto; }
table.fill { width: 100%; }
table.index-toc-link { width: 100%; }
table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
font-size: 83%;
text-align: left; }
table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
font-size: 83%;
text-align: right; }
table.synopsis { margin: auto;
border: 0;
border-collapse: separate;
border-spacing: 1em 1ex; }
table.synopsis tr { padding: 0; }
table.synopsis td { padding: 0; }
td { padding: 0 0.5em 0 0.5em; }
td.left { padding: 0 0.5em 0 0.5em;
text-align: left; }
td.small { padding: 0 0.5em 0 0.5em;
font-size: 83%; }
td.tiny { padding: 0 0.5em 0 0.5em;
font-size: 69%; }
tr.mark { background-color: #EEEEFF; }
tr.code { background-color: #D6E8FF; }
@ -83,19 +92,17 @@ html_header_2 = """\
<body>
"""
html_header_3 = """
<table class="center"><tr><td class="small">[<a href="\
html_header_3l = """
<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
html_header_3i = """
<table class="center"><tr><td width="100%"></td>
<td class="small">[<a href="\
html_header_3r = """
<table class="index-toc-link"><tr><td class="right">[<a href="\
"""
html_header_4 = """\
">Index</a>]</td>
<td width="100%"></td>
<td class="small">[<a href="\
<td class="right">[<a href="\
"""
html_header_5 = """\
@ -103,12 +110,6 @@ html_header_5 = """\
<h1>\
"""
html_header_5t = """\
">Index</a>]</td>
<td width="100%"></td></tr></table>
<h1>\
"""
html_header_6 = """\
API Reference</h1>
"""
@ -136,12 +137,11 @@ para_footer = "</p>"
block_header = '<div class="indent2">'
block_footer_start = """\
<hr>
<table><tr><td class="small">[<a href="\
<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
block_footer_middle = """\
">Index</a>]</td>
<td width="100%"></td>
<td class="small">[<a href="\
<td class="right">[<a href="\
"""
block_footer_end = """\
">TOC</a>]</td></tr></table></div>
@ -172,8 +172,7 @@ chapter_footer = '</li></ul></div>'
# Index footer.
index_footer_start = """\
<hr>
<table><tr><td width="100%"></td>
<td class="tiny">[<a href="\
<table class="index-toc-link"><tr><td class="right">[<a href="\
"""
index_footer_end = """\
">TOC</a>]</td></tr></table>
@ -182,12 +181,10 @@ index_footer_end = """\
# TOC footer.
toc_footer_start = """\
<hr>
<table><tr><td class="tiny">[<a href="\
<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
toc_footer_end = """\
">Index</a>]</td>
<td width="100%"></td>
</tr></table>
">Index</a>]</td></tr></table>
"""
@ -232,21 +229,21 @@ class HtmlFormatter( Formatter ):
self.html_header = (
html_header_1 + project_title
+ html_header_2
+ html_header_3 + file_prefix + "index.html"
+ html_header_3l + file_prefix + "index.html"
+ html_header_4 + file_prefix + "toc.html"
+ html_header_5 + project_title
+ html_header_6 )
self.html_index_header = (
html_header_1 + project_title
+ html_header_2
+ html_header_3i + file_prefix + "toc.html"
+ html_header_3r + file_prefix + "toc.html"
+ html_header_5 + project_title
+ html_header_6 )
self.html_toc_header = (
html_header_1 + project_title
+ html_header_2
+ html_header_3 + file_prefix + "index.html"
+ html_header_5t + project_title
+ html_header_3l + file_prefix + "index.html"
+ html_header_5 + project_title
+ html_header_6 )
self.html_footer = (
'<div class="timestamp">generated on '
@ -526,7 +523,7 @@ class HtmlFormatter( Formatter ):
if maxwidth <> 0:
# print section synopsis
print section_synopsis_header
print '<table class="center" cellspacing="5" cellpadding="0" border="0">'
print '<table class="synopsis">'
columns = width / maxwidth
if columns < 1: