diff --git a/LICENSE.txt b/LICENSE.txt index e585c08..3db6fcc 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016-2021 individual contributors to hamburger-menu +Copyright (c) 2016-2022 individual contributors to hamburger-menu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/dist/hamburger-menu.css b/dist/hamburger-menu.css index 8e464f3..c152d70 100644 --- a/dist/hamburger-menu.css +++ b/dist/hamburger-menu.css @@ -1,4 +1,4 @@ -/*! hamburger-menu v0.3.9 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ +/*! hamburger-menu v0.4.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ /* Structure for HamburgerMenu: diff --git a/dist/hamburger-menu.js b/dist/hamburger-menu.js index 75a406c..38516dd 100644 --- a/dist/hamburger-menu.js +++ b/dist/hamburger-menu.js @@ -1,8 +1,8 @@ -//! hamburger-menu v0.3.9 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License +//! hamburger-menu v0.4.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License const hamburgerMenu = { - version: '0.3.9', + version: '0.4.0', selectItem(event) { const item = $(event.target).closest('li'); diff --git a/dist/hamburger-menu.min.css b/dist/hamburger-menu.min.css index cdf5215..b3ab513 100644 --- a/dist/hamburger-menu.min.css +++ b/dist/hamburger-menu.min.css @@ -1,2 +1,2 @@ -/*! hamburger-menu v0.3.9 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ +/*! hamburger-menu v0.4.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ body{margin:0;padding-bottom:0;padding-top:0}nav.hamburger-menu a.hamburger{background-color:inherit;color:inherit;display:none}nav.hamburger-menu aside{background-color:inherit;bottom:0;float:none;left:0;margin:0;overflow-y:scroll;padding:0;position:fixed;top:0;z-index:5000}nav.hamburger-menu aside ul{list-style:none;margin:0;padding:0}nav.hamburger-menu aside ul li a,nav.hamburger-menu aside ul li span{border-bottom:1px solid transparent;border-top:1px solid transparent;color:inherit;cursor:pointer;display:block;font-size:1.1rem;font-weight:700;padding:10px 0 10px 15px;text-align:left;text-decoration:none;transition:all .4s}nav.hamburger-menu aside ul li.current>a,nav.hamburger-menu aside ul li.current>span{border-color:inherit;cursor:default}nav.hamburger-menu aside ul ul li a,nav.hamburger-menu aside ul ul li span{font-size:.8rem;padding:4px 0 4px 30px}@media (max-width:667px){html body{cursor:pointer;padding:35px 10px 0}nav.hamburger-menu{cursor:auto}nav.hamburger-menu a.hamburger{display:block;font-size:1.4rem;font-weight:700;left:0;padding:6px 10px 8px 8px;position:absolute;text-decoration:none;top:0}nav.hamburger-menu a.hamburger:not(:hover){transition:opacity .5s .8s}nav.hamburger-menu a.hamburger:hover{opacity:0}nav.hamburger-menu aside{max-width:0;overflow:hidden;transition:max-width 1s}nav.hamburger-menu aside ul li{white-space:nowrap}nav.hamburger-menu:not(.collapse-menu):hover .hamburger+aside{max-width:400px;overflow-y:scroll}}body{padding-left:200px;padding-right:50px}nav.hamburger-menu aside{width:150px}nav.hamburger-menu{background-color:teal;color:#dcdcdc}nav.hamburger-menu aside ul li.current{border-color:#fff}nav.hamburger-menu aside ul li.current>a,nav.hamburger-menu aside ul li.current>span,nav.hamburger-menu aside ul li>a:hover,nav.hamburger-menu aside ul li>span:hover{background-color:#008b8b;color:#fff} diff --git a/dist/hamburger-menu.min.js b/dist/hamburger-menu.min.js index 961b2fe..6c794ad 100644 --- a/dist/hamburger-menu.min.js +++ b/dist/hamburger-menu.min.js @@ -1,2 +1,2 @@ -//! hamburger-menu v0.3.9 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License -var hamburgerMenu={version:"0.3.9",selectItem:function selectItem(a){var b=$(a.target).closest("li");b.closest("aside").find("li").removeClass("current"),b.addClass("current");var c=b.closest(".hamburger-menu").addClass("collapse-menu"),d={},e=function(){c.removeClass("collapse-menu"),console.log("restoreAllowExand"),$(window.document).off(d)};d.click=e,d.mousemove=e;window.setTimeout(function(){return $(window.document).on(d)},100)},setup:function setup(){$(window.document).on({click:$.noop});var a=$("nav.hamburger-menu"),b=function(){var b={url:new window.URL(window.location.href),path:window.location.pathname.replace(/\/$/,"")};a.find("li >a").filter(function isCurrent(a,c){var d=new window.URL($(c).attr("href"),b.url);return d.pathname.replace(/\/$/,"")===b.path}).first().closest("li").addClass("current")},c=function(){return a.find(">aside li").on({click:hamburgerMenu.selectItem})};a.find(">aside").hasClass("disable-auto-highlight")||function autoHighlight(){b(),c()}()}};$(hamburgerMenu.setup); +//! hamburger-menu v0.4.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License +var hamburgerMenu={version:"0.4.0",selectItem:function selectItem(a){var b=$(a.target).closest("li");b.closest("aside").find("li").removeClass("current"),b.addClass("current");var c=b.closest(".hamburger-menu").addClass("collapse-menu"),d={},e=function(){c.removeClass("collapse-menu"),console.log("restoreAllowExand"),$(window.document).off(d)};d.click=e,d.mousemove=e;window.setTimeout(function(){return $(window.document).on(d)},100)},setup:function setup(){$(window.document).on({click:$.noop});var a=$("nav.hamburger-menu"),b=function(){var b={url:new window.URL(window.location.href),path:window.location.pathname.replace(/\/$/,"")};a.find("li >a").filter(function isCurrent(a,c){var d=new window.URL($(c).attr("href"),b.url);return d.pathname.replace(/\/$/,"")===b.path}).first().closest("li").addClass("current")},c=function(){return a.find(">aside li").on({click:hamburgerMenu.selectItem})};a.find(">aside").hasClass("disable-auto-highlight")||function autoHighlight(){b(),c()}()}};$(hamburgerMenu.setup); diff --git a/docs/hamburger-menu.css b/docs/hamburger-menu.css index 8e464f3..c152d70 100644 --- a/docs/hamburger-menu.css +++ b/docs/hamburger-menu.css @@ -1,4 +1,4 @@ -/*! hamburger-menu v0.3.9 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ +/*! hamburger-menu v0.4.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ /* Structure for HamburgerMenu: diff --git a/docs/hamburger-menu.js b/docs/hamburger-menu.js index 75a406c..38516dd 100644 --- a/docs/hamburger-menu.js +++ b/docs/hamburger-menu.js @@ -1,8 +1,8 @@ -//! hamburger-menu v0.3.9 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License +//! hamburger-menu v0.4.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License const hamburgerMenu = { - version: '0.3.9', + version: '0.4.0', selectItem(event) { const item = $(event.target).closest('li'); diff --git a/package.json b/package.json index d7f1f3e..41ecdd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hamburger-menu", - "version": "0.3.9", + "version": "0.4.0", "description": "☰ A responsive CSS solution for a hamburger menu ☰", "license": "MIT", "type": "module", @@ -54,8 +54,8 @@ "jquery": "~3.6" }, "devDependencies": { - "@babel/core": "~7.15", - "@babel/preset-env": "~7.15", + "@babel/core": "~7.16", + "@babel/preset-env": "~7.16", "@fortawesome/fontawesome-free": "~5.15", "add-dist-header": "~0.1", "babel-minify": "~0.5", @@ -72,7 +72,7 @@ "gulp-size": "~4.0", "jshint": "~2.13", "npm-run-all2": "~5.0", - "postcss": "~8.3", + "postcss": "~8.4", "rimraf": "~3.0", "w3c-html-validator": "~0.8", "web-ignition": "~1.4"