-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto scroll to current side nav item + show all breadcrumbs (#161)
* scrollIntoView for current page nav item, show all breadcrumbs * classnames for algolia * more ids for algolia * better algoia selectors
- Loading branch information
1 parent
76243bc
commit 312b590
Showing
5 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
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 |
---|---|---|
@@ -1,24 +1,28 @@ | ||
{{#unless (or (eq page.layout 'landing') (eq page.layout 'full') (eq page.layout 'home'))}} | ||
<nav class="flex" aria-label="breadcrumbs"> | ||
{{#if page.breadcrumbs}} | ||
<ul class="flex flex-wrap !list-none !m-0 !p-0"> | ||
{{#if page.breadcrumbs}} | ||
<nav id="breadcrumbs" class="flex" aria-label="breadcrumbs"> | ||
<ol class="flex flex-wrap !list-none !m-0 !p-0"> | ||
{{#with page.componentVersion}} | ||
{{#if (and ./title (ne ./title @root.page.breadcrumbs.0.content))}} | ||
<li class="text-link !m-0 !p-0 after:content-['/'] last-of-type:after:content-none after:text-tertiary after:px-2"><a href="{{{relativize ./url}}}">{{{./title}}}</a></li> | ||
<li class="text-link !m-0 !p-0 after:content-['/'] last-of-type:after:content-none after:text-tertiary after:px-2"> | ||
<a class="component-home" href="{{{relativize ./url}}}">{{{./title}}}</a> | ||
</li> | ||
{{/if}} | ||
{{/with}} | ||
{{#each page.breadcrumbs}} | ||
{{#if (and ./url (eq ./urlType 'internal'))}} | ||
{{#if (is-last this ../page.breadcrumbs)}} | ||
<li class="text-tertiary !m-0 !p-0">{{{./content}}}</li> | ||
{{else}} | ||
{{#if ./content}} | ||
{{#if (not (eq ./url @root.page.url))}} | ||
{{#if (eq ./urlType 'internal')}} | ||
<li class="text-link !m-0 !p-0 after:content-['/'] last-of-type:after:content-none after:text-tertiary after:px-2"> | ||
<a href="{{{relativize ./url}}}">{{{./content}}}</a> | ||
</li> | ||
{{else}} | ||
<li class="text-tertiary !m-0 !p-0 after:content-['/'] last-of-type:after:content-none after:text-tertiary after:px-2">{{{./content}}}</li> | ||
{{/if}} | ||
{{/if}} | ||
{{/if}} | ||
{{/each}} | ||
</ul> | ||
{{/if}} | ||
</ol> | ||
</nav> | ||
{{/if}} | ||
{{/unless}} |
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