Skip to content

Commit ecc0765

Browse files
committed
don't show first breadcrumb if it matches component title or component version title
1 parent d624c30 commit ecc0765

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/partials/crumbs.hbs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<nav class="crumbs" aria-label="breadcrumbs">
2-
<ul>
3-
{{!-- NOTE add entry for current component, but not the home component or if the title matches the first breadcrumb --}}
4-
{{#unless (eq page.component.name 'home')}}
5-
{{#unless (eq page.breadcrumbs.0.content page.componentVersion.title)}}
6-
<li class="crumb"><a href="{{relativize page.componentVersion.url}}">{{{page.componentVersion.title}}}</a></li>
7-
{{/unless}}
8-
{{/unless}}
9-
{{#each page.breadcrumbs}}
10-
<li class="crumb">{{#if (eq ./urlType 'internal')}}<a href="{{relativize ./url}}">{{{./content}}}</a>{{else}}{{{./content}}}{{/if}}</li>
11-
{{/each}}
12-
</ul>
13-
</nav>
2+
<ul>
3+
{{!-- NOTE add entry for current component, but not the home component or if the title matches the first breadcrumb --}}
4+
{{#unless (eq page.component.name 'home')}}
5+
{{#unless (or (eq page.breadcrumbs.0.content page.component.title) (eq page.breadcrumbs.0.content page.componentVersion.title))}}
6+
<li class="crumb"><a href="{{relativize page.componentVersion.url}}">{{{page.component.title}}}</a></li>
7+
{{/unless}}
8+
{{/unless}}
9+
{{#each page.breadcrumbs}}
10+
<li class="crumb">{{#if (eq ./urlType 'internal')}}<a href="{{relativize ./url}}">{{{./content}}}</a>{{else}}{{{./content}}}{{/if}}</li>
11+
{{/each}}
12+
</ul>
13+
</nav>

0 commit comments

Comments
 (0)