-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove role main from main elements * Follow _s lead, change widget titles to h2 * Extend h3 class on widget titles by default, but use !optional, since the class is currently blank * Remove the cancel reply link from the leave reply heading * Add hidden h2 to mark the comment section, update child headings accordingly * Compiled styles * Add script to fix main nav submenus * Add base styles for the caret-down icon * Compiled files * Fix contrast on comment meta text * Darken $color-blue ever so slightly for contrast * Compiled styles
- Loading branch information
1 parent
597747b
commit c2b719a
Showing
20 changed files
with
163 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* File: navigation-primary.js | ||
* | ||
* Helpers for the primary navigation. | ||
*/ | ||
window.wdsPrimaryNavigation = {}; | ||
( function( window, $, app ) { | ||
|
||
// Constructor. | ||
app.init = function() { | ||
app.cache(); | ||
|
||
if ( app.meetsRequirements() ) { | ||
app.bindEvents(); | ||
} | ||
}; | ||
|
||
// Cache all the things. | ||
app.cache = function() { | ||
app.$c = { | ||
window: $( window ), | ||
subMenuContainer: $( '.main-navigation .sub-menu' ), | ||
subMenuParentItem: $( '.main-navigation li.menu-item-has-children' ) | ||
}; | ||
}; | ||
|
||
// Combine all events. | ||
app.bindEvents = function() { | ||
app.$c.window.on( 'load', app.addDownArrow ); | ||
app.$c.subMenuParentItem.find( 'a' ).on( 'focusin focusout', app.toggleFocus ); | ||
}; | ||
|
||
// Do we meet the requirements? | ||
app.meetsRequirements = function() { | ||
return app.$c.subMenuContainer.length; | ||
}; | ||
|
||
// Add the down arrow to submenu parents. | ||
app.addDownArrow = function() { | ||
app.$c.subMenuParentItem.find( '> a' ).append( '<span class="caret-down" aria-hidden="true"></span>' ); | ||
}; | ||
|
||
// Toggle the focus class on the link parent. | ||
app.toggleFocus = function() { | ||
$( this ).parents( 'li.menu-item-has-children' ).toggleClass( 'focus' ); | ||
}; | ||
|
||
// Engage! | ||
$( app.init ); | ||
|
||
})( window, jQuery, window.wdsPrimaryNavigation ); |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.