From db82df12951fd0c1bdc80d0801cfebe00273fc58 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Tue, 5 Sep 2017 11:13:01 +0100 Subject: [PATCH] Make decision on helper text dynamically --- pkgs/racket-index/scribblings/main/config.rkt | 11 +++-------- pkgs/racket-index/scribblings/main/search.scrbl | 7 ++++--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/racket-index/scribblings/main/config.rkt b/pkgs/racket-index/scribblings/main/config.rkt index e4eac8aeea..28c8ec37f9 100644 --- a/pkgs/racket-index/scribblings/main/config.rkt +++ b/pkgs/racket-index/scribblings/main/config.rkt @@ -6,13 +6,6 @@ (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 @@ -21,7 +14,9 @@ ;; where the corresponding document is generated, this is a hack.) (define links `((start "Racket Documentation" user "index.html") - (search ,search-manuals-label user "search/index.html") + ;; XXX I want this to say Global vs Local but I don't think this + ;; can be something overrided by css/js with doc-site + (search "Search Manuals" user "search/index.html") --- (license "License" plt "license/index.html") (acks "Acknowledgements" plt "acks/index.html") diff --git a/pkgs/racket-index/scribblings/main/search.scrbl b/pkgs/racket-index/scribblings/main/search.scrbl index 6498e75bc4..583b1aa69f 100644 --- a/pkgs/racket-index/scribblings/main/search.scrbl +++ b/pkgs/racket-index/scribblings/main/search.scrbl @@ -8,8 +8,9 @@ @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.}}) +@para[#:style (style #f (list (attributes (list (cons 'class "plt_global_only") (cons 'style "display: none;")))))]{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[#:style (style #f (list (attributes (list (cons 'class "plt_local_only")))))]{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] +