commit adc82b0c67c2108662392df702061d60ce6e4693 parent 6b302dcfc6764de1dc638105e9f6326c4d97db0e Author: Matthew Flatt <mflatt@racket-lang.org> Date: Thu, 26 Jun 2014 16:07:04 +0100 scribble: add `nosearchform` to HTML output without a search box original commit: 3d637c047c51674ab061c61f618fb925aa22800b Diffstat:
5 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/config.scrbl b/pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/config.scrbl @@ -349,6 +349,7 @@ The style classes: [@css{nonavigation} @elem{Disabled links within a navigation bar.}] [@css{searchform} @elem{Outer wrapper for a search box within the top navigation bar.}] [@css{searchbox} @elem{Inner wrapper for a search box within the top navigation bar.}] + [@css{nosearchform} @elem{Takes the place of an absent search box within the top navigation bar.}] [@spacer @spacer] diff --git a/pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/demo.scrbl b/pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/demo.scrbl @@ -309,7 +309,8 @@ Links that are disabled (such as a next-page link on the last page) are each in a span ``nonavigation''. When a search box is included, then it is in ``searchform'' and then -``searchbox''. +``searchbox''. If no search box is included, then a ``nosearchform'' +@tt{div} is used. Finally, and not part of the nagivation bar, the bottom nagivation bar is followed by a @tt{div} with the name diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/html-render.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/html-render.rkt @@ -1001,7 +1001,7 @@ `(span ([class "navleft"]) ,@(if search-box? (list (if up-path search-box top-search-box)) - null) + (list `(div ([class "nosearchform"])))) ,@(render sep-element (and up-path (make-element top-link top-content)) diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/manual-style.css b/pkgs/scribble-pkgs/scribble-lib/scribble/manual-style.css @@ -241,6 +241,12 @@ a:hover { height: 4rem; } +.nosearchform { + margin: 0; + padding: 0; + height: 4rem; +} + .searchbox { font-size: 1rem; width: 12rem; diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/scribble.css b/pkgs/scribble-pkgs/scribble-lib/scribble/scribble.css @@ -122,6 +122,10 @@ table td { padding: 0; } +.nosearchform { + display: none; +} + .searchbox { width: 16em; margin: 0px;