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/8d5bb9cedc46f58198d3cd7afd67cf472a024777

* ensure discrete headings are not included in page TOC
* tweak spacing between items in explore panel; add hanging indent for wrapped titles
* enclose component title in div in navigation explore panel
* use tighter line height for component title in explore panel
  • Loading branch information
mojavelinux committed Feb 7, 2024
1 parent 7f021d9 commit 983f92c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ui/preview-src/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ Eu mea inani iriure.
[discrete]
== Voluptua singulis

[discrete]
=== Nominavi luptatum

Cum dicat putant ne.
Est in reque homero principes, meis deleniti mediocrem ad has.
Ex nam suas nemore dignissim, vel apeirian democritum et.
Expand Down
9 changes: 5 additions & 4 deletions ui/src/css/nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,11 @@
}

.nav-panel-explore .components {
line-height: var(--doc-line-height);
line-height: var(--nav-line-height);
flex-grow: 1;
box-shadow: inset 0 1px 5px var(--nav-panel-divider-color);
background: var(--nav-secondary-background);
padding: 0.5rem 0.75rem 0 0.75rem;
padding: 0.75rem 0.75rem 0 0.75rem;
margin: 0;
overflow-y: scroll;
overscroll-behavior: none;
Expand All @@ -243,7 +243,7 @@
}

.nav-panel-explore .component + .component {
margin-top: 0.5rem;
margin-top: 0.75rem;
}

.nav-panel-explore .component:last-child {
Expand All @@ -252,13 +252,14 @@

.nav-panel-explore .component .title {
font-weight: var(--body-font-weight-bold);
text-indent: 0.375rem hanging;
}

.nav-panel-explore .versions {
display: flex;
flex-wrap: wrap;
padding-left: 0;
margin: -0.25rem -0.375rem 0 0.375rem;
margin: -0.125rem -0.375rem 0 0.375rem;
line-height: 1;
list-style: none;
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/js/02-on-this-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var headingSelector = [articleSelector]
if (level) {
for (var l = 1; l <= level; l++) headingSelector.push((l === 2 ? '.sectionbody>' : '') + '.sect' + l)
headingSelector.push('h' + (level + 1) + '[id]')
headingSelector.push('h' + (level + 1) + '[id]' + (level > 1 ? ':not(.discrete)' : ''))
} else {
headingSelector.push('h1[id].sect0')
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/partials/nav-explore.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{#each site.components}}
{{#if (and (ne ./name 'ROOT') (ne ./name 'docs'))}}
<li class="component{{#if (eq this @root.page.component)}} is-current{{/if}}">
<a class="title" href="{{{relativize ./url}}}">{{{./title}}}</a>
<div class="title"><a href="{{{relativize ./url}}}">{{{./title}}}</a></div>
{{#if (or ./versions.[1] ./versions.[0].version (ne ./versions.[0].displayVersion 'default'))}}
<ul class="versions">
{{#each ./versions}}
Expand Down

0 comments on commit 983f92c

Please sign in to comment.