Skip to content

Commit

Permalink
Select custom label or hide label in selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
recrwplay committed Aug 27, 2024
1 parent 83c66a0 commit bd7f29c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions preview-src/labels.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
= Labels
:page-selector-label: Custom version label
// :page-selector-hide-label: true


== All the labels
Expand Down
2 changes: 1 addition & 1 deletion src/partials/nav-selectors.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{{#if (eq this.version @root.page.version)}} selected{{/if}}
{{~#if this.missing}} disabled{{/if}}
>
Version {{ this.displayVersion }}{{#if (and @root.page.attributes.nav-indicate-latest (eq this.version @root.page.latest.version)) }} (latest){{/if}}
{{#unless @root.page.attributes.selector-hide-label }}{{#with (or @root.page.attributes.selector-label 'Version') }}{{{this}}} {{/with}}{{/unless}}{{ this.displayVersion }}{{#if (and @root.page.attributes.nav-indicate-latest (eq this.version @root.page.latest.version)) }} (latest){{/if}}
</option>
{{/unless}}
{{/each}}
Expand Down

0 comments on commit bd7f29c

Please sign in to comment.