Twenty Thirteen: remove fixed navbar. Closes #24184.

git-svn-id: http://core.svn.wordpress.org/trunk@24169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-05-03 18:22:57 +00:00
parent 1a6e126017
commit c9b9c41dbb
3 changed files with 3 additions and 95 deletions

View File

@ -8,21 +8,15 @@
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
*/
/*
* Add class to allow styling for toolbar.
*/
$html_class = ( is_admin_bar_showing() ) ? 'wp-toolbar' : '';
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7 <?php echo $html_class; ?>" <?php language_attributes(); ?>>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8 <?php echo $html_class; ?>" <?php language_attributes(); ?>>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html class="<?php echo $html_class; ?>" <?php language_attributes(); ?>>
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />

View File

@ -7,13 +7,8 @@
( function( $ ) {
var html = $( 'html' ),
body = $( 'body' ),
navbar = $( '#navbar' ),
_window = $( window ),
toolbarOffset = body.is( '.admin-bar' ) ? 28 : 0,
navbarOffset = navbar.offset().top - toolbarOffset,
scrollOffsetMethod = ( typeof window.scrollY === 'undefined' ),
adjustFooter,
adjustAnchor;
/**
* Adds a top margin to the footer if the sidebar widget area is
@ -29,45 +24,10 @@
$( '#colophon' ).css( 'margin-top', margin + 'px' );
};
/**
* Repositions the window on jump-to-anchor to account for navbar
* height.
*/
adjustAnchor = function() {
if ( window.location.hash )
window.scrollBy( 0, -49 );
};
$( function() {
adjustAnchor();
if ( body.is( '.sidebar' ) )
adjustFooter();
} );
_window.on( 'hashchange.twentythirteen', adjustAnchor );
/**
* Displays the fixed navbar based on screen position.
*/
if ( _window.innerWidth() > 644 ) {
_window.on( 'scroll.twentythirteen', function() {
var scrollOffset = scrollOffsetMethod ? document.documentElement.scrollTop : window.scrollY;
if ( scrollOffset > navbarOffset )
html.addClass( 'navbar-fixed' );
else
html.removeClass( 'navbar-fixed' );
} );
}
/**
* Allows clicking the navbar to scroll to top.
*/
navbar.on( 'click.twentythirteen', function( event ) {
// Ensure that the navbar element was the target of the click.
if ( 'navbar' == event.target.id || 'site-navigation' == event.target.id )
$( 'html, body' ).animate( { scrollTop: 0 }, 'fast' );
} );
/**
* Enables menu toggle for small screens.

View File

@ -966,51 +966,6 @@ ul.nav-menu li:hover > ul,
width: 230px;
}
/* Fixed Navbar */
.navbar-fixed {
margin-top: 45px;
}
.wp-toolbar.navbar-fixed {
margin-top: 73px !important;
}
.navbar-fixed .site-title {
font-size: 22px;
font-weight: bold;
line-height: 2;
max-width: 400px;
overflow: hidden;
padding: 0;
position: fixed;
text-overflow: ellipsis;
top: 0;
white-space: nowrap;
z-index: 3;
}
.navbar-fixed .site-title {
color: #141412;
}
.navbar-fixed .navbar {
box-shadow: 0 2px 2px rgba(173, 165, 105, 0.2);
height: 45px;
position: fixed;
top: 0;
z-index: 2;
}
.wp-toolbar.navbar-fixed .site-title,
.wp-toolbar.navbar-fixed .navbar {
top: 28px;
}
.navbar-fixed .menu-toggle,
.navbar-fixed .nav-menu {
display: none;
}
/**
* 5.0 Content
@ -3253,7 +3208,6 @@ footer.entry-meta {
.widget-area,
.main-navigation,
.navbar,
.navbar-fixed .site-title,
.more-link {
display: none;
}