Skip to content

Commit

Permalink
tweak docs UI
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Sep 15, 2024
1 parent 29e17bf commit 57b58ef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 3 additions & 5 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@
.Mill In Depth
* xref:Library_Dependencies.adoc[]
* xref:Out_Dir.adoc[]
* xref:Target_Query_Syntax.adoc[]
* xref:Tasks.adoc[]
* xref:Modules.adoc[]
* xref:Cross_Builds.adoc[]
* xref:Target_Query_Syntax.adoc[]
* xref:Structuring_Large_Builds.adoc[]
* xref:The_Mill_Evaluation_Model.adoc[]
* xref:Mill_Sandboxing.adoc[]
* xref:Bundled_Libraries.adoc[]
* xref:The_Mill_Evaluation_Model.adoc[]
// This section talks about Mill plugins. While it could theoretically fit in
// either section above, it is probably an important enough topic it is worth
// breaking out on its own
Expand Down Expand Up @@ -85,6 +84,5 @@
// *somewhere*.
.Reference
* xref:Mill_Design_Principles.adoc[]
* xref:Bundled_Libraries.adoc[]
* {mill-doc-url}/api/latest/mill/index.html[Mill Scaladoc]
* xref:Changelog.adoc[]
4 changes: 4 additions & 0 deletions docs/supplemental-ui/helpers/gt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

module.exports = (n1, n2, { data: { root } }) => {
return n1 > n2;
}
8 changes: 6 additions & 2 deletions docs/supplemental-ui/partials/nav-tree.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
override this template to add is-active to top-level <li> where `level` is not defined
This lets us open up the first-level tree nodes by default, letting us use tree
nodes to organize things while keeping them open and easily browsable/discoverable
nodes to organize things while keeping them open and easily browsable/discoverable.
We leave the first 3 items (0, 1, 2) to only open on demand, since the
`Build $LANGUAGE Projects with Mill` entries are pretty repetitive and we do not need to
show all of them all the time
}}
{{#if navigation.length}}
<ul class="nav-list">
{{#each navigation}}

<li class="nav-item{{#if (eq ./url @root.page.url)}} is-current-page{{/if}}{{#unless ../level}} is-active{{/unless}}" data-depth="{{or ../level 0}}">
<li class="nav-item{{#if (eq ./url @root.page.url)}} is-current-page{{/if}}{{#if (and (not ../level) (gt @index 2))}} is-active{{/if}}" data-depth="{{or ../level 0}}">
{{#if ./content}}
{{#if ./items.length}}
<button class="nav-item-toggle"></button>
Expand Down

0 comments on commit 57b58ef

Please sign in to comment.