Skip to content

Commit

Permalink
Clarify sticky nav functionality presented in 7.9.1, Fixes #213
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Mar 13, 2024
1 parent 31d1256 commit 1c4335e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 9.4.1rc: 2024-03-13

* Clarify sticky nav functionality presented in 7.9.1, Fixes #213 (thanks @semidivine!)

### 9.4.0: 2024-02-26

* Update unit tests for WordPress Coding Standards 3.0.1
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,7 @@ Air has a sticky navigation baked in.

##### How to enable

You can enable the navigation by

1. Adding sticky-nav.js to your gulpfile (already included with [Devpackages](https://github.com/digitoimistodude/devpackages) and bin/newtheme.sh start script)
2. Uncommeting sticky-nav import in global.scss
3. Restart gulp and save scripts.js once to compile working combined javascript file
You can enable the sticky navigation by uncommenting navSticky() in the js/src/front-end.js file.

#### WooCommerce support

Expand Down
2 changes: 1 addition & 1 deletion js/dev/front-end.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion js/src/front-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import initAnchors from './modules/anchors';
import backToTop from './modules/top';
import initA11ySkipLink from './modules/a11y-skip-link';
import initA11yFocusSearchField from './modules/a11y-focus-search-field';
import { navDesktop, navClick, navMobile } from './modules/navigation';
import {
navSticky, navClick, navDesktop, navMobile,
} from './modules/navigation';

// Define Javascript is active by changing the body class
document.body.classList.remove('no-js');
Expand All @@ -31,6 +33,9 @@ document.addEventListener('DOMContentLoaded', () => {
// navClick();
navMobile();

// Uncomment if you like to use a sticky navigation
// navSticky();

// Fit video embeds to container
reframe('.wp-has-aspect-ratio iframe');
});

0 comments on commit 1c4335e

Please sign in to comment.