Skip to content

Commit

Permalink
Add dropdown to change version of documentation | Fixes liferay#657
Browse files Browse the repository at this point in the history
  • Loading branch information
matuzalemsteles committed Mar 15, 2018
1 parent a64db55 commit f68a130
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/clayui.com/src/partials/ElectricAPI.soy
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@
<span class="title">{$site.title} </span>
<small>by Liferay</small>
</a>
<div class="btn-group">
<button aria-expanded="false" aria-haspopup="true" class="btn btn-sm btn-version dropdown-toggle" data-toggle="dropdown" type="button">
{$project.ref}
<svg aria-hidden="true" class="lexicon-icon lexicon-icon-caret-bottom ml-1">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/vendor/lexicon/icons.svg#caret-bottom"></use>
</svg>
</button>
<div class="dropdown-menu ml-2 mt-2">
{foreach $ref in $project.refs}
{let $classes kind="text"}
dropdown-item
{if $project.ref == $ref}
{sp}active
{/if}
{/let}

<a class="{$classes}" href="/api/{$ref}">{$ref}</a>
{/foreach}
</div>
</div>
</div>
</div>

Expand Down
5 changes: 5 additions & 0 deletions packages/clayui.com/src/styles/_api.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,8 @@
.entity-members h2 {
margin: 40px 0 20px;
}

.btn-version {
background-color: #f3f3f3;
color: #6B6C7E;
}

0 comments on commit f68a130

Please sign in to comment.