libreria-astro-lefebvre 0.0.148 → 0.0.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libreria-astro-lefebvre",
3
- "version": "0.0.148",
3
+ "version": "0.0.149",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -117,7 +117,8 @@ const categories: MenuItem[] = (categoriesProp && categoriesProp.length > 0)
117
117
  <nav class="w-full flex items-center border-y border-gray-300">
118
118
  <ul class="max-w-7xl hidden md:flex items-center justify-start md:gap-2 lg:gap-8 mx-auto">
119
119
  {categories.map(category => {
120
- const isActive = currentPath.includes(category.link);
120
+ const isActive = currentPath.includes(category.link) ||
121
+ (subdirectory !== '' && (subdirectory + currentPath).includes(category.link));
121
122
  return (
122
123
  <li class={`relative group border-b-4 hover:border-b-4 hover:border-[#001978] hover:bg-gray-100 ${isActive ? 'border-b-4 border-[#001978] active' : 'border-transparent'}`}>
123
124
  <a href={category.link} target={category.target ?? '_self'} class="flex items-center md:px-4 lg:px-8 py-6">
@@ -154,7 +155,8 @@ const categories: MenuItem[] = (categoriesProp && categoriesProp.length > 0)
154
155
  <div class="w-full md:flex md:w-auto">
155
156
  <ul>
156
157
  {categories.map(category => {
157
- const isActive = currentPath.includes(category.link);
158
+ const isActive = currentPath.includes(category.link) ||
159
+ (subdirectory !== '' && (subdirectory + currentPath).includes(category.link));
158
160
  return (
159
161
  <li class={`relative group px-6 py-4 border-b-2 hover:border-b-2 hover:border-indigo-600 ${isActive ? 'border-b-4 border-[#001978] active' : 'border-transparent'}`}>
160
162
  <a href={category.link} target={category.target ?? '_self'} class="flex items-center">