-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a954aa4
commit cb9f9dd
Showing
5 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/node_modules/astro-breadcrumbs/src/Breadcrumbs.astro b/node_modules/astro-breadcrumbs/src/Breadcrumbs.astro | ||
index b4a60ee..25fc657 100644 | ||
--- a/node_modules/astro-breadcrumbs/src/Breadcrumbs.astro | ||
+++ b/node_modules/astro-breadcrumbs/src/Breadcrumbs.astro | ||
@@ -28,12 +28,12 @@ const { | ||
excludeCurrentPage = false, | ||
debug = false, | ||
separatorAriaHidden = true, | ||
+ id = crypto.randomUUID(), | ||
} = Astro.props as BreadcrumbsProps; | ||
|
||
const paths = Astro.url.pathname.split("/").filter((crumb: any) => crumb); | ||
const hasTrailingSlash = Astro.url.pathname.endsWith("/"); | ||
const pathLength = paths?.length; | ||
-const UUID = crypto.randomUUID(); | ||
const listCssClasses = [ | ||
`${mainBemClass}__crumbs`, | ||
Astro.slots.has("separator") ? " has-separators" : " has-no-separators", | ||
@@ -63,11 +63,11 @@ debugInformation(debug, parts, customizedParts); | ||
|
||
<astro-breadcrumbs | ||
data-main-bem-class={mainBemClass} | ||
- data-id={UUID} | ||
+ data-id={id} | ||
data-path-length={pathLength} | ||
data-truncated={truncated} | ||
> | ||
- <nav aria-label={ariaLabel} class={mainBemClass} id={UUID} {...customizeNav}> | ||
+ <nav aria-label={ariaLabel} class={mainBemClass} id={id} {...customizeNav}> | ||
<ol class:list={listCssClasses} {...customizeList}> | ||
{ | ||
processedParts.map( | ||
diff --git a/node_modules/astro-breadcrumbs/src/breadcrumbs.types.ts b/node_modules/astro-breadcrumbs/src/breadcrumbs.types.ts | ||
index 019011e..5459a37 100644 | ||
--- a/node_modules/astro-breadcrumbs/src/breadcrumbs.types.ts | ||
+++ b/node_modules/astro-breadcrumbs/src/breadcrumbs.types.ts | ||
@@ -15,6 +15,7 @@ export interface BreadcrumbsProps { | ||
excludeCurrentPage?: boolean; | ||
debug?: boolean; | ||
separatorAriaHidden?: boolean; | ||
+ id?: string; | ||
} | ||
|
||
export interface CustomizeElement extends AddAttributes { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters