Changeset 21611
- Timestamp:
- 08/24/2012 09:07:19 PM (12 years ago)
- Location:
- trunk/wp-content/themes/twentytwelve
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/functions.php
r21558 r21611 105 105 * styles for small screen sizes. 106 106 */ 107 wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20120820', true );107 wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120824', true ); 108 108 109 109 /** -
trunk/wp-content/themes/twentytwelve/header.php
r21573 r21611 36 36 </hgroup> 37 37 38 <nav class="site-navigationmain-navigation" role="navigation">38 <nav id="site-navigation" class="main-navigation" role="navigation"> 39 39 <h3 class="menu-toggle"><?php _e( 'Show menu', 'twentytwelve' ); ?></h3> 40 40 <div class="skip-link assistive-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a></div> 41 <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>41 <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?> 42 42 </nav> 43 43 -
trunk/wp-content/themes/twentytwelve/js/navigation.js
r21557 r21611 4 4 * Handles toggling the navigation menu for small screens. 5 5 */ 6 ( function() { 7 var button = document.getElementById( 'site-navigation' ).getElementsByTagName( 'h3' )[0], 8 menu = document.getElementById( 'site-navigation' ).getElementsByTagName( 'ul' )[0]; 6 9 7 jQuery( document ).ready( function( $ ) { 8 if ( ! $( '#masthead .menu' ).children().length ) { 9 $( '#masthead .menu-toggle' ).hide(); 10 } 10 if ( undefined == button || undefined == menu ) 11 return false; 11 12 12 $( '.menu-toggle' ).off( 'click' ).click( function() { 13 $( '#masthead .menu' ).stop().slideToggle(); 14 $( this ).toggleClass( 'toggled-on' ); 15 } ); 16 } ); 13 button.onclick = function() { 14 if ( -1 == menu.className.indexOf( 'nav-menu' ) ) 15 menu.className = 'nav-menu'; 16 17 if ( -1 != button.className.indexOf( 'toggled-on' ) ) { 18 button.className = button.className.replace( ' toggled-on', '' ); 19 menu.className = menu.className.replace( ' toggled-on', '' ); 20 } else { 21 button.className += ' toggled-on'; 22 menu.className += ' toggled-on'; 23 } 24 }; 25 26 // Hide menu toggle button if menu is empty. 27 if ( ! menu.childNodes.length ) 28 button.style.display = 'none'; 29 } )(); -
trunk/wp-content/themes/twentytwelve/rtl.css
r21565 r21611 55 55 } 56 56 57 58 /* =Basic structure59 -------------------------------------------------------------- */60 61 .main-navigation li ul ul {62 margin-left: 0;63 margin-right: 40px;64 margin-right: 2.857142857rem;65 }66 57 67 58 /* =Main Content … … 221 212 margin: 0 1.714285714rem 0; 222 213 } 214 .main-navigation ul.nav-menu, 215 .main-navigation div.nav-menu > ul { 216 text-align: right; 217 } 223 218 .main-navigation li { 224 219 margin-left: 40px; -
trunk/wp-content/themes/twentytwelve/style.css
r21566 r21611 1 1 /* 2 Theme Name: Twenty Twelve2 13Theme Name: Twenty Twelve 3 3 Theme URI: http://wordpress.org/extend/themes/twentytwelve 4 4 Author: the WordPress team … … 514 514 text-align: center; 515 515 } 516 .main-navigation li ul ul {517 margin-left: 40px;518 margin-left: 2.857142857rem;519 }520 516 .main-navigation li { 521 517 margin-top: 24px; … … 532 528 color: #21759b; 533 529 } 534 .main-navigation .menu { 530 .main-navigation ul.nav-menu, 531 .main-navigation div.nav-menu > ul { 535 532 display: none; 536 533 } 534 .main-navigation ul.nav-menu.toggled-on, 537 535 .menu-toggle { 538 536 display: inline-block; … … 1341 1339 line-height: 1.846153846; 1342 1340 } 1343 .main-navigation .menu { 1341 .main-navigation ul.nav-menu, 1342 .main-navigation div.nav-menu > ul { 1344 1343 border-bottom: 1px solid #ededed; 1345 1344 border-top: 1px solid #ededed; … … 1354 1353 text-indent: 0; 1355 1354 } 1356 .main-navigation li ul li {1357 padding-left: 0;1358 }1359 1355 .main-navigation li a, 1360 1356 .main-navigation li { … … 1363 1359 } 1364 1360 .main-navigation li a { 1361 border-bottom: 0; 1365 1362 color: #6a6a6a; 1363 line-height: 3.692307692; 1366 1364 text-transform: uppercase; 1367 1365 } … … 1373 1371 margin: 0 2.857142857rem 0 0; 1374 1372 position: relative; 1375 }1376 .main-navigation li a {1377 border-bottom: 0;1378 line-height: 3.692307692;1379 1373 } 1380 1374 .main-navigation li ul { … … 1387 1381 } 1388 1382 .main-navigation li ul ul { 1389 margin-left: 0;1390 1383 top: 0; 1391 1384 left: 100%; … … 1549 1542 .widget-area, 1550 1543 img.header-image, 1551 nav.site-navigation {1544 .main-navigation { 1552 1545 display: none; 1553 1546 }
Note: See TracChangeset
for help on using the changeset viewer.