page-versions.hbs 896 Bytes
Newer Older
박민석's avatar
박민석 committed
1 2
{{!-- {{#with page.versions}} --}}
{{#if page.component}}
hyeryung's avatar
hyeryung committed
3
<div class="page-versions">
minseok.park's avatar
minseok.park committed
4
  <div class="backdrop"></div>
minseok.park's avatar
minseok.park committed
5
  <h2 class="title"><a href="{{{relativize ./url}}}">{{page.component.title}}</a></h2>
박민석's avatar
박민석 committed
6
  <button class="version-menu-toggle" title="Show other versions of page">{{#if (or page.componentVersion.version (ne page.componentVersion.displayVersion 'default'))}}v{{page.componentVersion.displayVersion}}{{/if}}</button>
박민석's avatar
박민석 committed
7

박민석's avatar
박민석 committed
8
  {{#with site.components.[0]}}
박민석's avatar
박민석 committed
9
  <div class="version-menu">
박민석's avatar
박민석 committed
10
    {{#each ./versions}}
hyeryung's avatar
hyeryung committed
11
    <a class="version
박민석's avatar
박민석 committed
12
      {{!-- {{~#if (eq ./version @root.page.version)}} is-current{{/if~}} --}}
박민석's avatar
박민석 committed
13
      {{~#if (and (eq .. @root.page.component) (eq this @root.page.componentVersion))}} is-current{{/if~}}
박민석's avatar
박민석 committed
14 15
      {{~#if ./missing}} is-missing{{/if}}" href="{{{relativize ./url}}}">v{{./displayVersion}}</a>
    {{/each}}
hyeryung's avatar
hyeryung committed
16
  </div>
박민석's avatar
박민석 committed
17
  {{/with}}
hyeryung's avatar
hyeryung committed
18
</div>
박민석's avatar
박민석 committed
19
{{/if}}
박민석's avatar
박민석 committed
20
{{!-- {{/with}} --}}