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
4 changes: 4 additions & 0 deletions exampleSite/content/test-product/commerical/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Commercial
description: Highlighting commerical pages
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Commercial Feature
description: Commercial Feature
nd-commercial: true
---

The sidebar for this item should contain _Commercial_ to signifiy that it requires a comemrical subscription.

This is managed by the `nd-commercial: true` in the frontmatter.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Partial Commercial Feature
description: Partial Commercial Feature
nd-commercial-partial: true
---

The sidebar for this item should contain _Partial Commercial_ to signifiy that it requires a commercial subscription
for a part of this page.

For example, a module may have specific features or directives within, that
require a commercial subscription, but the module itself can be used without it.

This is managed by the `nd-commercial-partial: true` in the frontmatter.
7 changes: 7 additions & 0 deletions layouts/partials/commercial-feature.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ with .Params }}
{{ if (index . "nd-commercial") }}
- <em>Commercial</em>
{{ else if (index . "nd-commercial-partial") }}
- <em>Partial Commercial</em>
{{ end }}
{{ end }}
6 changes: 3 additions & 3 deletions layouts/partials/sidebar-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
aria-controls="{{ $tocID }}"
id="{{ $linkID }}"
>
<span>{{ $p.Title }}</span>
<span>{{ $p.Title }} {{ partial "commercial-feature.html" $p }}</span>
<span class="sidebar__chevron sidebar__chevron--open">
{{ partial "lucide" (dict "context" . "icon" "chevron-right") }}
</span>
Expand All @@ -86,11 +86,11 @@
class="sidebar__link {{ if $onPage }}sidebar__link--current{{ end }}"
{{ if $onPage }}aria-current="page"{{ end }}
>
{{ $p.Title }}
<span>{{ $p.Title }} {{ partial "commercial-feature.html" $p }}</span>
</a>
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}
{{ end }}
Loading