diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2017-04-20 18:03:10 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2017-04-20 18:03:10 -0700 |
commit | 57e08284a63cd464b5bc0aad51a1ba2c3536e1e4 (patch) | |
tree | 2c24c4b127257251bd5cf3cb0e90cc772ad12055 | |
parent | 16d4db3aab498a89d71b57752fbed3d1b5c039cc (diff) | |
download | nasm-57e08284a63cd464b5bc0aad51a1ba2c3536e1e4.tar.gz |
doc, html: switch to a columnar layout for a very wide window
If we open in a very wide window, split the text into columns so it
can actually be conveniently read.
Also, change the body margin to 8px, as that seems to be the more
common browser default.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | doc/nasmdoc.css | 19 | ||||
-rw-r--r-- | doc/rdsrc.pl | 5 |
2 files changed, 20 insertions, 4 deletions
diff --git a/doc/nasmdoc.css b/doc/nasmdoc.css index af095273..f989f37b 100644 --- a/doc/nasmdoc.css +++ b/doc/nasmdoc.css @@ -61,11 +61,26 @@ ul.index { color: inherit; } } +@media only screen and (min-width: 90em) { + /* For a very wide screen, go to a columnar layout */ + div.contents { + -webkit-column-count: 2; + -moz-column-count: 2; + column-count: 2; + } +} +@media only screen and (min-width: 135em) { + div.contents { + -webkit-column-count: 3; + -moz-column-count: 3; + column-count: 3; + } +} @media screen { /* Setting an explicit margin to keep the navbar from moving */ body { padding: 0; - margin: 10px; + margin: 8px; } /* Link styles */ @@ -94,7 +109,7 @@ ul.index { ul.navbar { display: block; position: sticky; - top: 10px; + top: 8px; width: 100%; margin: 0; padding: 0; diff --git a/doc/rdsrc.pl b/doc/rdsrc.pl index bc066584..129bb085 100644 --- a/doc/rdsrc.pl +++ b/doc/rdsrc.pl @@ -971,11 +971,12 @@ sub html_preamble { print "<h1>", $metadata{'title'}, "</h1>\n"; print '<span class="subtitle">', $metadata{'subtitle'}, "</span>\n"; print "</div>\n"; + print "<div class=\"contents\"\n>\n"; } sub html_postamble { - # Closing tags - print "</body>\n</html>\n"; + # Common closing tags + print "</div>\n</body>\n</html>\n"; } sub html_index { |