Ticket #25144: 25144.diff
| File 25144.diff, 1.9 KB (added by , 12 years ago) |
|---|
-
wp-content/themes/twentyfourteen/js/theme.js
103 103 104 104 } ).resize(); 105 105 106 // Sticky header.107 var $mastheadOffset = -1,108 $toolbarOffset = $( 'body' ).is( '.admin-bar' ) ? 32 : 0,109 $maindiv = $( '#main' );110 111 $( window ).on( 'scroll', false, function() {112 if ( $mastheadOffset < 0 )113 $mastheadOffset = $masthead.offset().top - $toolbarOffset;114 115 if ( ( window.scrollY > $mastheadOffset ) && ( $( window ).width() > 769 ) ) {116 $masthead.addClass( 'masthead-fixed' );117 $maindiv.css( {118 marginTop: $masthead.height()119 } );120 } else {121 $masthead.removeClass( 'masthead-fixed' );122 $maindiv.css( {123 marginTop: 0124 } );125 }126 } );127 128 106 // Arranges footer widgets vertically. 129 107 if ( $.isFunction( $.fn.masonry ) ) { 130 108 -
wp-content/themes/twentyfourteen/style.css
582 582 width: 100%; 583 583 z-index: 3; 584 584 } 585 586 /* Fixed Header */587 .site-header.masthead-fixed {588 box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);589 position: fixed;590 top: 0;591 }592 .admin-bar .site-header.masthead-fixed {593 top: 28px;594 }595 .admin-bar.mp6 .site-header.masthead-fixed {596 top: 32px;597 }598 585 #site-header { 599 586 position: relative; 600 587 z-index: 3; … … 2662 2649 } 2663 2650 2664 2651 @media screen and (min-width: 770px) { 2652 /* Fixed Header */ 2653 .site-header { 2654 box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2); 2655 position: fixed; 2656 top: 0; 2657 } 2658 .admin-bar .site-header { 2659 top: 28px; 2660 } 2661 .admin-bar.mp6 .site-header { 2662 top: 32px; 2663 } 2664 .site-main { 2665 margin-top: 48px; 2666 } 2667 2665 2668 .header-main { 2666 2669 margin-right: 0; 2667 2670 }