Skip to content

Commit

Permalink
use local versions for version switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
fantkolja committed Aug 8, 2024
1 parent 0145a93 commit f9bb875
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
Binary file modified build/ui-bundle.zip
Binary file not shown.
16 changes: 8 additions & 8 deletions src/partials/nav-explore.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@
{{/each}}
</ul>

{{#each (sort-components site.components 'name' page.attributes.component-order)}}
{{#if (and (not-eq this.name 'cloud') (not-eq this.name 'home') (not-eq this.name 'templates') (eq this @root.page.component))}}
{{#with page.versions}}
{{#if (and (not-eq @root.page.component.name 'cloud') (not-eq @root.page.component.name 'home') (not-eq @root.page.component.name 'templates'))}}
<ul class="nav-version-picker-versions" id="navbarVersionsList">
{{#each ./versions}}
{{#if (lte @index 6)}}
<li class="version
{{~#if (and (eq .. @root.page.component) (eq this @root.page.componentVersion))}} is-current{{/if~}}
{{~#if (eq this ../latest)}} is-latest{{/if}}">
{{#each this}}
{{#if (lte @index 10)}}
<li
class="version {{~#if (eq ./version @root.page.version)}} is-current{{/if~}}"
>
<a href="{{{relativize ./url}}}">{{./displayVersion}}</a>
</li>
{{/if}}
{{/each}}
</ul>
{{/if}}
{{/each}}
{{/with}}
</div>
22 changes: 11 additions & 11 deletions src/partials/page-versions.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{#with page.versions}}
<div class="page-versions">
<button class="version-menu-toggle" title="Show other versions of page">Version {{@root.page.componentVersion.displayVersion}}</button>
<div class="version-menu">
{{#each this}}
{{#if (lte @index 10)}}
<a class="version
{{~#if (eq ./version @root.page.version)}} is-current{{/if~}}
{{~#if ./missing}} is-missing{{/if}}" href="{{{relativize ./url}}}">{{./displayVersion}}</a>
{{/if}}
{{/each}}
<div class="page-versions">
<button class="version-menu-toggle" title="Show other versions of page">Version {{@root.page.componentVersion.displayVersion}}</button>
<div class="version-menu">
{{#each this}}
{{#if (lte @index 10)}}
<a class="version
{{~#if (eq ./version @root.page.version)}} is-current{{/if~}}
{{~#if ./missing}} is-missing{{/if}}" href="{{{relativize ./url}}}">{{./displayVersion}}</a>
{{/if}}
{{/each}}
</div>
</div>
</div>
{{/with}}

0 comments on commit f9bb875

Please sign in to comment.