File tree Expand file tree Collapse file tree 4 files changed +41
-29
lines changed Expand file tree Collapse file tree 4 files changed +41
-29
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ site:
10
10
title : &component_title Index
11
11
url : ' #'
12
12
versions :
13
- - &latest_version_abc
13
+ - &component_version
14
14
url : ' #'
15
- version : ' index '
16
- displayVersion : ' index '
17
- latestVersion : *latest_version_abc
15
+ version : ' noversion '
16
+ displayVersion : ' noversion '
17
+ latest : *component_version
18
18
- name : xyz
19
19
title : Project NotReally
20
20
- name : xyz
25
25
url : /xyz/6.0/index.html
26
26
version : ' 6.0'
27
27
displayVersion : ' 6.0'
28
- - &component_version
29
- title : *component_title
28
+ - title : *component_title
30
29
url : ' #'
31
30
version : ' dev'
32
31
displayVersion : ' dev'
36
35
- url : ' #'
37
36
version : ' 5.0'
38
37
displayVersion : ' 5.0'
39
- latestVersion : *latest_version_xyz
38
+ latest : *latest_version_xyz
40
39
- name : ' 123'
41
40
title : Project 123
42
41
url : ' #'
@@ -51,15 +50,15 @@ site:
51
50
- url : ' #'
52
51
version : ' 2.0'
53
52
displayVersion : ' 2.0'
54
- latestVersion : *latest_version_123
53
+ latest : *latest_version_123
55
54
page :
56
55
url : *home_url
57
56
home : true
58
57
title : Minecraft Observability
59
58
component : *component
60
59
componentVersion : *component_version
61
- version : ' dev '
62
- displayVersion : ' dev '
60
+ version : ' noversion '
61
+ displayVersion : ' noversion '
63
62
module : ROOT
64
63
relativeSrcPath : index.adoc
65
64
editUrl : http://example.com/project-xyz/blob/main/index.adoc
Original file line number Diff line number Diff line change 34
34
}
35
35
}
36
36
37
+ .toolbar-padder {
38
+ flex-shrink : 0 ;
39
+ }
40
+
37
41
.nav-toggle .is-active {
38
42
background-image : url(../ img/back.svg);
39
43
background-size : 41.5% ;
Original file line number Diff line number Diff line change 1
1
<div class =" nav-panel-explore{{ #unless page.navigation }} is-active{{ /unless }} " data-panel =" explore" >
2
2
{{ #if page.component }}
3
- <div class =" context" >
4
- <span class =" title" >{{ page.component.title }} </span >
5
- <span class =" version" >{{ page.componentVersion.displayVersion }} </span >
6
- </div >
3
+ {{ #if (eq " noversion" ./page.componentVersion.version )}}
4
+ <!-- placeholder toolbar to align with main toolbar-->
5
+ <div class =" toolbar toolbar-padder" style =" position: static" ></div >
6
+ {{ else }}
7
+ <div class =" context" >
8
+ <span class =" title" >{{ page.component.title }} </span >
9
+ <span class =" version" >{{ page.componentVersion.displayVersion }} </span >
10
+ </div >
11
+ {{ /if }}
7
12
{{ /if }}
8
13
<ul class =" components" >
9
14
{{ #each site.components }}
10
- <li class =" component{{ #if (eq this @root.page.component )}} is-current{{ /if }} " >
11
- <a class =" title" href =" {{{ relativize ./url }}} " >{{{ ./title }}} </a >
12
- <ul class =" versions" >
13
- {{ #each ./versions }}
14
- <li class =" version
15
- {{ ~#if (and (eq .. @root.page.component ) (eq this @root.page.componentVersion ))}} is-current{{ /if ~}}
16
- {{ ~#if (eq this ../latest )}} is-latest{{ /if }} " >
17
- <a href =" {{{ relativize ./url }}} " >{{ ./displayVersion }} </a >
18
- </li >
19
- {{ /each }}
20
- </ul >
21
- </li >
15
+ {{ #unless (eq " noversion" ./latest.version )}}
16
+ <li class =" component{{ #if (eq this @root.page.component )}} is-current{{ /if }} " >
17
+ <a class =" title" href =" {{{ relativize ./url }}} " >{{{ ./title }}} </a >
18
+ <ul class =" versions" >
19
+ {{ #each ./versions }}
20
+ <li class =" version
21
+ {{ ~#if (and (eq .. @root.page.component ) (eq this @root.page.componentVersion ))}} is-current{{ /if ~}}
22
+ {{ ~#if (eq this ../latest )}} is-latest{{ /if }} " >
23
+ <a href =" {{{ relativize ./url }}} " >{{ ./displayVersion }} </a >
24
+ </li >
25
+ {{ /each }}
26
+ </ul >
27
+ </li >
28
+ {{ /unless }}
22
29
{{ /each }}
23
30
</ul >
24
31
</div >
Original file line number Diff line number Diff line change 1
1
{{ #with page.versions }}
2
2
<div class =" page-versions" >
3
+ {{ #unless (eq " noversion" @root.page.componentVersion.displayVersion )}}
3
4
<button class =" version-menu-toggle" title =" Show other versions of page" >{{ @root.page.componentVersion.displayVersion }} </button >
4
5
<div class =" version-menu" >
5
6
{{ #each this }}
6
- <a class =" version
7
- {{ ~#if (eq ./version @root.page.version )}} is-current{{ /if ~}}
8
- {{ ~#if ./missing }} is-missing{{ /if }} " href =" {{{ relativize ./url }}} " >{{ ./displayVersion }} </a >
7
+ <a class =" version
8
+ {{ ~#if (eq ./version @root.page.version )}} is-current{{ /if ~}}
9
+ {{ ~#if ./missing }} is-missing{{ /if }} " href =" {{{ relativize ./url }}} " >{{ ./displayVersion }} </a >
9
10
{{ /each }}
10
11
</div >
12
+ {{ /unless }}
11
13
</div >
12
14
{{ /with }}
You can’t perform that action at this time.
0 commit comments