Redirect users attention to local vs global documentation search distinction
This commit is contained in:
parent
361442c197
commit
d325e03782
|
@ -6,6 +6,13 @@
|
|||
|
||||
(define bug-url "http://bugs.racket-lang.org/")
|
||||
|
||||
(define rendering-global-manuals? (and (getenv "PLT_PKG_BUILD_SERVICE") #t))
|
||||
(define search-manuals-label
|
||||
(format "Search ~a Manuals"
|
||||
(if rendering-global-manuals?
|
||||
"Global"
|
||||
"Local")))
|
||||
|
||||
;; Link definitions: (id-sym title root-sym/#f-for-url subpath/url),
|
||||
;; or a `---' for a spacer; the root-sym can be `plt' for standard
|
||||
;; pages, or `user' for pages that have an installation and a
|
||||
|
@ -14,7 +21,7 @@
|
|||
;; where the corresponding document is generated, this is a hack.)
|
||||
(define links
|
||||
`((start "Racket Documentation" user "index.html")
|
||||
(search "Search Manuals" user "search/index.html")
|
||||
(search ,search-manuals-label user "search/index.html")
|
||||
---
|
||||
(license "License" plt "license/index.html")
|
||||
(acks "Acknowledgements" plt "acks/index.html")
|
||||
|
|
|
@ -774,6 +774,9 @@ function UpdateResults() {
|
|||
(first_search_result+results_num < search_results.length)
|
||||
? "black" : "#e0e0e0";
|
||||
saved_status = false;
|
||||
|
||||
document.getElementById("redo_search_global").innerHTML =
|
||||
"<a href=\"http://docs.racket-lang.org/search/index.html?" + page_query_string + "\">Click here to repeat your search globally</a>.";
|
||||
}
|
||||
|
||||
function HandleKeyEvent(event) {
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
#lang scribble/doc
|
||||
@(require "private/utils.rkt" "private/make-search.rkt")
|
||||
@(require scribble/base
|
||||
scribble/core
|
||||
scribble/html-properties
|
||||
"private/utils.rkt"
|
||||
"private/make-search.rkt"
|
||||
"config.rkt")
|
||||
|
||||
@main-page['search #t]
|
||||
|
||||
@(if rendering-global-manuals?
|
||||
@para{You are searching all available Racket packages, including those that you may not have installed locally. Therefore, you may need to install a package to use the results shown below. @hyperlink["http://docs.racket-lang.org/pkg/getting-started.html"]{Getting Started with Packages} guides you through this process. If you want to re-run your search with local results only, press F1 in DrRacket or run @tt{raco docs} on the command line.}
|
||||
@para{You are searching only your locally installed Racket packages. More results may be available by using the @hyperlink["http://docs.racket-lang.org/search/"]{global search} that inspects all available packages. @elem[#:style (style #f (list (attributes (list (cons 'id "redo_search_global")))))]{You may wish to repeat your search globally.}})
|
||||
|
||||
@make-search[#f]
|
||||
|
|
Loading…
Reference in New Issue
Block a user