Skip to content

Commit 418d9ba

Browse files
authored
Merge pull request #66 from opendevise/persist-tab-selections
upgrade Asciidoctor Tabs; persist tab selection across pages
2 parents 689ddc9 + 03212fa commit 418d9ba

File tree

5 files changed

+84
-8
lines changed

5 files changed

+84
-8
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
],
1919
"devDependencies": {
2020
"@asciidoctor/core": "~2.2",
21-
"@asciidoctor/tabs": "1.0.0-alpha.12",
21+
"@asciidoctor/tabs": "1.0.0-beta.3",
2222
"@fontsource/roboto": "~4.5",
2323
"@fontsource/roboto-mono": "~4.5",
2424
"@springio/asciidoctor-extensions": "1.0.0-alpha.8",
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,80 @@
11
= Authentication
22
:antora-page-url: /features/authentication/index.html
3+
:tabs-sync-option:
34

45
this is about authentication
6+
7+
ifdef::asciidoctor-tabs-loaded[]
8+
.`FilterChain` Usage Example
9+
[tabs]
10+
====
11+
Java::
12+
+
13+
[,java]
14+
----
15+
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
16+
// do something before the rest of the application
17+
chain.doFilter(request, response); // invoke the rest of the application
18+
// do something after the rest of the application
19+
}
20+
----
21+
22+
Kotlin::
23+
+
24+
[,kotlin]
25+
----
26+
fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain) {
27+
// do something before the rest of the application
28+
chain.doFilter(request, response) // invoke the rest of the application
29+
// do something after the rest of the application
30+
}
31+
----
32+
33+
Wide Table::
34+
+
35+
|===
36+
|Spring Boot 2.x |ClientRegistration
37+
38+
|`spring.security.oauth2.client.registration._[registrationId]_`
39+
|`registrationId`
40+
41+
|`spring.security.oauth2.client.registration._[registrationId]_.client-id`
42+
|`clientId`
43+
44+
|`spring.security.oauth2.client.registration._[registrationId]_.client-secret`
45+
|`clientSecret`
46+
47+
|`spring.security.oauth2.client.registration._[registrationId]_.client-authentication-method`
48+
|`clientAuthenticationMethod`
49+
50+
|`spring.security.oauth2.client.registration._[registrationId]_.authorization-grant-type`
51+
|`authorizationGrantType`
52+
|===
53+
+
54+
The table should fit within the tab panel and scroll horizontally.
55+
====
56+
endif::[]
57+
ifndef::asciidoctor-tabs-loaded[]
58+
.`FilterChain` Usage Example
59+
====
60+
.Java
61+
[source,java,role="primary"]
62+
----
63+
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
64+
// do something before the rest of the application
65+
chain.doFilter(request, response); // invoke the rest of the application
66+
// do something after the rest of the application
67+
}
68+
----
69+
70+
.Kotlin
71+
[source,kotlin,role="secondary"]
72+
----
73+
fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain) {
74+
// do something before the rest of the application
75+
chain.doFilter(request, response) // invoke the rest of the application
76+
// do something after the rest of the application
77+
}
78+
----
79+
====
80+
endif::[]

src/css/vendor/asciidoctor-tabs.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
content: none;
4545
}
4646

47-
.doc .tabs:not(.is-loading) .tablist > ul li {
47+
.doc .tabs.is-loaded .tablist > ul li {
4848
transition: background-color 200ms ease-in-out, color 100ms linear;
4949
}
5050

src/partials/footer-scripts.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<script id="site-script" src="{{{uiRootPath}}}/js/site.js" data-ui-root-path="{{{uiRootPath}}}"></script>
1+
<script src="{{{uiRootPath}}}/js/site.js"></script>
22
<script async src="{{{uiRootPath}}}/js/vendor/highlight.js"></script>
3-
<script async src="{{{uiRootPath}}}/js/vendor/{{#if (asciidocExtensionRegistered '@asciidoctor/tabs')}}asciidoctor{{else}}spring{{/if}}-tabs.js"></script>
3+
<script async src="{{{uiRootPath}}}/js/vendor/{{#if (asciidocExtensionRegistered '@asciidoctor/tabs')}}asciidoctor{{else}}spring{{/if}}-tabs.js" data-sync-storage-key="docs:preferred-tab"></script>
44
{{#if env.ALGOLIA_API_KEY}}
55
<script async id="search-script" src="{{{uiRootPath}}}/js/vendor/docsearch.js"{{#if env.ALGOLIA_APP_ID}} data-app-id="{{env.ALGOLIA_APP_ID}}"{{/if}} data-api-key="{{env.ALGOLIA_API_KEY}}" data-index-name="{{env.ALGOLIA_INDEX_NAME}}" data-stylesheet="{{{uiRootPath}}}/css/vendor/docsearch.css"></script>
66
{{/if}}

0 commit comments

Comments
 (0)