tweak appearance of main doc page

svn: r9951

original commit: a41f8e8e382c2a81f5e0d407327cbaec065e5dae
This commit is contained in:
Matthew Flatt 2008-05-25 15:16:03 +00:00
parent fa38d02dae
commit 8ec48bb3bb
3 changed files with 40 additions and 19 deletions

View File

@ -376,22 +376,26 @@
(cdr l))))]
[else (cons (car l) (loop (cdr l)))])))))
`((div ([class "tocset"])
,@(let* ([content (render-content
(or (part-title-content top) '("???"))
d ri)]
[content (if (null? toc-content)
content
`((a ([href "index.html"] [class "tocviewlink"])
,@content)))])
`((div ([class "tocview"])
(div ([class "tocviewtitle"]) ,@content)
(div nbsp)
,@(if (null? toc-content)
'()
(toc-wrap
`(table ([class "tocviewlist"] [cellspacing "0"])
,@toc-content))))))
,@(render-onthispage-contents d ri top)
,@(if (part-style? d 'no-toc)
null
(let* ([content (render-content
(or (part-title-content top) '("???"))
d ri)]
[content (if (null? toc-content)
content
`((a ([href "index.html"] [class "tocviewlink"])
,@content)))])
`((div ([class "tocview"])
(div ([class "tocviewtitle"]) ,@content)
(div nbsp)
,@(if (null? toc-content)
'()
(toc-wrap
`(table ([class "tocviewlist"] [cellspacing "0"])
,@toc-content)))))))
,@(render-onthispage-contents d ri top (if (part-style? d 'no-toc)
"tocview"
"tocsub"))
,@(parameterize ([extra-breaking? #t])
(append-map (lambda (t)
(let loop ([t t])
@ -412,7 +416,7 @@
(define/public (nearly-top? d ri top)
#f)
(define/private (render-onthispage-contents d ri top)
(define/private (render-onthispage-contents d ri top box-class)
(if (ormap (lambda (p) (part-whole-page? p ri))
(part-parts d))
null
@ -474,7 +478,7 @@
[any-parts? (ormap part? ps)])
(if (null? ps)
null
`((div ([class "tocsub"])
`((div ([class ,box-class])
,@(get-onthispage-label)
(table ([class "tocsublist"]
[cellspacing "0"])

View File

@ -209,7 +209,7 @@ font-weight: bold;
.inherited {
width: 100%;
margin-top: 1em;
margin-top: 0.5em;
text-align: left;
background-color: #ECF5F5;
}

View File

@ -257,6 +257,14 @@ are as follows:
@item{@scheme['hidden] --- the part title is not shown in rendered output.}
@item{@scheme['no-toc] --- as a style for the main part of a
document, causes the HTML output to not include a margin box
for the main table of contents; the ``on this page'' box that
contains @scheme[toc-element] and @scheme[toc-target-element]
links (and that only includes an ``on this page'' label for
multi-page documents) takes on the location and color of the
main table of contents, instead.}
}
The @scheme[to-collect] field contains @techlink{content} that is
@ -400,6 +408,15 @@ label to be shown in the ``on this page'' table for HTML output.
}
@defstruct[(toc-element element) ([toc-content list?])]{
Similar to @scheme[toc-target-element], but with specific content for
the ``on this page'' table specified in the @scheme[toc-content]
field.
}
@defstruct[(link-element element) ([tag tag?])]{
Hyperlinks the content to @scheme[tag].