From adc82b0c67c2108662392df702061d60ce6e4693 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 26 Jun 2014 16:07:04 +0100 Subject: [PATCH] scribble: add `nosearchform` to HTML output without a search box original commit: 3d637c047c51674ab061c61f618fb925aa22800b --- .../scribble-doc/scribblings/scribble/config.scrbl | 1 + .../scribble-doc/scribblings/scribble/demo.scrbl | 3 ++- pkgs/scribble-pkgs/scribble-lib/scribble/html-render.rkt | 2 +- pkgs/scribble-pkgs/scribble-lib/scribble/manual-style.css | 6 ++++++ pkgs/scribble-pkgs/scribble-lib/scribble/scribble.css | 4 ++++ 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 index ecbf78ac..f10773d0 100644 --- 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 index a70c8a37..d9e0bfec 100644 --- 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 index 9103f6a5..f831d062 100644 --- 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 index d9e1783b..d4651fa8 100644 --- 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 index f34b7198..9733e69d 100644 --- 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;