More visually noticeable navigation bar

svn: r10572

original commit: d2c666f1e7ca100a73505223ffb02d338c7d7d37
This commit is contained in:
Eli Barzilay 2008-07-03 05:27:01 +00:00
parent e820ac1623
commit 995a809f7e
2 changed files with 76 additions and 69 deletions

View File

@ -196,8 +196,7 @@
" background-color: #eee; color: #888;"
" border: 1px solid #ddd; text-align: center;")]
[type "text"]
[value "...search..."]
[size "12"]
[value "...search manuals..."]
[title "Enter a search string to search the manuals"]
[onkeypress ,(format "return DoSearchKey(event, this, ~s);" (version))]
[onfocus ,(sa "this.style.color=\"black\";"
@ -535,9 +534,9 @@
(div ([class "maincolumn"])
(div ([class "main"])
,@(render-version d ri)
,@(navigation d ri #f)
,@(navigation d ri #t)
,@(render-part d ri)
,@(navigation d ri #t))))))))))
,@(navigation d ri #f))))))))))
(define/private (part-parent d ri)
(collected-info-parent (part-collected-info d ri)))
@ -564,7 +563,7 @@
(define/public (derive-filename d) "bad.html")
(define/private (navigation d ri pre-space?)
(define/private (navigation d ri top?)
(define parent (part-parent d ri))
(define-values (prev0 next0) (find-siblings d ri))
(define prev
@ -612,10 +611,12 @@
(make-with-attributes #f
`([title . ,(if title* (string-append label " to " title*) label)]
,@more))))
(if (not (or prev next parent index up-path))
null
`(,@(if pre-space? '((p nbsp)) null)
(div ([class "navleft"])
(define (navbar)
`(div ([class "navset"]
[style ,(let ([v (if top? 'bottom 'top)])
(format "margin-~a: 2em; border-~a: ~a"
v v "2px solid #e0e0c0;"))])
(span ([class "navleft"])
,@(render (make-element
(if parent
(make-target-url "index.html" #f)
@ -633,7 +634,7 @@
`((span ([class "smaller"]) nbsp ,(search-index-box)))))
null)
,@(if up-path `(nbsp ,(search-box)) null))
(div ([class "navright"])
(span ([class "navright"])
,@(render
(make-element
(cond [(not parent) "nonavigation"]
@ -662,11 +663,11 @@
[else "nonavigation"])
up-content)
sep-element
(make-element (if next
(titled-url "forward" next)
"nonavigation")
(make-element
(if next (titled-url "forward" next) "nonavigation")
next-content)))
(p nbsp))))
nbsp)) ; needed to make the navset background visible
(if (or prev next parent index up-path) (list (navbar)) null))
(define/override (render-one d ri fn)
(render-one-part d ri fn null))

View File

@ -58,18 +58,24 @@ table td {
/* ---------------------------------------- */
/* Navigation */
.navset {
background-color: #f0f0e0;
}
.navleft {
margin-left: 1ex;
position: relative;
float: left;
white-space: nowrap;
}
.navright {
margin-right: 1ex;
position: relative;
float: right;
white-space: nowrap;
}
.nonavigation {
color: #EEEEEE;
color: #e0e0e0;
}
/* ---------------------------------------- */
@ -139,13 +145,13 @@ font-weight: bold;
.tocview {
text-align: left;
background-color: #F5F5DC;
background-color: #f0f0e0;
}
.tocsub {
text-align: left;
margin-top: 0.5em;
background-color: #F5F5F5;
background-color: #f0f0e0;
}
.tocviewtitle {