change HTML toc formatting
svn: r6261 original commit: 127dd66e308a9e504650ed2c6c4a413be20090d9
This commit is contained in:
parent
9567880910
commit
bed598457d
|
@ -243,22 +243,31 @@
|
|||
|
||||
(define/private (render-toc part)
|
||||
(let ([number (collected-info-number (part-collected-info part))])
|
||||
(cons
|
||||
(list (make-flow
|
||||
(list
|
||||
(make-paragraph
|
||||
(list
|
||||
(make-element 'hspace (list (make-string (* 2 (length number)) #\space)))
|
||||
(make-link-element "toclink"
|
||||
(append
|
||||
(format-number number
|
||||
(list
|
||||
(make-element 'hspace '(" "))))
|
||||
(part-title-content part))
|
||||
`(part ,(part-tag part))))))))
|
||||
(apply
|
||||
append
|
||||
(map (lambda (p) (render-toc p)) (part-parts part))))))
|
||||
(let ([l (cons
|
||||
(list (make-flow
|
||||
(list
|
||||
(make-paragraph
|
||||
(list
|
||||
(make-element 'hspace (list (make-string (* 2 (length number)) #\space)))
|
||||
(make-link-element (if (= 1 (length number))
|
||||
"toptoclink"
|
||||
"toclink")
|
||||
(append
|
||||
(format-number number
|
||||
(list
|
||||
(make-element 'hspace '(" "))))
|
||||
(part-title-content part))
|
||||
`(part ,(part-tag part))))))))
|
||||
(apply
|
||||
append
|
||||
(map (lambda (p) (render-toc p)) (part-parts part))))])
|
||||
(if (and (= 1 (length number))
|
||||
(or (not (car number))
|
||||
((car number) . > . 1)))
|
||||
(cons (list (make-flow (list (make-paragraph (list
|
||||
(make-element 'hspace (list " ")))))))
|
||||
l)
|
||||
l))))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
|
|
|
@ -18,6 +18,13 @@
|
|||
.toclink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
.toptoclink {
|
||||
text-decoration: none;
|
||||
color: blue;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.title {
|
||||
|
|
Loading…
Reference in New Issue
Block a user