Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

Commit

Permalink
zy: Improved usability and styling of search box. Props to issue owne…
Browse files Browse the repository at this point in the history
…r (Issue #152).
  • Loading branch information
zyml committed Dec 12, 2011
1 parent dbacbab commit a6c1f25
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions css/styles/default-rtl.css
Expand Up @@ -92,9 +92,9 @@ label.error { border: 1px solid #D8000C; color: #D8000C; background: #FFBABA;

/* search bar */
#searchbar { margin: 25px 0 0; }
.searchform { border: 3px solid #383332; background: #EFEFEF; width: 250px; padding: 6px 5px; margin: 0; }
.searchform .s { font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 14px; border: none; background: #EFEFEF; padding: 0; margin: 0; float: right; width: 234px; }
.searchform .searchsubmit { background: url(../../images/searchsubmit.gif) no-repeat; text-indent: -9000px; width: 16px; height: 16px; border: none; float: right; cursor: pointer; opacity: 0.7; text-transform: capitalize; padding: 0; margin: 0; }
.searchform { border: 3px solid #383332; background: #EFEFEF; margin: 0; }
.searchform .s { font-family: Helvetica, Arial, sans-serif; font-size: 14px; border: none; background: #EFEFEF; padding: 8px 5px; margin: 0; float: right; width: 234px; }
.searchform .searchsubmit { background: url(../../images/searchsubmit.gif) no-repeat; text-indent: -9000px; width: 16px; height: 16px; border: none; float: left; cursor: pointer; opacity: 0.7; text-transform: capitalize; padding: 0; margin: 6px 5px; }
.searchform .searchsubmit:hover { background: url(../../images/searchsubmit.gif) no-repeat; opacity: 1; }

/* sidebar */
Expand Down Expand Up @@ -235,7 +235,7 @@ label.error { border: 1px solid #D8000C; color: #D8000C; background: #FFBABA;
/* search results */
.search-results h2 { color: #333; font-size: 12px; font-weight: 700; margin: 0 10px 0 0; padding: 6px 10px; background: url(../../images/feed-title-white.jpg) repeat-x top #EFEFEF; border: 1px solid #CCC; }
.search-results-content { border: solid #CCC; border-width: 0 1px 1px; background: #FFF; margin: 0 10px 10px 0; padding: 10px; }
.search-results-content .searchform, .sidebar .searchform { padding: 5px 4px; border: 4px solid #CCC; background: #EFEFEF; width: 250px; }
.search-results-content .searchform, .sidebar .searchform { border: 2px solid #CCC; background: #EFEFEF; }

/* author template */
.author-posts-title, .author-content h1, .archive-title { font-family: Century Gothic, Apple Gothic, sans-serif; text-transform: uppercase; font-weight: 700; font-size: 14px; padding: 0 3px 8px; border-bottom: 1px solid #DDD; margin: 0 15px 10px 0; color: #383331; }
Expand Down
10 changes: 5 additions & 5 deletions css/styles/default.css
Expand Up @@ -12,7 +12,7 @@ code { background: #EAEAEA; color: #333; font-family: Consolas, Monaco, Cour
pre code { background: #322E2C; border: 1px solid #635957; color: #FFF; display: block; overflow: scroll; padding: 1.5em 1.75em; }

input[type=text], input[type=password], textarea { background: url(../../images/form.jpg) repeat-x top #FFF; border: 1px solid #CCC; padding: 5px 3px; }
input[type=submit] { font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background: url(../../images/feed-title-white.jpg) repeat-x; border: 1px solid #CCC; padding: 5px 10px; font-size: 12px; color: #000; font-weight: 700; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
input[type=submit] { font-family: Helvetica, Arial, sans-serif; background: url(../../images/feed-title-white.jpg) repeat-x; border: 1px solid #CCC; padding: 5px 10px; font-size: 12px; color: #000; font-weight: 700; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; }
input[type=submit]:hover { background: #313428; color: #FFF; }

table, th, td { border: 1px solid #CCC; }
Expand Down Expand Up @@ -92,9 +92,9 @@ label.error { border: 1px solid #D8000C; color: #D8000C; background: #FFBABA;

/* search bar */
#searchbar { margin: 25px 0 0; }
.searchform { border: 3px solid #383332; background: #EFEFEF; width: 250px; padding: 6px 5px; margin: 0; }
.searchform .s { font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 14px; border: none; background: #EFEFEF; padding: 0; margin: 0; float: left; width: 234px; }
.searchform .searchsubmit { background: url(../../images/searchsubmit.gif) no-repeat; text-indent: -9000px; width: 16px; height: 16px; border: none; float: left; cursor: pointer; opacity: 0.7; text-transform: capitalize; padding: 0; margin: 0; }
.searchform { border: 3px solid #383332; background: #EFEFEF; margin: 0; }
.searchform .s { font-family: Helvetica, Arial, sans-serif; font-size: 14px; border: none; background: #EFEFEF; padding: 8px 5px; margin: 0; float: left; width: 234px; }
.searchform .searchsubmit { background: url(../../images/searchsubmit.gif) no-repeat; text-indent: -9000px; width: 16px; height: 16px; border: none; float: right; cursor: pointer; opacity: 0.7; text-transform: capitalize; padding: 0; margin: 6px 5px; }
.searchform .searchsubmit:hover { background: url(../../images/searchsubmit.gif) no-repeat; opacity: 1; }

/* sidebar */
Expand Down Expand Up @@ -235,7 +235,7 @@ label.error { border: 1px solid #D8000C; color: #D8000C; background: #FFBABA;
/* search results */
.search-results h2 { color: #333; font-size: 12px; font-weight: 700; margin: 0 10px 0 0; padding: 6px 10px; background: url(../../images/feed-title-white.jpg) repeat-x top #EFEFEF; border: 1px solid #CCC; }
.search-results-content { border: solid #CCC; border-width: 0 1px 1px; background: #FFF; margin: 0 10px 10px 0; padding: 10px; }
.search-results-content .searchform, .sidebar .searchform { padding: 5px 4px; border: 4px solid #CCC; background: #EFEFEF; width: 250px; }
.search-results-content .searchform, .sidebar .searchform { border: 2px solid #CCC; background: #EFEFEF; }

/* author template */
.author-posts-title, .author-content h1, .archive-title { font-family: Century Gothic, Apple Gothic, sans-serif; text-transform: uppercase; font-weight: 700; font-size: 14px; padding: 0 3px 8px; border-bottom: 1px solid #DDD; margin: 0 15px 10px 0; color: #383331; }
Expand Down
6 changes: 3 additions & 3 deletions searchform.php
@@ -1,4 +1,4 @@
<form method="get" class="searchform clearfix" action="<?php echo home_url(); ?>/">
<input type="text" value="<?php if ('' == get_search_query()) { _e('Search...', 'arras'); } else { the_search_query(); } ?>" name="s" class="s" onfocus="this.value=''" />
<input type="submit" class="searchsubmit" value="<?php _e('Search', 'arras') ?>" title="<?php printf( __('Search %s', 'arras'), esc_html( get_bloginfo('name'), 1 ) ) ?>" />
</form>
<input type="text" value="<?php echo ( '' == get_search_query() ) ? __( 'Search this site', 'arras' ) : the_search_query() ?>" name="s" class="s" onfocus="if ( this.value == '<?php _e( 'Search this site', 'arras' ) ?>' ) this.value = ''" onblur="if ( this.value == '' ) this.value = '<?php _e( 'Search this site', 'arras' ) ?>'" />
<input type="submit" class="searchsubmit" value="<?php _e( 'Search', 'arras' ) ?>" title="<?php printf( __( 'Search %s', 'arras' ), esc_html( get_bloginfo('name') ) ) ?>" />
</form>

0 comments on commit a6c1f25

Please sign in to comment.