Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "accessible-astro-starter",
"description": "An Accessible Starter Theme for Astro including several accessibility features and tools to help you build faster.",
"version": "5.2.0",
"version": "5.2.1",
"author": "Incluud",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -79,4 +79,4 @@
"engines": {
"node": ">=22.12.0"
}
}
}
2 changes: 1 addition & 1 deletion packages/create-accessible-astro-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-accessible-astro-starter",
"version": "5.2.0",
"version": "5.2.1",
"description": "Create a new Accessible Astro Starter project with guided presets.",
"license": "MIT",
"type": "module",
Expand Down
5 changes: 3 additions & 2 deletions packages/create-accessible-astro-starter/src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ const viteConfig = {
css: {
preprocessorOptions: {
scss: {
loadPaths: [fileURLToPath(new URL('./src/assets', import.meta.url))],
logger: {
warn: () => {},
},
Expand Down Expand Up @@ -403,13 +404,13 @@ ${includeLauncher ? ` <div class="mobile-launcher">

const setActiveMenuItem = (): void => {
const mobileDesktopMenus = mainNav.querySelectorAll('nav > ul')
const currentPath = window.location.pathname.replace(/\/+$/, '') || '/'
const currentPath = window.location.pathname.replace(/\\/+$/, '') || '/'

mobileDesktopMenus.forEach((menu) => {
const menuItems = [...menu.querySelectorAll('a[href]:not([rel*="external"])')] as HTMLAnchorElement[]

menuItems.forEach((menuItem) => {
const itemPath = menuItem.pathname.replace(/\/+$/, '') || '/'
const itemPath = menuItem.pathname.replace(/\\/+$/, '') || '/'
const isHome = itemPath === '/'
const isActive = isHome ? currentPath === '/' : currentPath === itemPath || currentPath.startsWith(itemPath + '/')

Expand Down