Ticket #23868: 23868-3.patch
File 23868-3.patch, 5.7 KB (added by , 11 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 .one-column #branding .searchform { 283 284 right: 40px; 284 285 top: 4em; 285 286 } … … 468 469 input[type=number] { 469 470 padding: 3px; 470 471 } 471 input#s { 472 input#s, 473 .searchform input.field { 472 474 background: url(images/search.png) no-repeat 5px 6px; 473 475 -moz-border-radius: 2px; 474 476 border-radius: 2px; … … 477 479 line-height: 1.2em; 478 480 padding: 4px 10px 4px 28px; 479 481 } 480 input#searchsubmit { 482 input#searchsubmit, 483 .searchform input.submit { 481 484 display: none; 482 485 } 483 486 … … 636 639 } 637 640 638 641 /* Search Form */ 639 #branding #searchform { 642 #branding #searchform, 643 #branding .searchform { 640 644 position: absolute; 641 645 top: 3.8em; 642 646 right: 7.6%; 643 647 text-align: right; 644 648 } 645 #branding #searchform div { 649 #branding #searchform div, 650 #branding .searchform div { 646 651 margin: 0; 647 652 } 648 #branding #s { 653 #branding #s, 654 #branding .searchform .field { 649 655 float: right; 650 656 -webkit-transition-duration: 400ms; 651 657 -webkit-transition-property: width, background; … … 658 664 -o-transition-timing-function: ease; 659 665 width: 72px; 660 666 } 661 #branding #s:focus { 667 #branding #s:focus, 668 #branding .searchform .field:focus { 662 669 background-color: #f9f9f9; 663 670 width: 196px; 664 671 } 665 #branding #searchsubmit { 672 #branding #searchsubmit, 673 #branding .searchform .submit { 666 674 display: none; 667 675 } 668 #branding .only-search #searchform { 676 #branding .only-search #searchform, 677 #branding .only-search .searchform { 669 678 top: 5px; 670 679 z-index: 1; 671 680 } 672 #branding .only-search #s { 681 #branding .only-search #s, 682 #branding .only-search .searchform .field { 673 683 background-color: #666; 674 684 border-color: #000; 675 685 color: #222; 676 686 } 677 687 #branding .only-search #s, 678 #branding .only-search #s:focus { 688 #branding .only-search #s:focus, 689 #branding .only-search .searchform .field, 690 #branding .only-search .searchform .field:focus { 679 691 width: 85%; 680 692 } 681 #branding .only-search #s:focus { 693 #branding .only-search #s:focus, 694 #branding .only-search .searchform .field:focus { 682 695 background-color: #bbb; 683 696 } 684 #branding .with-image #searchform { 697 #branding .with-image #searchform, 698 #branding .with-image .searchform { 685 699 top: auto; 686 700 bottom: -27px; 687 701 max-width: 195px; … … 803 817 border-top: 1px solid #ddd; 804 818 padding: 6px 10px 6px 0; 805 819 } 806 .entry-content #s { 820 .entry-content #s, 821 .entry-content .searchform .field { 807 822 width: 75%; 808 823 } 809 824 .comment-content ul, … … 1322 1337 /* =error404 1323 1338 ----------------------------------------------- */ 1324 1339 1325 .error404 #main #searchform { 1340 .error404 #main #searchform, 1341 .error404 #main .searchform { 1326 1342 background: #f9f9f9; 1327 1343 border: 1px solid #ddd; 1328 1344 border-width: 1px 0; … … 1330 1346 overflow: hidden; 1331 1347 padding: 1.625em 8.9%; 1332 1348 } 1333 .error404 #main #s { 1349 .error404 #main #s, 1350 .error404 #main .searchform .field { 1334 1351 width: 95%; 1335 1352 } 1336 1353 .error404 #main .widget { … … 1809 1826 .widget_search form { 1810 1827 margin: 0 0 1.625em; 1811 1828 } 1812 .widget_search #s { 1829 .widget_search #s, 1830 .widget_search .searchform .field { 1813 1831 width: 77%; 1814 1832 } 1815 .widget_search #searchsubmit { 1833 .widget_search #searchsubmit, 1834 .widget_search .searchform .submit { 1816 1835 background: #ddd; 1817 1836 border: 1px solid #ccc; 1818 1837 -webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09); … … 1824 1843 position: relative; 1825 1844 top: -2px; 1826 1845 } 1827 .widget_search #searchsubmit:active { 1846 .widget_search #searchsubmit:active, 1847 .widget_search .searchform .submit:active { 1828 1848 background: #1982d1; 1829 1849 border-color: #0861a5; 1830 1850 -webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1); … … 2440 2460 margin-right: 0; 2441 2461 } 2442 2462 /* Make sure the logo and search form don't collide */ 2443 #branding #searchform { 2463 #branding #searchform, 2464 #branding .searchform { 2444 2465 top: 1.625em !important; 2445 2466 } 2446 2467 /* Floated content doesn't work well at this size */ … … 2555 2576 #site-description { 2556 2577 font-size: 10pt; 2557 2578 } 2558 #branding #searchform { 2579 #branding #searchform, 2580 #branding .searchform { 2559 2581 display: none; 2560 2582 } 2561 2583 #branding img {