Ticket #23868: 23868-4.patch
| File 23868-4.patch, 5.2 KB (added by , 14 years ago) |
|---|
-
wp-content/themes/twentyeleven/searchform.php
6 6 * @subpackage Twenty_Eleven 7 7 * @since Twenty Eleven 1.0 8 8 */ 9 10 // Compat for WP < 3.6 11 if ( ! isset( $search_form_counter ) ) { 12 static $search_form_counter = -1; 13 $search_form_counter++; 14 $form_id = $search_form_counter ? '' : ' id="searchform"'; 15 $submit_id = $search_form_counter ? '' : ' id="searchsubmit"'; 16 $text_id = $search_form_counter ? 's-' . $search_form_counter : 's'; 17 } 9 18 ?> 10 <form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">11 <label for=" s" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label>12 <input type="text" class="field" name="s" id=" s" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />13 <input type="submit" class="submit" name="submit" id="searchsubmit"value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" />19 <form method="get"<?php echo $form_id; ?> class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> 20 <label for="<?php echo $text_id; ?>" class="assistive-text"><?php _e( 'Search', 'twentyeleven' ); ?></label> 21 <input type="text" class="field" name="s" id="<?php echo $text_id; ?>" placeholder="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> 22 <input type="submit" class="submit" name="submit"<?php echo $submit_id; ?> value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> 14 23 </form> -
wp-content/themes/twentyeleven/style.css
279 279 width: auto; 280 280 } 281 281 /* Make sure the logo and search form don't collide */ 282 .one-column #branding #searchform {282 .one-column #branding .searchform { 283 283 right: 40px; 284 284 top: 4em; 285 285 } … … 468 468 input[type=number] { 469 469 padding: 3px; 470 470 } 471 input#s{471 .searchform input.field { 472 472 background: url(images/search.png) no-repeat 5px 6px; 473 473 -moz-border-radius: 2px; 474 474 border-radius: 2px; … … 477 477 line-height: 1.2em; 478 478 padding: 4px 10px 4px 28px; 479 479 } 480 input#searchsubmit {480 .searchform input.submit { 481 481 display: none; 482 482 } 483 483 … … 636 636 } 637 637 638 638 /* Search Form */ 639 #branding #searchform {639 #branding .searchform { 640 640 position: absolute; 641 641 top: 3.8em; 642 642 right: 7.6%; 643 643 text-align: right; 644 644 } 645 #branding #searchform div {645 #branding .searchform div { 646 646 margin: 0; 647 647 } 648 #branding #s{648 #branding .searchform .field { 649 649 float: right; 650 650 -webkit-transition-duration: 400ms; 651 651 -webkit-transition-property: width, background; … … 658 658 -o-transition-timing-function: ease; 659 659 width: 72px; 660 660 } 661 #branding #s:focus {661 #branding .searchform .field:focus { 662 662 background-color: #f9f9f9; 663 663 width: 196px; 664 664 } 665 #branding #searchsubmit {665 #branding .searchform .submit { 666 666 display: none; 667 667 } 668 #branding .only-search #searchform {668 #branding .only-search .searchform { 669 669 top: 5px; 670 670 z-index: 1; 671 671 } 672 #branding .only-search #s{672 #branding .only-search .searchform .field { 673 673 background-color: #666; 674 674 border-color: #000; 675 675 color: #222; 676 676 } 677 #branding .only-search #s,678 #branding .only-search #s:focus {677 #branding .only-search .searchform .field, 678 #branding .only-search .searchform .field:focus { 679 679 width: 85%; 680 680 } 681 #branding .only-search #s:focus {681 #branding .only-search .searchform .field:focus { 682 682 background-color: #bbb; 683 683 } 684 #branding .with-image #searchform {684 #branding .with-image .searchform { 685 685 top: auto; 686 686 bottom: -27px; 687 687 max-width: 195px; … … 803 803 border-top: 1px solid #ddd; 804 804 padding: 6px 10px 6px 0; 805 805 } 806 .entry-content #s{806 .entry-content .searchform .field { 807 807 width: 75%; 808 808 } 809 809 .comment-content ul, … … 1322 1322 /* =error404 1323 1323 ----------------------------------------------- */ 1324 1324 1325 .error404 #main #searchform {1325 .error404 #main .searchform { 1326 1326 background: #f9f9f9; 1327 1327 border: 1px solid #ddd; 1328 1328 border-width: 1px 0; … … 1330 1330 overflow: hidden; 1331 1331 padding: 1.625em 8.9%; 1332 1332 } 1333 .error404 #main #s{1333 .error404 #main .searchform .field { 1334 1334 width: 95%; 1335 1335 } 1336 1336 .error404 #main .widget { … … 1809 1809 .widget_search form { 1810 1810 margin: 0 0 1.625em; 1811 1811 } 1812 .widget_search #s{1812 .widget_search .searchform .field { 1813 1813 width: 77%; 1814 1814 } 1815 .widget_search #searchsubmit {1815 .widget_search .searchform .submit { 1816 1816 background: #ddd; 1817 1817 border: 1px solid #ccc; 1818 1818 -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09); … … 1824 1824 position: relative; 1825 1825 top: -2px; 1826 1826 } 1827 .widget_search #searchsubmit:active {1827 .widget_search .searchform .submit:active { 1828 1828 background: #1982d1; 1829 1829 border-color: #0861a5; 1830 1830 -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1); … … 2440 2440 margin-right: 0; 2441 2441 } 2442 2442 /* Make sure the logo and search form don't collide */ 2443 #branding #searchform {2443 #branding .searchform { 2444 2444 top: 1.625em !important; 2445 2445 } 2446 2446 /* Floated content doesn't work well at this size */ … … 2555 2555 #site-description { 2556 2556 font-size: 10pt; 2557 2557 } 2558 #branding #searchform {2558 #branding .searchform { 2559 2559 display: none; 2560 2560 } 2561 2561 #branding img {
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)