Make decision on helper text dynamically
This commit is contained in:
parent
d325e03782
commit
db82df1295
|
@ -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")
|
||||
|
|
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user