Skip to content

Commit b8c1f17

Browse files
committed
move version picker to right of component home link
1 parent ed28d4e commit b8c1f17

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/partials/nav.hbs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
{{~/if}}
77
id="side-nav"
88
class="h-full bg-level1 overflow-y-scroll flex flex-col w-[18.5rem] px-2 pt-2">
9-
{{> page-versions page=../page}}
10-
{{#with @root.page.componentVersion}}
11-
<a class="p-2 mb-1 text-h4 hover:bg-level2 rounded transition-colors !no-underline" href="{{{relativize ./url}}}">{{./title}}</a>
12-
{{/with}}
9+
<div class="flex items-start gap-1 mb-1 ">
10+
{{#with @root.page.componentVersion}}
11+
<a class="flex flex-grow py-1 px-2 text-h4 hover:bg-level2 rounded transition-colors !no-underline" href="{{{relativize ./url}}}">{{./title}}</a>
12+
{{/with}}
13+
{{> page-versions page=../page}}
14+
</div>
1315
{{> nav-tree navigation=this}}
1416
{{> nav-secondary}}
1517
</nav>

src/partials/page-versions.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{{#with page.versions}}
2-
<div class="dropdown my-2">
2+
<div class="dropdown ml-auto">
33
<button id="page-version-dropdown" title="Show other versions of page" class="group dropdown-trigger btn btn-soft btn-primary btn-small" aria-haspopup="true" aria-expanded="false">
4-
Version: <span class="font-bold ml-1">{{@root.page.componentVersion.displayVersion}}{{#if (eq @root.page.component.latest.version @root.page.componentVersion.version)}} (Latest){{/if}}</span>
4+
<span class="font-bold ml-1">{{@root.page.componentVersion.displayVersion}}{{#if (eq @root.page.component.latest.version @root.page.componentVersion.version)}} (Latest){{/if}}</span>
55
<i class="material-icons text-lg color-primary motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-in-out ml-[0.15em] group-[.active]:rotate-180">expand_more</i>
66
</button>
7-
<ul class="dropdown-content py-2 bg-body border rounded w-32 z-40" role="menu" aria-orientation="vertical" aria-labelledby="page-version-dropdown">
7+
<ul class="dropdown-content py-2 bg-body border rounded w-48 z-40" role="menu" aria-orientation="vertical" aria-labelledby="page-version-dropdown">
88
{{#each this}}
99
<li>
1010
<a

0 commit comments

Comments
 (0)