From 1b77c69e8160d6cde67b2a602ed6166a227431e3 Mon Sep 17 00:00:00 2001 From: dpilafian Date: Tue, 2 Jan 2024 16:12:33 -0800 Subject: [PATCH] Release v0.6.1 --- LICENSE.txt | 2 +- dist/hamburger-menu.css | 2 +- dist/hamburger-menu.js | 4 ++-- dist/hamburger-menu.min.css | 2 +- dist/hamburger-menu.min.js | 4 ++-- docs/hamburger-menu.css | 2 +- docs/hamburger-menu.js | 4 ++-- docs/index.html | 10 +++++----- docs/multipage/about.html | 2 +- docs/multipage/index.html | 2 +- docs/multipage/products/index.html | 2 +- docs/multipage/products/x3000.html | 2 +- docs/multipage/products/x3200.html | 2 +- docs/multipage/support.html | 2 +- docs/single-page-app/index.html | 2 +- package.json | 22 ++++++++++++---------- task-runner.sh.command | 2 +- 17 files changed, 35 insertions(+), 33 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 3e8436b..4f27b80 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016-2023 Individual contributors to hamburger-menu +Copyright (c) 2016-2024 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 121175a..5cff5f7 100644 --- a/dist/hamburger-menu.css +++ b/dist/hamburger-menu.css @@ -1,4 +1,4 @@ -/*! hamburger-menu v0.6.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ +/*! hamburger-menu v0.6.1 ☰ 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 b54af9a..b52bb95 100644 --- a/dist/hamburger-menu.js +++ b/dist/hamburger-menu.js @@ -1,4 +1,4 @@ -//! hamburger-menu v0.6.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License +//! hamburger-menu v0.6.1 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License const hamburgerMenu = { // - version: '0.6.0', + version: '0.6.1', selectItem(elem) { const menuItem = elem.closest('li'); diff --git a/dist/hamburger-menu.min.css b/dist/hamburger-menu.min.css index a9c16a4..b916801 100644 --- a/dist/hamburger-menu.min.css +++ b/dist/hamburger-menu.min.css @@ -1,2 +1,2 @@ -/*! hamburger-menu v0.6.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ +/*! hamburger-menu v0.6.1 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ body{margin:0;padding:0 50px 0 200px}nav.hamburger-menu a.hamburger{display:none;color:inherit;background-color:inherit}nav.hamburger-menu aside{position:fixed;top:0;bottom:0;left:0;float:none;background-color:inherit;padding:0;margin:0;overflow-y:scroll;z-index:5000}nav.hamburger-menu aside ul{list-style:none;padding:0;margin:0}nav.hamburger-menu aside ul li a,nav.hamburger-menu aside ul li span{display:block;font-size:1.1rem;font-weight:700;text-align:left;text-decoration:none;color:inherit;border-top:1px solid transparent;border-bottom:1px solid transparent;padding:10px 0 10px 15px;transition:all 400ms;cursor:pointer}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{padding:35px 10px 0;cursor:pointer}nav.hamburger-menu{cursor:auto}nav.hamburger-menu a.hamburger{display:block;position:absolute;top:0;left:0;font-size:1.4rem;font-weight:700;text-decoration:none;padding:6px 10px 8px 8px}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}}nav.hamburger-menu aside{width:150px}nav.hamburger-menu{color:#dcdcdc;background-color:teal}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{color:#fff;background-color:#008b8b} diff --git a/dist/hamburger-menu.min.js b/dist/hamburger-menu.min.js index d743a8f..18ea9d9 100644 --- a/dist/hamburger-menu.min.js +++ b/dist/hamburger-menu.min.js @@ -1,2 +1,2 @@ -//! hamburger-menu v0.6.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License -const hamburgerMenu={version:"0.6.0",selectItem(elem){const menuItem=elem.closest("li");const navMenu=menuItem.closest(".hamburger-menu");const reset=elem=>elem.classList.remove("current");menuItem.closest("aside").querySelectorAll("li").forEach(reset);menuItem.classList.add("current");navMenu.classList.add("collapse-menu");navMenu.dataset.menuCollapsed=String(Date.now());const restoreAllowExand=()=>{navMenu.classList.remove("collapse-menu");globalThis.document.removeEventListener("click",restoreAllowExand);globalThis.document.removeEventListener("mousemove",restoreAllowExand)};const listen=()=>{globalThis.document.addEventListener("click",restoreAllowExand);globalThis.document.addEventListener("mousemove",restoreAllowExand)};const afterCurrentClick=100;globalThis.setTimeout(listen,afterCurrentClick)},setup(){globalThis.document.addEventListener("click",()=>{});const navMenu=globalThis.document.querySelector(".hamburger-menu");const aside=navMenu?.querySelector("aside");const autoHighlightMultiPage=()=>{const currentUrl=new globalThis.URL(globalThis.location.href);const currentPath=globalThis.location.pathname.replace(/\/$/,"");const setCurrent=elem=>{const linkUrl=new globalThis.URL(elem.href,currentUrl);const isCurrent=linkUrl.pathname.replace(/\/$/,"")===currentPath;elem.parentElement.classList.add(isCurrent?"current":"other-page")};navMenu.querySelectorAll("li >a").forEach(setCurrent)};const delegateSelectItem=event=>{const elem=event.target.closest(".hamburger-menu li");if(elem)hamburgerMenu.selectItem(elem)};const autoHighlightSinglePageApp=()=>globalThis.document.addEventListener("click",delegateSelectItem);const autoHighlight=()=>{autoHighlightMultiPage();autoHighlightSinglePageApp()};if(aside&&!aside.classList.contains("disable-auto-highlight"))autoHighlight()},dom:{onReady(callback){if(globalThis.document.readyState==="complete")callback();else globalThis.window.addEventListener("DOMContentLoaded",callback)}}};hamburgerMenu.dom.onReady(hamburgerMenu.setup); +//! hamburger-menu v0.6.1 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License +const hamburgerMenu={version:"0.6.1",selectItem(elem){const menuItem=elem.closest("li");const navMenu=menuItem.closest(".hamburger-menu");const reset=elem=>elem.classList.remove("current");menuItem.closest("aside").querySelectorAll("li").forEach(reset);menuItem.classList.add("current");navMenu.classList.add("collapse-menu");navMenu.dataset.menuCollapsed=String(Date.now());const restoreAllowExand=()=>{navMenu.classList.remove("collapse-menu");globalThis.document.removeEventListener("click",restoreAllowExand);globalThis.document.removeEventListener("mousemove",restoreAllowExand)};const listen=()=>{globalThis.document.addEventListener("click",restoreAllowExand);globalThis.document.addEventListener("mousemove",restoreAllowExand)};const afterCurrentClick=100;globalThis.setTimeout(listen,afterCurrentClick)},setup(){globalThis.document.addEventListener("click",()=>{});const navMenu=globalThis.document.querySelector(".hamburger-menu");const aside=navMenu?.querySelector("aside");const autoHighlightMultiPage=()=>{const currentUrl=new globalThis.URL(globalThis.location.href);const currentPath=globalThis.location.pathname.replace(/\/$/,"");const setCurrent=elem=>{const linkUrl=new globalThis.URL(elem.href,currentUrl);const isCurrent=linkUrl.pathname.replace(/\/$/,"")===currentPath;elem.parentElement.classList.add(isCurrent?"current":"other-page")};navMenu.querySelectorAll("li >a").forEach(setCurrent)};const delegateSelectItem=event=>{const elem=event.target.closest(".hamburger-menu li");if(elem)hamburgerMenu.selectItem(elem)};const autoHighlightSinglePageApp=()=>globalThis.document.addEventListener("click",delegateSelectItem);const autoHighlight=()=>{autoHighlightMultiPage();autoHighlightSinglePageApp()};if(aside&&!aside.classList.contains("disable-auto-highlight"))autoHighlight()},dom:{onReady(callback){if(globalThis.document.readyState==="complete")callback();else globalThis.window.addEventListener("DOMContentLoaded",callback)}}};hamburgerMenu.dom.onReady(hamburgerMenu.setup); diff --git a/docs/hamburger-menu.css b/docs/hamburger-menu.css index 121175a..5cff5f7 100644 --- a/docs/hamburger-menu.css +++ b/docs/hamburger-menu.css @@ -1,4 +1,4 @@ -/*! hamburger-menu v0.6.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License */ +/*! hamburger-menu v0.6.1 ☰ 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 b54af9a..b52bb95 100644 --- a/docs/hamburger-menu.js +++ b/docs/hamburger-menu.js @@ -1,4 +1,4 @@ -//! hamburger-menu v0.6.0 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License +//! hamburger-menu v0.6.1 ☰ https://github.com/center-key/hamburger-menu ☰ MIT License const hamburgerMenu = { // - version: '0.6.0', + version: '0.6.1', selectItem(elem) { const menuItem = elem.closest('li'); diff --git a/docs/index.html b/docs/index.html index 7cbc118..3f8d3cc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -9,9 +9,9 @@ - - - + + + - - + + diff --git a/docs/multipage/index.html b/docs/multipage/index.html index fce80e2..d4593dc 100644 --- a/docs/multipage/index.html +++ b/docs/multipage/index.html @@ -12,7 +12,7 @@ HamburgerMenu ☰ Multipage - + diff --git a/docs/multipage/products/index.html b/docs/multipage/products/index.html index dcb19a4..12f9469 100644 --- a/docs/multipage/products/index.html +++ b/docs/multipage/products/index.html @@ -12,7 +12,7 @@ HamburgerMenu ☰ Multipage - + diff --git a/docs/multipage/products/x3000.html b/docs/multipage/products/x3000.html index 63653cc..4b73281 100644 --- a/docs/multipage/products/x3000.html +++ b/docs/multipage/products/x3000.html @@ -12,7 +12,7 @@ HamburgerMenu ☰ Multipage - + diff --git a/docs/multipage/products/x3200.html b/docs/multipage/products/x3200.html index ede6a41..a89f33c 100644 --- a/docs/multipage/products/x3200.html +++ b/docs/multipage/products/x3200.html @@ -12,7 +12,7 @@ HamburgerMenu ☰ Multipage - + diff --git a/docs/multipage/support.html b/docs/multipage/support.html index 2b9fe0d..de4fcbe 100644 --- a/docs/multipage/support.html +++ b/docs/multipage/support.html @@ -12,7 +12,7 @@ HamburgerMenu ☰ Multipage - + diff --git a/docs/single-page-app/index.html b/docs/single-page-app/index.html index 15407fd..da2b0e4 100644 --- a/docs/single-page-app/index.html +++ b/docs/single-page-app/index.html @@ -12,7 +12,7 @@ HamburgerMenu ☰ Single-Page Web App - + diff --git a/package.json b/package.json index 42a523a..ea871e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hamburger-menu", - "version": "0.6.0", + "version": "0.6.1", "description": "☰ A responsive CSS solution for a hamburger menu ☰", "license": "MIT", "type": "module", @@ -53,35 +53,37 @@ "replacer src --ext=.css build --concat=hamburger-menu.css", "csso build/hamburger-menu.css --output build/hamburger-menu.min.css", "copy-folder src --ext=.js build", - "uglifyjs src/hamburger-menu.js --output build/hamburger-menu.min.js", + "uglifyjs src/hamburger-menu.js --output build/hamburger-menu.min.js" + ], + "dist": [ "add-dist-header build dist --delimiter=☰", "copy-file dist/hamburger-menu.css --folder docs", - "copy-file dist/hamburger-menu.js --folder docs", - "html-validator" + "copy-file dist/hamburger-menu.js --folder docs", + "html-validator docs" ] }, "scripts": { - "pretest": "run-scripts clean lint build", + "pretest": "run-scripts clean lint build dist", "test": "mocha spec/*.spec.js", "interactive": "browser-sync . --startPath docs --files docs" }, "dependencies": {}, "devDependencies": { - "@fortawesome/fontawesome-free": "~6.4", + "@fortawesome/fontawesome-free": "~6.5", "add-dist-header": "~1.3", "assert-deep-strict-equal": "~1.1", - "browser-sync": "~2.29", + "browser-sync": "~3.0", "copy-file-util": "~1.1", "copy-folder-util": "~1.1", "csso-cli": "~4.0", - "dna-engine": "~3.0", + "dna-engine": "~3.1", "jshint": "~2.13", "mocha": "~10.2", "replacer-util": "~1.2", "rimraf": "~5.0", "run-scripts-util": "~1.2", "uglify-js": "~3.17", - "w3c-html-validator": "~1.5", - "web-ignition": "~2.0" + "w3c-html-validator": "~1.6", + "web-ignition": "~2.1" } } diff --git a/task-runner.sh.command b/task-runner.sh.command index e5f1f0f..8ba8ed4 100755 --- a/task-runner.sh.command +++ b/task-runner.sh.command @@ -55,7 +55,7 @@ releaseInstructions() { echo "When ready to do the next release:" echo echo " === Increment version ===" - echo " Edit pacakge.json to bump $version to next version number" + echo " Edit package.json to bump $version to next version number" echo " $projectHome/package.json" } nextActionCommitTagPub() {