From 768e8b43f4f2e749becbc54d3566f002bebbd2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?"J.=20Rene=CC=81e=20Beach"?= Date: Mon, 10 Dec 2012 12:30:44 -0500 Subject: [PATCH] Search module example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: J. ReneĢe Beach --- core/modules/search/css/search.base.css | 13 +++++++++++++ core/modules/search/search.module | 20 ++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 core/modules/search/css/search.base.css diff --git a/core/modules/search/css/search.base.css b/core/modules/search/css/search.base.css new file mode 100644 index 0000000..5d2f571 --- /dev/null +++ b/core/modules/search/css/search.base.css @@ -0,0 +1,13 @@ +.toolbar .form-type-search { + float: right; + margin-right: 1em; + margin-top: 0.6667em; +} +.toolbar .form-type-search input { + border-radius: 9px; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + max-width: 20em; + padding-left: 0.3333em; +} diff --git a/core/modules/search/search.module b/core/modules/search/search.module index 866536e..98d6456 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -1338,3 +1338,23 @@ function search_forms() { ); return $forms; } + +function search_toolbar() { + $items = array(); + + $items['global_search'] = array( + '#type' => 'search', + '#attributes' => array( + 'placeholder' => t('Search the site'), + 'class' => array('search-global'), + ), + '#weight' => 200, + '#attached' => array( + 'css' => array( + drupal_get_path('module', 'search') . '/css/search.base.css', + ), + ), + ); + + return $items; +} -- 1.7.10.4