FIx menu toggle

ref: #2957
This commit is contained in:
Michael Rose 2021-05-14 19:24:11 -04:00
parent 635b1790f3
commit ee67ad9743
4 changed files with 8 additions and 5 deletions

View file

@ -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)

File diff suppressed because one or more lines are too long

View file

@ -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;
@ -99,6 +99,7 @@ $(function() {
$btn.on('click', function() {
$hlinks.toggleClass('hidden');
$(this).toggleClass('close');
clearTimeout(timer);
});
@ -122,5 +123,5 @@ $(function() {
} else check();
// if page does not have a logo just check
} else check();
});

View file

@ -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
---
@ -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)