Skip to content

Commit

Permalink
import changes from Antora default UI through https://gitlab.com/anto…
Browse files Browse the repository at this point in the history
…ra/antora-ui-default/-/commit/2a57b11a9ed9f3de91707192fb80038c867c70c5

* slightly indent list of versions in explore panel to make association more clear
* hide version in explore panel if component is versionless and display version is default
* make versions in explore panel more prominent
  • Loading branch information
mojavelinux committed Nov 30, 2023
1 parent 69e709d commit 3f29949
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 7 additions & 6 deletions ui/src/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
display: flex;
flex-wrap: wrap;
padding-left: 0;
margin-top: -0.25rem;
margin: -0.25rem -0.375rem 0 0.375rem;
line-height: 1;
list-style: none;
}
Expand All @@ -268,16 +268,17 @@
}

.nav-panel-explore .component .version a {
border: 1px solid var(--nav-border-color);
background: var(--nav-border-color);
border-radius: 0.25rem;
opacity: 0.75;
white-space: nowrap;
padding: 0.125em 0.25em;
padding: 0.25em 0.5em;
display: inherit;
opacity: 0.75;
}

.nav-panel-explore .component .is-current a {
border-color: currentColor;
opacity: 0.9;
background: var(--nav-heading-font-color);
color: var(--nav-secondary-background);
font-weight: var(--body-font-weight-bold);
opacity: 1;
}
4 changes: 3 additions & 1 deletion ui/src/partials/nav-explore.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
{{#if page.component}}
<div class="context">
<span class="title">{{page.component.title}}</span>
<span class="version">{{page.componentVersion.displayVersion}}</span>
<span class="version">{{#if (or page.componentVersion.version (ne page.componentVersion.displayVersion 'default'))}}{{page.componentVersion.displayVersion}}{{/if}}</span>
</div>
{{/if}}
<ul class="components">
{{#each site.components}}
<li class="component{{#if (eq this @root.page.component)}} is-current{{/if}}">
<a class="title" href="{{{relativize ./url}}}">{{{./title}}}</a>
{{#if (or ./versions.[1] ./versions.[0].version (ne ./versions.[0].displayVersion 'default'))}}
<ul class="versions">
{{#each ./versions}}
<li class="version
Expand All @@ -18,6 +19,7 @@
</li>
{{/each}}
</ul>
{{/if}}
</li>
{{/each}}
</ul>
Expand Down

0 comments on commit 3f29949

Please sign in to comment.