mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 06:13:35 -04:00
chore: update Hugo version to 0.147.7 and improve nav-menu script
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/hugo:1": {
|
"ghcr.io/devcontainers/features/hugo:1": {
|
||||||
"extended": true,
|
"extended": true,
|
||||||
"version": "0.145.0"
|
"version": "0.147.7"
|
||||||
},
|
},
|
||||||
"ghcr.io/devcontainers/features/node:1": {}
|
"ghcr.io/devcontainers/features/node:1": {}
|
||||||
},
|
},
|
||||||
@ -18,5 +18,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"postCreateCommand": "npm install",
|
"postCreateCommand": "npm install",
|
||||||
"forwardPorts": [1313]
|
"forwardPorts": [
|
||||||
|
1313
|
||||||
|
]
|
||||||
}
|
}
|
2
.github/workflows/pages.yml
vendored
2
.github/workflows/pages.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
HUGO_VERSION: 0.147.5
|
HUGO_VERSION: 0.147.7
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
(function () {
|
(function () {
|
||||||
|
const hiddenClass = "hx:hidden";
|
||||||
const dropdownToggles = document.querySelectorAll(".hextra-nav-menu-toggle");
|
const dropdownToggles = document.querySelectorAll(".hextra-nav-menu-toggle");
|
||||||
|
|
||||||
dropdownToggles.forEach((toggle) => {
|
dropdownToggles.forEach((toggle) => {
|
||||||
@ -11,7 +12,7 @@
|
|||||||
if (otherToggle !== toggle) {
|
if (otherToggle !== toggle) {
|
||||||
otherToggle.dataset.state = "closed";
|
otherToggle.dataset.state = "closed";
|
||||||
const otherMenuItems = otherToggle.nextElementSibling;
|
const otherMenuItems = otherToggle.nextElementSibling;
|
||||||
otherMenuItems.classList.add("hx:hidden");
|
otherMenuItems.classList.add(hiddenClass);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -29,10 +30,10 @@
|
|||||||
menuItemsElement.style.zIndex = "1000";
|
menuItemsElement.style.zIndex = "1000";
|
||||||
|
|
||||||
// Show dropdown
|
// Show dropdown
|
||||||
menuItemsElement.classList.remove("hx:hidden");
|
menuItemsElement.classList.remove(hiddenClass);
|
||||||
} else {
|
} else {
|
||||||
// Hide dropdown
|
// Hide dropdown
|
||||||
menuItemsElement.classList.add("hx:hidden");
|
menuItemsElement.classList.add(hiddenClass);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -43,7 +44,7 @@
|
|||||||
dropdownToggles.forEach((toggle) => {
|
dropdownToggles.forEach((toggle) => {
|
||||||
toggle.dataset.state = "closed";
|
toggle.dataset.state = "closed";
|
||||||
const menuItemsElement = toggle.nextElementSibling;
|
const menuItemsElement = toggle.nextElementSibling;
|
||||||
menuItemsElement.classList.add("hx:hidden");
|
menuItemsElement.classList.add(hiddenClass);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -54,7 +55,7 @@
|
|||||||
dropdownToggles.forEach((toggle) => {
|
dropdownToggles.forEach((toggle) => {
|
||||||
toggle.dataset.state = "closed";
|
toggle.dataset.state = "closed";
|
||||||
const menuItemsElement = toggle.nextElementSibling;
|
const menuItemsElement = toggle.nextElementSibling;
|
||||||
menuItemsElement.classList.add("hx:hidden");
|
menuItemsElement.classList.add(hiddenClass);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -7,6 +7,6 @@ command = "cd exampleSite && hugo --gc --minify --themesDir ../.. -b ${DEPLOY_PR
|
|||||||
ignore = "false"
|
ignore = "false"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.147.5"
|
HUGO_VERSION = "0.147.7"
|
||||||
GO_VERSION = "1.24.3"
|
GO_VERSION = "1.24.3"
|
||||||
NODE_VERSION = "22.16.0"
|
NODE_VERSION = "22.16.0"
|
||||||
|
Reference in New Issue
Block a user