Commit Graph

44 Commits

Author SHA1 Message Date
Konstantin Obenland e3516b0ad3 Fix typo. 2015-08-03 12:14:14 -07:00
PJ de9c9888b7 Updated documentation in comments at the top of files.
I tried to standardize and expand the documentation and links to
codex.wordpress.org in the comments at the top of most files.
2015-07-12 12:38:18 -04:00
Christopher Crouch 18f843ed03 _s: Tabbable dropdown menus.
Fixes #540.
2015-04-07 13:09:00 -07:00
oskar_cieslik dfd8a0e921 JSLint error
JSLint error: "regular expressions should be preceded by a left parenthesis assignment colon or comma"
2015-02-23 11:48:50 +01:00
Miguel Fonseca dea243f2eb Sanitize location.hash before passing it to getElementById
There is no actual vulnerability in the existing implementation, as we
can only fetch existing elements (no DOM injection is possible). Plus,
the only call occurring on those elements is `HTMLElement#focus`.

Consider this an extra, more future-proof precaution.
2015-02-17 17:52:36 +00:00
Julien Melissas 67fb1af3f3 Add braces around if statement.
Running jshint on this file returned an error, adding braces fixed it. Please add braces around if statements!!! :)
2014-12-24 00:19:34 -05:00
sixhours 204654ac1f Revert previous (unintentional) commit 2014-12-17 15:09:44 -05:00
sixhours 88f94a9a4e First pass at fixing drop-down menus for touch
This patch allows the user to view a site on a touch screen tablet and
access child menus by clicking on the parent once, or access the parent
by clicking on it twice. Props @iamtakashi for the original fix.
2014-12-17 15:03:17 -05:00
Konstantin Obenland d8d89bc681 _s: Improve menu toggle accessibility.
Makes it a little easier to use the primary navigation with assistive
devices.

See #545.
2014-11-05 17:37:48 -08:00
Philip Arthur Moore 53f62fa23a Merge pull request #459 from philiparthurmoore/menu-a11y
a11y improvements on primary navigation menu toggle
2014-04-27 11:48:11 +07:00
Jeffery To c6ad689d89 Removed addEvent support
As noted in #456, IE8 is no longer supported.

Also, undefined is falsey in JavaScript, so the typeof check was unnecessary.
2014-04-15 17:40:29 +08:00
Philip Arthur Moore 4b883e2aee a11y improvements on primary navigation menu toggle 2014-04-13 04:02:17 -05:00
obenland 7c1067eee3 _s: Remove `image.php` and related code. Image attachments will be
displayed by `single.php`. See
http://codex.wordpress.org/Template_Hierarchy
2013-11-07 15:59:02 -04:00
Vinod Dalvi 430d379f4b Fixed minor WordPress coding standard issues. 2013-09-30 22:32:42 -07:00
Thomas Guillot f87479f70d _s: Fix element for left arrow key code
Previous one was deprecated
2013-08-27 10:29:46 +01:00
Shea Bunge e5a8931afc Add missing semicolon 2013-07-14 16:39:03 +10:00
Shea Bunge 4c99b2aba8 Use === and !== instead of == and != 2013-07-14 16:38:08 +10:00
Michael Fields ac3cda4543 Rework Navigation Menu Part 2
* Separate scoping and assignment so that a decision does not need to be made as to whether we should intermix spaces and tabs on the left
 * Restore the previously removed nav-menu class addition to the first unordered list in `#site-navigation`.
 * Restore the `.navigation-main.toggled-on .nav-menu` selector.
 * Remove rules for the `.main-small-navigation ul` selector.
2013-06-25 01:45:52 -07:00
Michael Fields 4c396f6f9b Rework menu navigation: these changes build off pull request #239 for issue #200
* Only set button and menu if container is not null.
 * Break up the "return early" conditional into multiple parts.
 * Shorten the name of the toggled class from `toggled-on` to `toggled`.
 * Restore the "Hide menu toggle button if menu is empty." documentation.
 * Remove the `nav-menu` class. The previous code would replace any custom custom classes applied via `wp_nav_menu()` or template file.
 * Replace the `nav-menu` selector is style.css with selectors that will target both a custom nav menu and a page menu. These changes could use critical feedback. Do you know of an edge case where they might not work as expected?
2013-06-16 20:29:17 -07:00
obenland f0ed253d5b Merge branch 'custom_header_fix' of https://github.com/iamtakashi/_s
into iamtakashi-custom_header_fix

Conflicts:
	inc/custom-header.php
