Skip to content

Commit

Permalink
FIx menu toggle
Browse files Browse the repository at this point in the history
ref: #2957
  • Loading branch information
mmistakes committed May 14, 2021
1 parent 635b179 commit ee67ad9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### Bug Fixes

- Fix menu toggle to properly show close icon when open.
- Fix Jekyll environment note in configuration documentation. [#2912](https://github.com/mmistakes/minimal-mistakes/issues/2912)
- Fix typo in Helpers documentation. [#2940](https://github.com/mmistakes/minimal-mistakes/pull/2940)
- Remove all references to official public Staticman API instance. [#2818](https://github.com/mmistakes/minimal-mistakes/issues/2818) [#2831](https://github.com/mmistakes/minimal-mistakes/pull/2831)
Expand Down
2 changes: 1 addition & 1 deletion assets/js/main.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions assets/js/plugins/jquery.greedy-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ $(function() {
var $logoImg = $('nav.greedy-nav .site-logo img');
var $title = $("nav.greedy-nav .site-title");
var $search = $('nav.greedy-nav button.search__toggle');

var numOfItems, totalSpace, closingTime, breakWidths;

// This function measures both hidden and visible links and sets the navbar breakpoints
// This is called the first time the script runs and everytime the "check()" function detects a change of window width that reached a different CSS width breakpoint, which affects the size of navbar Items
// This is called the first time the script runs and everytime the "check()" function detects a change of window width that reached a different CSS width breakpoint, which affects the size of navbar Items
// Please note that "CSS width breakpoints" (which are only 4) !== "navbar breakpoints" (which are as many as the number of items on the navbar)
function measureLinks(){
numOfItems = 0;
Expand Down Expand Up @@ -99,6 +99,7 @@ $(function() {

$btn.on('click', function() {
$hlinks.toggleClass('hidden');
$(this).toggleClass('close');
clearTimeout(timer);
});

Expand All @@ -122,5 +123,5 @@ $(function() {
} else check();
// if page does not have a logo just check
} else check();

});
3 changes: 2 additions & 1 deletion docs/_docs/18-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permalink: /docs/history/
excerpt: "Change log of enhancements and bug fixes made to the theme."
sidebar:
nav: docs
last_modified_at: 2021-05-11T10:41:54-04:00
last_modified_at: 2021-05-14T19:24:07-04:00
toc: false
---

Expand All @@ -23,6 +23,7 @@ toc: false

### Bug Fixes

- Fix menu toggle to properly show close icon when open.
- Fix Jekyll environment note in configuration documentation. [#2912](https://github.com/mmistakes/minimal-mistakes/issues/2912)
- Fix typo in Helpers documentation. [#2940](https://github.com/mmistakes/minimal-mistakes/pull/2940)
- Remove all references to official public Staticman API instance. [#2818](https://github.com/mmistakes/minimal-mistakes/issues/2818) [#2831](https://github.com/mmistakes/minimal-mistakes/pull/2831)
Expand Down

0 comments on commit ee67ad9

Please sign in to comment.