From cd57da09467906ae6166df936db4ed1fb6f0d057 Mon Sep 17 00:00:00 2001 From: George Vinogradov Date: Tue, 6 Mar 2012 17:08:19 +0400 Subject: [PATCH] [issue #193] Fixed searchbar in wiki. --- app/assets/stylesheets/custom.scss | 49 +++++++++++++++++++++++++++++ app/views/wiki/_searchbar.html.haml | 3 +- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/custom.scss b/app/assets/stylesheets/custom.scss index 57d493edf..45db630ce 100644 --- a/app/assets/stylesheets/custom.scss +++ b/app/assets/stylesheets/custom.scss @@ -12,3 +12,52 @@ header menu ul li a { padding: 15px 8px 15px 8px; } +div#gollum-searchbar-fauxtext { + padding-left: 10px; +} + +div#gollum-searchbar-fauxtext input#search-query { + display: inline-block; + float: left; + width: 145px; + border: 1px solid #D3D3D3; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; + border-bottom-right-radius: 0; + border-top-right-radius: 0; + font-size: 12px; + height: 24px; + margin: 0; + padding: 0 4px; + vertical-align: middle; + white-space: nowrap; +} + +a#search-submit { + -moz-box-sizing: content-box; + border-left: medium none; + border-radius: 0 3px 3px 0; + height: 24px; + margin-left: 0; + padding: 0; + position: relative; + vertical-align: middle; + display: inline-block; + float: left; +} + +a#search-submit span { + background: image-url("gollum/icon-sprite.png") no-repeat scroll 50% 4px transparent; + background-position: -430px -2px; + height: 24px; + text-indent: -9999px; + width: 16px; + display: block; + height: 21px; + line-height: 21px; + padding: 0 9px 0 7px; +} + +a#search-submit:hover span { + background-position: -430px -29px; +} diff --git a/app/views/wiki/_searchbar.html.haml b/app/views/wiki/_searchbar.html.haml index c0c7ebeed..8ba3d22a1 100644 --- a/app/views/wiki/_searchbar.html.haml +++ b/app/views/wiki/_searchbar.html.haml @@ -3,4 +3,5 @@ #gollum-searchbar-fauxtext = text_field_tag :q, t("wiki.search_and_hellip"), :id => "search-query", :autocomplete => "on" = link_to "#", :id => "search-submit", :title => t("wiki.search_popup") do - %span= t("wiki.search") \ No newline at end of file + %span= t("wiki.search") + .both