2013-05-28 09:31:59 -07:00
Philip Arthur Moore c186c5ee0b Remove HTML5Shiv from _s. See #215. 2013-05-11 10:00:08 +09:00
Takashi Irie f367fefd72 Fix unlinked site title in the Customizer 2013-05-08 12:27:48 +01:00
Philip Arthur Moore 1ea2ccd909 Remove hgroup from theme. It's dead now: http://www.sitepoint.com/html5-hgroup-element-dropped/. In its place a div will be use that inherits the old class that was being applied to header. 2013-04-23 15:45:23 +09:00
Takashi Irie 8ceefdcdeb Fixes the broken display header text option in the Customizer. 2013-04-22 16:47:14 +01:00
sixhours 9f3e2cdd80 Remove blank tabs/trailing whitespace 2013-03-07 09:10:13 -05:00
obenland c4f2aa32ce _s: Formatting changes:
- Reduce element comments to either the element id or the first element
class.
- Tabs > Spaces.
- Improve adherence to formatting guidelines.
2013-03-04 16:41:38 -08:00
obenland c7f2b7a1ee _s: Enable live preview for Header Text Color in Customizer. Change also
removes an !important declaration in Custom Header CSS rules.
2013-03-04 16:13:56 -08:00
Michael Fields debefa8b98 Merge pull request #139 from aaronjorbin/master
make "Skip to content" link work in browsers that are doing_it_wrong, but without jQuery. props @aaronjorbin
2013-02-27 15:15:49 -08:00
obenland fa3d86936a _s: Simplify and unify navigation classes throughout Underscores.
For more information about the philosophy behind the new approach,
see http://24ways.org/2012/a-harder-working-class/
2013-02-27 14:47:03 -08:00
sixhours 620b8e5e53 Merge pull request #66 from kovshenin/patch-8
Replace small-menu.js with navigation.js inspired by Twenty Twelve.
2013-02-27 13:28:31 -08:00
Michael Fields 79a6a23da2 Use .text() instead of .html() for site title and tagline when modified via the customizer. Neither setting supports html. 2013-02-07 10:50:34 -08:00
Aaron Jorbin 6ee6126089 On hashchange, make sure we set focus for elements that need it. Essentially the same as 136, but without jquery 2013-01-21 19:01:53 -05:00
obenland 5bfc37093b Follow through with 'customizer' naming convention. 2012-11-30 09:26:37 -08:00
obenland 181c363800 Theme Customizer > Theme Options
* Removes sample theme options
* Adds Theme Customizer enhancement (actually working!)

Goal: Emphasize the use of the Customizer versus out of style Theme
Options.
2012-11-28 14:51:38 -08:00
Konstantin Kovshenin 22e1613bde Replace small-menu.js with navigation.js inspired by Twenty Twelve.
Doesn't use jQuery, slightly easier to understand, uses a media query for max-width, rather than JS events making it faster to respond.
2012-09-03 21:45:28 +04:00
Lance Willett 077653d12e Update html5shiv.js to 3.6 stable version, props ocean90
Fixes #21
2012-07-30 10:07:35 -07:00
Ian Stewart ace4518144 Add .unbind() before .click()
git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@9343 d957f892-c61d-0410-b221-f235e6eecf30
2012-03-29 18:21:54 +00:00
Lance Willett 8298c23e74 _s: rework nav JS file a bit
* Remove top-level browser width variable, only needed in one internal function
 * Add timeout so that the resize action doesn't constantly trigger, instead give it a short delay to anticipate the user finishing the window size change
 * Better comments
 * Incorporate mattwiebe fix for calling jQuery objects incorrectly, see http://core.trac.wordpress.org/ticket/20131 


git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@9026 d957f892-c61d-0410-b221-f235e6eecf30
2012-02-29 18:53:02 +00:00
Ian Stewart 349e3f973e _s: Adding a class to the menu toggle for help in styling open-close states with just CSS
git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8878 d957f892-c61d-0410-b221-f235e6eecf30
2012-02-07 03:20:46 +00:00
Ian Stewart a14038728d _s: cache the masthead selector and use find to grab it's descendants to improve performance while removing the style attribute on the toggled menu to prevent it from seeming to disappear on resizing up when the menu is toggled off
git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8875 d957f892-c61d-0410-b221-f235e6eecf30
2012-02-06 21:44:43 +00:00
Ian Stewart 4f3d984c7c _s: Simple script for changing the classes of the main menu based on browser width let's you easily restyle a menu for small screens without changing the markup
git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8868 d957f892-c61d-0410-b221-f235e6eecf30
2012-02-06 16:40:54 +00:00
Ian Stewart e8b2bb81c6 _s: A better name for the image navigation script and better experience by cycling through a gallery when done
git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8849 d957f892-c61d-0410-b221-f235e6eecf30
2012-02-03 14:02:28 +00:00
Ian Stewart 293458cbd7 _s: First pass at keyboard navigation in image templates
git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8845 d957f892-c61d-0410-b221-f235e6eecf30
2012-02-02 20:49:40 +00:00
Ian Stewart edfeccc255 _s: initial fork of Toolbox 2012-01-07 03:25:13 +00:00