Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions scribble-lib/scribble/html-render.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -221,26 +221,16 @@
(string->symbol (alt-tag-name s)))))

(define (make-search-box top-path) ; appears on every page
(let ([sa string-append]
[emptylabel "...search manuals..."]
[dimcolor "#888"])
(let ([emptylabel "...search manuals..."])
`(form ([class "searchform"])
(input
([class "searchbox"]
[style ,(sa "color: "dimcolor";")]
[type "text"]
[tabindex "1"]
[value ,emptylabel]
[placeholder ,emptylabel]
[title "Enter a search string to search the manuals"]
[onkeypress ,(format "return DoSearchKey(event, this, ~s, ~s);"
(version) top-path)]
[onfocus ,(sa "this.style.color=\"black\"; "
"this.style.textAlign=\"left\"; "
"if (this.value == \""emptylabel"\") this.value=\"\";")]
[onblur ,(sa "if (this.value.match(/^ *$/)) {"
" this.style.color=\""dimcolor"\";"
" this.style.textAlign=\"center\";"
" this.value=\""emptylabel"\"; }")])))))
(version) top-path)])))))
(define search-box (make-search-box "../"))
(define top-search-box (make-search-box ""))

Expand Down
5 changes: 4 additions & 1 deletion scribble-lib/scribble/scribble.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,13 @@ table td {
padding: 0px;
background-color: #eee;
border: 1px solid #ddd;
text-align: center;
vertical-align: middle;
}

.searchbox::placeholder {
text-align: center;
}

#contextindicator {
position: fixed;
background-color: #c6f;
Expand Down