From 7e3b08add6cd2caf24f44a9036ff511977db6e47 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 13 Mar 2024 11:41:59 -0700 Subject: [PATCH 01/26] Improve breadcrumb styling Use a consistent color for both links and regular text and provide a little more margin from for the header. --- src/css/spring/spring-doc.css | 19 ++++++++++++------- src/css/vars.css | 4 ++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/css/spring/spring-doc.css b/src/css/spring/spring-doc.css index 647baa9..2363c01 100644 --- a/src/css/spring/spring-doc.css +++ b/src/css/spring/spring-doc.css @@ -140,13 +140,7 @@ mark { .doc > h1#page-title { font-size: calc(42 / var(--rem-base) * 1rem); - margin: 0.2rem 0; -} - -@media screen and (min-width: 769px) { - .doc > h1#page-title { - margin-top: 0.2rem; - } + margin: 0.8rem 0 0.2rem 0; } .doc > h1#page-title + aside.toc.embedded { @@ -309,3 +303,14 @@ mark { .admonitionblock.latest { padding: 1.5rem 1rem 0; } + +/* Improve Breadcrumbs */ + +.breadcrumbs, +.breadcrumbs a { + color: var(--breadcrumb-font-color); +} + +.breadcrumbs a:hover { + color: var(--breadcrumb-hover-font-color); +} diff --git a/src/css/vars.css b/src/css/vars.css index 8b35acc..9265498 100644 --- a/src/css/vars.css +++ b/src/css/vars.css @@ -154,6 +154,10 @@ --page-version-menu-background: var(--color-smoke-70); --page-version-missing-font-color: var(--color-gray-30); + /* Breadcrumbs */ + --breadcrumb-font-color: var(--body-font-light-color); + --breadcrumb-hover-font-color: var(--link_hover-font-color); + /* Doc */ --doc-font-color: var(--body-font-color); --doc-font-size: inherit; From 69bc17aed3ff4f52fae2d964181638b05de8e7f7 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Tue, 19 Mar 2024 11:48:05 +0100 Subject: [PATCH 02/26] feat: 404 page See #210 --- src/css/spring/spring-404.css | 20 ++++++++++++++++++++ src/css/spring/spring-site.css | 1 + src/js/01-nav.js | 17 +++++++++++------ src/layouts/404.hbs | 6 +++++- src/partials/article-404.hbs | 18 ++++++++---------- 5 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 src/css/spring/spring-404.css diff --git a/src/css/spring/spring-404.css b/src/css/spring/spring-404.css new file mode 100644 index 0000000..22f1c78 --- /dev/null +++ b/src/css/spring/spring-404.css @@ -0,0 +1,20 @@ +body.status-404 .page-404 { + text-align: center; + margin: 0 auto; + padding: 4rem 0; +} +body.status-404 h1.page { + color: #6db33f; + font-size: 130px; + font-weight: 100; + line-height: 110px; + margin: 0; + padding: 0; + font-family: var(--body-font-family); +} +body.status-404 .strong { + font-weight: bold; +} +body.status-404 a { + color: #086dc3; +} diff --git a/src/css/spring/spring-site.css b/src/css/spring/spring-site.css index eae04b9..d1c5597 100644 --- a/src/css/spring/spring-site.css +++ b/src/css/spring/spring-site.css @@ -17,4 +17,5 @@ @import "spring-base.css"; @import "spring-doc.css"; @import "spring-toc.css"; +@import "spring-404.css"; @import "spring-switchtheme.css"; diff --git a/src/js/01-nav.js b/src/js/01-nav.js index d9378a5..1ea46dc 100644 --- a/src/js/01-nav.js +++ b/src/js/01-nav.js @@ -8,12 +8,17 @@ var navToggle1 = document.querySelector('#nav-toggle-1') var navToggle2 = document.querySelector('#nav-toggle-2') var isNavOpen = window.localStorage && window.localStorage.getItem('sidebar') === 'open' - - navToggle1.addEventListener('click', showNav) - navToggle2.addEventListener('click', showNav) - navContainer.addEventListener('click', trapEvent) - - var menuPanel = navContainer.querySelector('[data-panel=menu]') + if (navToggle1) { + navToggle1.addEventListener('click', showNav) + } + if (navToggle2) { + navToggle2.addEventListener('click', showNav) + } + var menuPanel + if (navContainer) { + navContainer.addEventListener('click', trapEvent) + menuPanel = navContainer.querySelector('[data-panel=menu]') + } if (!menuPanel) return var nav = navContainer.querySelector('.nav') diff --git a/src/layouts/404.hbs b/src/layouts/404.hbs index 8caab1d..3cdf5af 100644 --- a/src/layouts/404.hbs +++ b/src/layouts/404.hbs @@ -5,7 +5,11 @@ {{> header}} -{{> body}} +
+
+{{> article-404}} +
+
{{> footer}} diff --git a/src/partials/article-404.hbs b/src/partials/article-404.hbs index 436b280..c6ae38e 100644 --- a/src/partials/article-404.hbs +++ b/src/partials/article-404.hbs @@ -1,10 +1,8 @@ -
-

{{{or page.title 'Page Not Found'}}}

-
-

The page you’re looking for does not exist. It may have been moved. You can{{#with site.homeUrl}} return to the start page, or{{/with}} follow one of the links in the navigation to the left.

-
-
-

If you arrived on this page by clicking on a link, please notify the owner of the site that the link is broken. -If you typed the URL of this page manually, please double check that you entered the address correctly.

-
-
+
+

404

+
+

Oops! The page can’t be found.

+

{{#with site.homeUrl}}Go to + homepage{{/with}}

+
+
\ No newline at end of file From 7194a257abec427cccadc02fdcc2c18f77bc38ab Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 21 Mar 2024 22:32:43 +0900 Subject: [PATCH 03/26] fix: Replace "Github" with "GitHub" --- src/partials/footer-content.hbs | 2 +- src/partials/toc.hbs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/partials/footer-content.hbs b/src/partials/footer-content.hbs index 63c3356..e16688b 100644 --- a/src/partials/footer-content.hbs +++ b/src/partials/footer-content.hbs @@ -7,7 +7,7 @@
- +
diff --git a/src/partials/toc.hbs b/src/partials/toc.hbs index 54e9165..501b00f 100644 --- a/src/partials/toc.hbs +++ b/src/partials/toc.hbs @@ -37,7 +37,7 @@ {{/if}} {{#if page.origin.webUrl}} - + - \ No newline at end of file + From 4a389118a2a6941ec730c24f801ca04ea1f9d39a Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Fri, 22 Mar 2024 14:55:04 +0100 Subject: [PATCH 04/26] feat: Update preview Anonymise projects Update asciidoc test page --- preview-src/1.0/index.adoc | 5 + preview-src/{5.5 => 1.0}/index.adoc.yml | 16 +- preview-src/5.5/index.adoc | 3 - preview-src/{session => baz}/index.adoc | 2 +- preview-src/{session => baz}/index.adoc.yml | 8 +- .../features/authentication/index.adoc | 80 - .../features/authentication/index.adoc.yml | 27 - preview-src/features/exploits/index.adoc | 4 - preview-src/features/exploits/index.adoc.yml | 27 - preview-src/features/index.adoc | 5 - preview-src/index.adoc | 598 +------- preview-src/index.adoc.yml | 6 +- preview-src/samples/content/index.adoc | 1328 +++++++++++++++++ preview-src/samples/content/index.adoc.yml | 23 + preview-src/samples/edge-cases/index.adoc | 124 ++ preview-src/samples/edge-cases/index.adoc.yml | 27 + preview-src/samples/index.adoc | 5 + .../{features => samples}/index.adoc.yml | 18 +- preview-src/search.adoc.yml | 6 +- preview-src/spring-projects.adoc.yml | 6 +- preview-src/ui-model.yml | 139 +- 21 files changed, 1611 insertions(+), 846 deletions(-) create mode 100644 preview-src/1.0/index.adoc rename preview-src/{5.5 => 1.0}/index.adoc.yml (60%) delete mode 100644 preview-src/5.5/index.adoc rename preview-src/{session => baz}/index.adoc (75%) rename preview-src/{session => baz}/index.adoc.yml (68%) delete mode 100644 preview-src/features/authentication/index.adoc delete mode 100644 preview-src/features/authentication/index.adoc.yml delete mode 100644 preview-src/features/exploits/index.adoc delete mode 100644 preview-src/features/exploits/index.adoc.yml delete mode 100644 preview-src/features/index.adoc create mode 100644 preview-src/samples/content/index.adoc create mode 100644 preview-src/samples/content/index.adoc.yml create mode 100644 preview-src/samples/edge-cases/index.adoc create mode 100644 preview-src/samples/edge-cases/index.adoc.yml create mode 100644 preview-src/samples/index.adoc rename preview-src/{features => samples}/index.adoc.yml (53%) diff --git a/preview-src/1.0/index.adoc b/preview-src/1.0/index.adoc new file mode 100644 index 0000000..001fba7 --- /dev/null +++ b/preview-src/1.0/index.adoc @@ -0,0 +1,5 @@ += Spring Foobar + +Spring Foobar v1.0. + + diff --git a/preview-src/5.5/index.adoc.yml b/preview-src/1.0/index.adoc.yml similarity index 60% rename from preview-src/5.5/index.adoc.yml rename to preview-src/1.0/index.adoc.yml index fd19080..34c4c24 100644 --- a/preview-src/5.5/index.adoc.yml +++ b/preview-src/1.0/index.adoc.yml @@ -1,13 +1,13 @@ -url: /5.5/index.html +url: /1.0/index.html component: - name: security -version: '5.5.9' + name: foobar +version: '1.0.0' latest: url: '/index.html' - version: '6.0.2' - displayVersion: '6.0.2' - title: 'Spring Security' - versionSegment: '5.6' + version: '2.0.0' + displayVersion: '2.0.0' + title: 'Spring Foobar' + versionSegment: '2.0' previous: content: Quickstart url: '#' @@ -17,7 +17,7 @@ next: url: '#' urlType: 'internal' breadcrumbs: - - content: Spring Security + - content: Spring Foobar url: '#' urlType: fragment - content: Overview diff --git a/preview-src/5.5/index.adoc b/preview-src/5.5/index.adoc deleted file mode 100644 index adf3e95..0000000 --- a/preview-src/5.5/index.adoc +++ /dev/null @@ -1,3 +0,0 @@ -= Spring Security - -This is 5.5 version so we can test updating to the latest version of something. diff --git a/preview-src/session/index.adoc b/preview-src/baz/index.adoc similarity index 75% rename from preview-src/session/index.adoc rename to preview-src/baz/index.adoc index 00e3636..952df26 100644 --- a/preview-src/session/index.adoc +++ b/preview-src/baz/index.adoc @@ -1,3 +1,3 @@ -= Spring Session += Spring Baz This only has a single version so we can test that. diff --git a/preview-src/session/index.adoc.yml b/preview-src/baz/index.adoc.yml similarity index 68% rename from preview-src/session/index.adoc.yml rename to preview-src/baz/index.adoc.yml index 2e8b15c..0b66e61 100644 --- a/preview-src/session/index.adoc.yml +++ b/preview-src/baz/index.adoc.yml @@ -1,7 +1,7 @@ -url: /session/index.html +url: /baz/index.html component: - name: session -version: '2.5.9' + name: baz +version: '1.0.0' previous: content: Quickstart url: '#' @@ -11,6 +11,6 @@ next: url: '#' urlType: 'internal' breadcrumbs: - - content: Spring Session + - content: Spring Baz url: '#' urlType: fragment diff --git a/preview-src/features/authentication/index.adoc b/preview-src/features/authentication/index.adoc deleted file mode 100644 index 5e0710f..0000000 --- a/preview-src/features/authentication/index.adoc +++ /dev/null @@ -1,80 +0,0 @@ -= Authentication -:antora-page-url: /features/authentication/index.html -:tabs-sync-option: - -this is about authentication - -ifdef::asciidoctor-tabs-loaded[] -.`FilterChain` Usage Example -[tabs] -==== -Java:: -+ -[,java] ----- -public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) { - // do something before the rest of the application - chain.doFilter(request, response); // invoke the rest of the application - // do something after the rest of the application -} ----- - -Kotlin:: -+ -[,kotlin] ----- -fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain) { - // do something before the rest of the application - chain.doFilter(request, response) // invoke the rest of the application - // do something after the rest of the application -} ----- - -Wide Table:: -+ -|=== -|Spring Boot 2.x |ClientRegistration - -|`spring.security.oauth2.client.registration._[registrationId]_` -|`registrationId` - -|`spring.security.oauth2.client.registration._[registrationId]_.client-id` -|`clientId` - -|`spring.security.oauth2.client.registration._[registrationId]_.client-secret` -|`clientSecret` - -|`spring.security.oauth2.client.registration._[registrationId]_.client-authentication-method` -|`clientAuthenticationMethod` - -|`spring.security.oauth2.client.registration._[registrationId]_.authorization-grant-type` -|`authorizationGrantType` -|=== -+ -The table should fit within the tab panel and scroll horizontally. -==== -endif::[] -ifndef::asciidoctor-tabs-loaded[] -.`FilterChain` Usage Example -==== -.Java -[source,java,role="primary"] ----- -public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) { - // do something before the rest of the application - chain.doFilter(request, response); // invoke the rest of the application - // do something after the rest of the application -} ----- - -.Kotlin -[source,kotlin,role="secondary"] ----- -fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain) { - // do something before the rest of the application - chain.doFilter(request, response) // invoke the rest of the application - // do something after the rest of the application -} ----- -==== -endif::[] diff --git a/preview-src/features/authentication/index.adoc.yml b/preview-src/features/authentication/index.adoc.yml deleted file mode 100644 index 9f7bf9c..0000000 --- a/preview-src/features/authentication/index.adoc.yml +++ /dev/null @@ -1,27 +0,0 @@ -url: /features/authentication/index.html -component: - name: security -version: '6.1.0' -latest: - url: '/features/authentication/index.html' - version: '6.1.0' - displayVersion: '6.1.0' - title: Spring Security -previous: - content: Quickstart - url: '#' - urlType: 'internal' -next: - content: Liber Recusabo - url: '#' - urlType: 'internal' -breadcrumbs: - - content: Spring Security - url: '#' - urlType: fragment - - content: Features - url: '#' - urlType: fragment - - content: Authentication - url: '#' - urlType: fragment diff --git a/preview-src/features/exploits/index.adoc b/preview-src/features/exploits/index.adoc deleted file mode 100644 index 4bfd475..0000000 --- a/preview-src/features/exploits/index.adoc +++ /dev/null @@ -1,4 +0,0 @@ -= Protection Against Exploits -:antora-page-url: /features/exploits/index.html - -This is about exploits diff --git a/preview-src/features/exploits/index.adoc.yml b/preview-src/features/exploits/index.adoc.yml deleted file mode 100644 index 99be3eb..0000000 --- a/preview-src/features/exploits/index.adoc.yml +++ /dev/null @@ -1,27 +0,0 @@ -url: /features/exploits/index.html -component: - name: security -version: '6.1.0' -latest: - url: '/features/exploits/index.html' - version: '6.1.0' - displayVersion: '6.1.0' - title: Spring Security -previous: - content: Quickstart - url: '#' - urlType: 'internal' -next: - content: Liber Recusabo - url: '#' - urlType: 'internal' -breadcrumbs: - - content: Spring Security - url: '#' - urlType: fragment - - content: Features - url: '#' - urlType: fragment - - content: Protection Against Exploits - url: '#' - urlType: fragment diff --git a/preview-src/features/index.adoc b/preview-src/features/index.adoc deleted file mode 100644 index e0c5a1a..0000000 --- a/preview-src/features/index.adoc +++ /dev/null @@ -1,5 +0,0 @@ -= Features -:antora-page-url: /features/index.html -:page-section-summary-toc: true - -This contains a listing of features diff --git a/preview-src/index.adoc b/preview-src/index.adoc index a8ec6bf..108eccf 100644 --- a/preview-src/index.adoc +++ b/preview-src/index.adoc @@ -1,597 +1,3 @@ -= Introduction -:page-author: Jon Doe, Eric Doe -:idprefix: -:idseparator: - -:!example-caption: -:!table-caption: -:page-pagination: -:chomp-package-replacement: com.acme -:tabs-sync-option: -:page-related-doc-categories: security -:page-related-doc-projects: framework += Overview -image:multirepo-ssg.svg[Multirepo SSG,200,float=right] -Platonem complectitur mediocritatem ea eos. -Ei nonumy deseruisse ius. -Mel id omnes verear. -Vis no velit audiam, sonet <> eum ne. -*Prompta eripuit* nec ad. -Integer diam enim, dignissim eget eros et, ultricies mattis odio. -Vestibulum consectetur nec urna a luctus. -Quisque pharetra tristique arcu fringilla dapibus. -https://example.org[Curabitur,role=unresolved] ut massa aliquam, cursus enim et, accumsan lectus. - -== Cu solet - -Nominavi luptatum eos, an vim hinc philosophia intellegebat. -Lorem pertinacia `expetenda` et nec, [.underline]#wisi# illud [.line-through]#sonet# qui ea. -Eum an doctus <>. -Eu mea inani iriure. - -[source,json] ----- -{ - "name": "module-name", - "version": "10.0.1", - "description": "An example module to illustrate the usage of package.json", - "author": "Author Name ", - "scripts": { - "test": "mocha", - "lint": "eslint" - } -} ----- - -.Example paragraph syntax -[source,asciidoc] ----- -.Optional title -[example] -This is an example paragraph. ----- - -.Optional title -[example] -This is an example paragraph. - -=== Code Folding - -Fold with no replacement text. - -[,java] ----- -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class MyApplication { - public static void main(String[] args) { - // @fold:on - // @formatter:off - SpringApplication.run(MyApplication.class, args); - // @formatter:on - // @fold:off - } -} ----- - -Same fold with replacement text. - -[,java] ----- -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class MyApplication { - public static void main(String[] args) { - // @fold:on // reveal logic... - // @formatter:off - SpringApplication.run(MyApplication.class, args); - // @formatter:on - // @fold:off - } -} ----- - -Another example of folds. - -[,java,chomp=all] ----- -package org.example; - -import java.net.InetAddress; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.springframework.boot.context.properties.ConfigurationProperties; - -@ConfigurationProperties("my.service") -public class MyProperties { - // @fold:on // fields... - private boolean enabled; - - private InetAddress remoteAddress; - - private final Security security = /* @chomp:line // instantiate your instance of the Security class... */ new Security(); - // @fold:off - - // @fold:on // getters / setters... - public boolean isEnabled() { - return this.enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public InetAddress getRemoteAddress() { - return this.remoteAddress; - } - - public void setRemoteAddress(InetAddress remoteAddress) { - this.remoteAddress = remoteAddress; - } - - public Security getSecurity() { - return this.security; - } - // @fold:off -} ----- - -=== Tabs - -You can have code in different tabs: - -ifdef::asciidoctor-tabs-loaded[] -.`FilterChain` Usage Example -[tabs] -==== -Java:: -+ -[,java] ----- -public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) { - // do something before the rest of the application - chain.doFilter(request, response); // invoke the rest of the application - // do something after the rest of the application -} ----- - -Kotlin:: -+ -[,kotlin] ----- -fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain) { - // do something before the rest of the application - chain.doFilter(request, response) // invoke the rest of the application - // do something after the rest of the application -} ----- - -Wide Table:: -+ -|=== -|Spring Boot 2.x |ClientRegistration - -|`spring.security.oauth2.client.registration._[registrationId]_` -|`registrationId` - -|`spring.security.oauth2.client.registration._[registrationId]_.client-id` -|`clientId` - -|`spring.security.oauth2.client.registration._[registrationId]_.client-secret` -|`clientSecret` - -|`spring.security.oauth2.client.registration._[registrationId]_.client-authentication-method` -|`clientAuthenticationMethod` - -|`spring.security.oauth2.client.registration._[registrationId]_.authorization-grant-type` -|`authorizationGrantType` -|=== -+ -The table should fit within the tab panel and scroll horizontally. -==== -endif::[] -ifndef::asciidoctor-tabs-loaded[] -.`FilterChain` Usage Example -==== -.Java -[source,java,role="primary"] ----- -public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) { - // do something before the rest of the application - chain.doFilter(request, response); // invoke the rest of the application - // do something after the rest of the application -} ----- - -.Kotlin -[source,kotlin,role="secondary"] ----- -fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain) { - // do something before the rest of the application - chain.doFilter(request, response) // invoke the rest of the application - // do something after the rest of the application -} ----- -==== -endif::[] - -=== Some Code - -How about some code? - -[source,js] ----- -vfs - .src('js/vendor/*.js', { cwd: 'src', cwdbase: true, read: false }) - .pipe(tap((file) => { // <1> - file.contents = browserify(file.relative, { basedir: 'src', detectGlobals: false }).bundle() - })) - .pipe(buffer()) // <2> - .pipe(uglify()) - .pipe(gulp.dest('build')) ----- -<1> The tap function is used to wiretap the data in the pipe. -<2> Wrap each streaming file in a buffer so the files can be processed by uglify. -Uglify can only work with buffers, not streams. - -Execute these commands to validate and build your site: - - $ podman run -v $PWD:/antora:Z --rm -t antora/antora \ - version - 3.0.0 - $ podman run -v $PWD:/antora:Z --rm -it antora/antora \ - --clean \ - antora-playbook.yml - -Cum dicat #putant# ne. -Est in <> homero principes, meis deleniti mediocrem ad has. -Altera atomorum his ex, has cu elitr melius propriae. -Eos suscipit scaevola at. - -.... -pom.xml -src/ - main/ - java/ - HelloWorld.java - test/ - java/ - HelloWorldTest.java -.... - -Eu mea munere vituperata constituam. - -[%autowidth] -|=== -|Input | Output | Example - -m|"foo\nbar" -l|foo -bar -a| -[source,ruby] ----- -puts "foo\nbar" ----- -|=== - -Select menu:File[Open Project] to open the project in your IDE. -Per ea btn:[Cancel] inimicus. -Ferri kbd:[F11] tacimates constituam sed ex, eu mea munere vituperata kbd:[Ctrl,T] constituam. - -.Sidebar Title -**** -Platonem complectitur mediocritatem ea eos. -Ei nonumy deseruisse ius. -Mel id omnes verear. - -Altera atomorum his ex, has cu elitr melius propriae. -Eos suscipit scaevola at. -**** - -=== Liber recusabo - -No sea, at invenire voluptaria mnesarchum has. -Ex nam suas nemore dignissim, vel apeirian democritum et. -At ornatus splendide sed, phaedrum omittantur usu an, vix an noster voluptatibus. - -[upperalpha] -. potenti donec cubilia tincidunt -. etiam pulvinar inceptos velit quisque aptent himenaeos -. lacus volutpat semper porttitor aliquet ornare primis nulla enim - -Natum facilisis theophrastus an duo. -No sea, at invenire voluptaria mnesarchum has. - -[square] -* ultricies sociosqu tristique integer -* lacus volutpat semper porttitor aliquet ornare primis nulla enim -* etiam pulvinar inceptos velit quisque aptent himenaeos - -Eu sed antiopam gloriatur. -Ea mea agam graeci philosophia. - -* [ ] todo -* [x] done! - -Vis veri graeci legimus ad. - -sed:: -splendide sed - -mea:: -agam graeci - -Let's look at that another way. - -[horizontal] -sed:: -splendide sed - -mea:: -agam graeci - -At ornatus splendide sed. - -.Library dependencies -[#dependencies%footer,stripes=hover] -|=== -|Library |Version - -|eslint -|^1.7.3 - -|eslint-config-gulp -|^2.0.0 - -|expect -|^1.20.2 - -|istanbul -|^0.4.3 - -|istanbul-coveralls -|^1.0.3 - -|jscs -|^2.3.5 - -h|Total -|6 -|=== - -Cum dicat putant ne. -Est in reque homero principes, meis deleniti mediocrem ad has. -Altera atomorum his ex, has cu elitr melius propriae. -Eos suscipit scaevola at. - -[TIP] -This oughta do it! - -Cum dicat putant ne. -Est in reque homero principes, meis deleniti mediocrem ad has. -Altera atomorum his ex, has cu elitr melius propriae. -Eos suscipit scaevola at. - -[NOTE] -==== -You've been down _this_ road before. -==== - -Cum dicat putant ne. -Est in reque homero principes, meis deleniti mediocrem ad has. -Altera atomorum his ex, has cu elitr melius propriae. -Eos suscipit scaevola at. - -[WARNING] -==== -Watch out! -==== - -[CAUTION] -==== -[#inline]#I wouldn't try that if I were you.# -==== - -[IMPORTANT] -==== -Don't forget this step! -==== - -.Key Points to Remember -[TIP] -==== -If you installed the CLI and the default `site-generator` globally, you can upgrade both of them with the same command. - - $ npm i -g @antora/cli @antora/site-generator-default -==== - -Nominavi luptatum eos, an vim hinc philosophia intellegebat. -Eu mea inani iriure. - -[discrete] -== Voluptua singulis - -Cum dicat putant ne. -Est in reque homero principes, meis deleniti mediocrem ad has. -Ex nam suas nemore dignissim, vel apeirian democritum et. - -.Antora is a multi-repo documentation site generator -image::multirepo-ssg.svg[Multirepo SSG,250] - -Make the switch today! - -[#english+中文] -== English + 中文 - -Altera atomorum his ex, has cu elitr melius propriae. -Eos suscipit scaevola at. - -[quote, 'Famous Person. Cum dicat putant ne.', 'Cum dicat putant ne. https://example.com[Famous Person Website]'] -____ -Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Mauris eget leo nunc, nec tempus mi? Curabitur id nisl mi, ut vulputate urna. -Quisque porta facilisis tortor, vitae bibendum velit fringilla vitae! Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Mauris eget leo nunc, nec tempus mi? Curabitur id nisl mi, ut vulputate urna. -Quisque porta facilisis tortor, vitae bibendum velit fringilla vitae! -____ - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. - -[verse] -____ -The fog comes -on little cat feet. -____ - -== Font Awesome - -Showing a gear icon: icon:gear[] - -== Headers - -=== H3 - -==== H4 - -===== H5 - -====== H6 - - -== Edge cases - -There are a few things that can trip our stylesheet up if we're not careful: - - -=== Title with Code (`withcode`) - -Restdocs uses these and they should look nice. - -=== Long Tables - -A table with long entries and no breakable space. - -[cols="1,2", options="header"] -.Issues -|=== -|Name -|Description - -|VeryLongNameWithoutBreakableSpaceVeryLongNameWithoutBreakableSpaceVeryLongNameWithoutBreakableSpaceVeryLongNameWithoutBreakableSpace -|This is an edge case - -|Name -|Another entry -|=== - -That's the end of that. - - - -=== Another Long Table - -When a Spring Boot application starts: - -[cols="2,2,2,3,5"] -|=== -|Startup phase |LivenessState |ReadinessState |HTTP server |Notes - -|Starting -|`BROKEN` -|`REFUSING_TRAFFIC` -|Not started -|Kubernetes checks the "liveness" Probe and restarts the application if it takes too long. - -|Started -|`CORRECT` -|`REFUSING_TRAFFIC` -|Refuses requests -|The application context is refreshed. The application performs startup tasks and does not receive traffic yet. - -|Ready -|`CORRECT` -|`ACCEPTING_TRAFFIC` -|Accepts requests -|Startup tasks are finished. The application is receiving traffic. -|=== - -When a Spring Boot application shuts down: - -[cols="2,2,2,3,5"] -|=== -|Shutdown phase |Liveness State |Readiness State |HTTP server |Notes - -|Running -|`CORRECT` -|`ACCEPTING_TRAFFIC` -|Accepts requests -|Shutdown has been requested. - -|Graceful shutdown -|`CORRECT` -|`REFUSING_TRAFFIC` -|New requests are rejected -|If enabled, <>. - -|Shutdown complete -|N/A -|N/A -|Server is shut down -|The application context is closed and the application is shut down. -|=== - -TIP: Check out the Kubernetes container lifecycle section for more information about Kubernetes deployment. - - - -=== Long Shell Blocks - -A shell code block can also break things: - -[indent=0,subs="attributes"] ----- - . ____ _ __ _ _ - /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ -( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ - \\/ ___)| |_)| | | | | || (_| | ) ) ) ) - ' |____| .__|_| |_|_| |_\__, | / / / / - =========|_|==============|___/=/_/_/_/ - :: Spring Boot :: v{spring-boot-version} - -2019-04-31 13:09:54.117 INFO 56603 --- [ main] o.s.b.s.app.SampleApplication : Starting SampleApplication v0.1.0 on mycomputer with PID 56603 (/apps/myapp.jar started by pwebb) -2019-04-31 13:09:54.166 INFO 56603 --- [ main] ationConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6e5a8246: startup date [Wed Jul 31 00:08:16 PDT 2013]; root of context hierarchy -2019-04-01 13:09:56.912 INFO 41370 --- [ main] .t.TomcatServletWebServerFactory : Server initialized with port: 8080 -2019-04-01 13:09:57.501 INFO 41370 --- [ main] o.s.b.s.app.SampleApplication : Started SampleApplication in 2.992 seconds (JVM running for 3.658) ----- - - -=== Code With `nowrap` - -Have some HTTP that also has `nowrap` set: - -[source,http,options="nowrap"] ----- -HTTP/1.1 200 OK -Content-Type: application/vnd.spring-boot.actuator.v3+json -Content-Length: 121 -{ - "events" : [ { - "timestamp" : "2021-03-18T16:49:30.625Z", - "principal" : "alice", - "type" : "logout" - } ] -} ----- - - - - -== Fin - -That's all, folks! +Antora UI Spring theme. diff --git a/preview-src/index.adoc.yml b/preview-src/index.adoc.yml index e05205f..6635a04 100644 --- a/preview-src/index.adoc.yml +++ b/preview-src/index.adoc.yml @@ -1,7 +1,7 @@ url: /index.html component: - name: security -version: '6.1.5' + name: foobar +version: '2.0.0' latest: url: '/index.html' previous: @@ -13,7 +13,7 @@ next: url: '#' urlType: 'internal' breadcrumbs: - - content: Spring Security + - content: Spring Foobar url: '#' urlType: fragment - content: Overview diff --git a/preview-src/samples/content/index.adoc b/preview-src/samples/content/index.adoc new file mode 100644 index 0000000..cadb0e5 --- /dev/null +++ b/preview-src/samples/content/index.adoc @@ -0,0 +1,1328 @@ += Content +:antora-page-url: /samples/exploits/index.html +:page-author: Author 1, Author 2, Author 3, Author 4 +:idprefix: +:idseparator: - +:page-pagination: + +This page uses for testings **asciidoc semantic markup**. Inspired by +https://gitlab.univ-nantes.fr/bousse-e/stereopticon/-/blob/master/asciidoc-tests/index.adoc[Source] + +[.impact] +== Basics + +=== Heading and paragraphs + +==== This is an asciidoc level 3 heading + +One paragraph. + +Two paragraphs. + +=== Line Breaks + +==== Plus sign + +Rubies are red, + +Topazes are blue. + +==== Hardbreaks option + +[%hardbreaks] +Ruby is red. +Java is black. + +=== Lead style + +[.lead] +This is a lead paragraph. + + +=== Horizontal Rules + +above + +''' + +below + +=== Horizontal Rules (various syntaxes) + +--- + +- - - + +*** + +* * * + + +=== Page break + +Content before + +<<< + +Content after + +=== URLs + +The homepage for the Asciidoctor Project is https://asciidoctor.org. + +Ask questions on the http://discuss.asciidoctor.org/[*mailing list*]. + +=== Link to Relative Files + +link:protocol.json[Open the JSON file] + + +=== Footnote + +The hail-and-rainbow protocol can be initiated at five levels: +double, tertiary, supernumerary, supermassive, and apocalyptic party. +A bold statement! + +Another outrageous statement.footnote:disclaimer[] + +footnote:[The double hail-and-rainbow level makes my toes tingle.] +footnote:disclaimer[Opinions are my own.] + + +[.impact] +== Images + +=== Images + +==== Alone + +[#img-sunset] +.A mountain sunset +[link=https://www.flickr.com/photos/javh/5448336655] +image::/_/img/spring-logo.svg[Spring,300,200] + +==== Inline + +Click image:/_/img/chevron.svg[Play, 10,10] to get the party started. + + + +You can find image:https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg[Linux,25,35] everywhere these days. + + +=== Control the float + +[.float-group] +-- +[.left] +.Image A +image::/_/img/spring-logo.svg[A,240,180] + +[.left] +.Image B +image::/_/img/spring-logo.svg[B,240,180] +-- + +Text below images. + + +=== Sizing images (1) + +image::/_/img/spring-logo.svg[Spring,640,480] + +=== Sizing images (2) + +image::/_/img/spring-logo.svg[Spring,50%] + + +=== Taming SVGs + +image::/_/img/spring-logo.svg[Static,300] + +image::/_/img/spring-logo.svg[Interactive,300,opts=interactive] + +image::/_/img/spring-logo.svg[Embedded,300,opts=inline] + +[.impact] +== Text formatting + +=== Bold and italic + +_To tame_ the wild wolpertingers we needed to build a *charm*. +But **u**ltimate victory could only be won if we divined the *_true name_* of the __war__lock. + + +=== Quotation Marks and Apostrophes + +"`What kind of charm?`" Lazarus asked. "`An odoriferous one or a mineral one?`" + +Kizmet shrugged. "`The note from Olaf's desk says '`wormwood and licorice,`' but these could be normal groceries for werewolves.`" + +=== Subscript and Superscript + +"`Well the H~2~O formula written on their whiteboard could be part of a shopping list, but I don't think the local bodega sells E=mc^2^,`" Lazarus replied. + +=== Monospace + +"`Wait!`" Indigo plucked a small vial from her desk's top drawer and held it toward us. +The vial's label read: `E=mc^2^`; the `_E_` represents _energy_, but also pure _genius!_ + +=== Literal Monospace + +You can reference the value of a document attribute using the syntax `+{name}+`, where `name` is the attribute name. + +`pass:[++]` is the increment operator in C. + +=== Marking + +Werewolves are #allergic to cinnamon#. + +=== Font Awesome + +Showing a gear icon: icon:gear[] + +[.impact] +== Lists + +=== Unordered List + +.Kizmet's Favorite Authors +* Edgar Allen Poe +* Sheri S. Tepper +* Bill Bryson + +=== Nested Unordered Lists + +.Possible DefOps manual locations +* West wood maze +** Maze heart +*** Reflection pool +** Secret exit +* Untracked file in git repository + + +=== Complex List Content + +* The header in AsciiDoc is optional, but if +it is used it must start with a document title. + +* Optional Author and Revision information +immediately follows the header title. + +* The document header must be separated from + the remainder of the document by one or more + blank lines and cannot contain blank lines. + +=== List continuation + +* The header in AsciiDoc must start with a document title. ++ +-- +Here's an example of a document title: + +---- += Document Title +---- + +NOTE: The header is optional. +-- + + +=== Attaching to an ancestor list + +* parent list item +** child list item + ++ +paragraph attached to parent list item + +//- + +* grandparent list item ++ +-- +** parent list item +*** child list item +-- ++ +paragraph attached to grandparent list item + +=== Dropping the principal text + +. {blank} ++ +---- +print("one") +---- +. {blank} ++ +---- +print("one") +---- + + +=== Checklist + +==== Non-interactive + +* [*] checked +* [x] also checked +* [ ] not checked +* normal list item + +==== Interactive + +[%interactive] +* [*] checked +* [x] also checked +* [ ] not checked +* normal list item + + + +=== Ordered lists (1) + +1. Protons +2. Electrons +3. Neutrons + +//- + +. Protons +. Electrons +. Neutrons + +=== Ordered lists (2) + +[start=4] +. Step four +. Step five +. Step six + +//- + +[%reversed] +.Parts of an atom +. Protons +. Electrons +. Neutrons + +=== Nested ordered lists + + +. Step 1 +. Step 2 +.. Step 2a +.. Step 2b +. Step 3 + +//- + +. Linux +* Fedora +* Ubuntu +* Slackware +. BSD +* FreeBSD +* NetBSD + +=== Numbering Styles + + +[arabic] +. One +. Two +. Three + +[decimal] +. One +. Two +. Three + +[loweralpha] +. One +. Two +. Three + +[lowergreek] +. One +. Two +. Three + + +=== Description List (1) + +CPU:: The brain of the computer. +Hard drive:: Permanent storage for operating system and/or user files. +RAM:: Temporarily stores information the CPU uses during operation. +Keyboard:: Used to enter text or control items on the screen. +Mouse:: Used to point to and select items on your computer screen. +Monitor:: Displays information in visual form using text and graphics. + + +=== Description list (2) + +Horizontal: + +[horizontal] +CPU:: The brain of the computer. +Hard drive:: Permanent storage for operating system and/or user files. +RAM:: Temporarily stores information the CPU uses during operation. + +With lists: + + +Dairy:: +* Milk +* Eggs +Bakery:: +* Bread +Produce:: +* Bananas + + +=== Hybrid complex list (1) + + +Operating Systems:: + Linux::: + . Ubuntu + * Desktop + * Server + BSD::: + . FreeBSD + . NetBSD +Cloud Providers:: + PaaS::: + . OpenShift + . CloudBees + IaaS::: + . Amazon EC2 + +=== Question and Answer Style List + +[qanda] +What is Asciidoctor?:: + An implementation of the AsciiDoc processor in Ruby. +What is the answer to the Ultimate Question?:: 42 + + + + +[.impact] +== Blocks + +=== Block title + +Example of a list with a title: + +.TODO list +- Learn the AsciiDoc syntax +- Install Asciidoctor +- Write my document + + +=== Tabs + +ifdef::asciidoctor-tabs-loaded[] +.Usage Example +[tabs] +==== +Java:: ++ +[,java] +---- +public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) { + // do something before the rest of the application + chain.doFilter(request, response); // invoke the rest of the application + // do something after the rest of the application +} +---- + +Kotlin:: ++ +[,kotlin] +---- +fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain) { + // do something before the rest of the application + chain.doFilter(request, response) // invoke the rest of the application + // do something after the rest of the application +} +---- +==== + + +=== Admonition + +==== Multi-lines + +[IMPORTANT] +.title +==== +This is an important admonition +==== + +==== Single line + +CAUTION: caution + +WARNING: warning + +NOTE: note + + +=== Comment + +// A single-line comment. + +//// +Multi line +comment +//// + + +=== Example + +==== Multi-lines + +==== +This is an example +====== +This is an example inside an example +====== +==== + +==== Single line + +[example] +This is an example + +=== Fenced + +``` +This is fenced content +``` + +=== Listing / Source / Code + +==== Multi-lines + +---- +This is a listing with highlighting +that can go over multiple lines +and without any specific programming language specified +---- + +==== Single line + +[listing] +This is a listing block (ie. without highlighting) + +[source] +This is a source block (ie. with highlighting) + + +=== Code block with callouts + +[source,ruby] +---- +require 'sinatra' // <1> + +get '/hi' do // <2> + "Hello World!" // <3> +end +---- +<1> Library import +<2> URL mapping +<3> HTTP response body + +=== Code block with non-selectable callouts + +---- +line of code // <1> +line of code # <2> +line of code ;; <3> +---- +<1> A callout behind a line comment for C-style languages. +<2> A callout behind a line comment for Ruby, Python, Perl, etc. +<3> A callout behind a line comment for Clojure. + +=== Literal + +==== Multi-lines + +.... +This is a literal block +.... + +==== Single line + +[literal] +This is a literal block + +=== Open + +==== Multi-lines + +-- +This is an open anonymous block +-- + +==== Single line + +[anything] +This is an open anonymous block + + + +=== Passthrough / Stem + +==== Multi-lines + +++++ +This is a passthrough block +++++ + +==== Single line + +[pass] +This is a passthrough block + +[stem] +This is a stem block. + +=== Quote (1) + +==== Multi-lines + +.Gettysburg Address +[quote, Abraham Lincoln, Address delivered at the dedication of the Cemetery at Gettysburg] +____ +Four score and seven years ago our fathers brought forth +on this continent a new nation... + +Now we are engaged in a great civil war, testing whether +that nation, or any nation so conceived and so dedicated, +can long endure. ... +____ + +==== Single line + +[quote] +Never do today what you can put off `'til tomorrow. + + +=== Quote (2) + +"I hold it that a little rebellion now and then is a good thing, +and as necessary in the political world as storms in the physical." +-- Thomas Jefferson, Papers of Thomas Jefferson: Volume 11 + + +> I hold it that a little rebellion now and then is a good thing, +> and as necessary in the political world as storms in the physical. +> -- Thomas Jefferson, Papers of Thomas Jefferson: Volume 11 + +=== Quote (3) + +==== Air quotes (not supported) + +[, James Baldwin] +"" +Not everything that is faced can be changed. +But nothing can be changed until it is faced. +"" + + +=== Sidebar + + +==== Multi-lines + +.AsciiDoc history +**** +AsciiDoc was first released in Nov 2002 by Stuart Rackham. +It was designed from the start to be a shorthand syntax +for producing professional documents like DocBook and LaTeX. +**** + +==== Single line + +[sidebar] +sidebar block + + + +=== Verse (1) + +[verse, Carl Sandburg, Fog] +____ +The fog comes +on little cat feet. + +It sits looking +over harbor and city +on silent haunches +and then moves on. +____ + +=== Verse (2) + +[verse, Carl Sandburg, two lines from the poem Fog] +The fog comes +on little cat feet. + + + + + + +[.impact] +== Tables + +=== Simple table + +|==== + +| Cell in column 1, row 1 | Cell in column 2, row 1 + +| Cell in column 1, row 2 | Cell in column 2, row 2 + +| Cell in column 1, row 3 | Cell in column 2, row 3 + +|==== + + +=== Number of columns + +|=== + +|Cell in column 1, row 1 |Cell in column 2, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 + +|=== + + +=== Column Formatting (1) + +table with horizontal, center alignment applied to all columns + +[cols="3*^"] +|=== +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Column Formatting (2) + +table with horizontal, center alignment applied to last column + + +[cols="2*,^"] +|=== +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Column Formatting (3) + +table with vertical, middle alignment applied to all columns + +[cols="3*.^"] +|=== +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Column Formatting (4) + +table with a different vertical alignment for each column + +[cols=".<,.^,.>"] +|=== +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + +=== Column Formatting (4) + +Table rendered with column sizes adjusted by a proportional integer + +[cols="1,2,6"] +|=== +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + +=== Column Formatting (5) + +Table rendered with column sizes adjusted by a percentage + +[cols="50,20,30"] +|=== +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Column Formatting (6) + +table with variable widths and alignments + +[cols=".<2,.^5,^.>3"] +|=== +|Cell in column 1, row 1 with lots and lots and lots and lots of content +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 and another bucket of content, and then a jelly roll of content +|=== + + +=== Column Formatting (7) + +table with a header, monospaced, and strong styled column + +[cols="h,m,s,e"] +|=== +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 +|Cell in column 4, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|Cell in column 4, row 2 +|=== + +=== Cell Formatting (1) + +table where cell was duplicated across three columns + +|=== + +|Cell in column 1, row 1 |Cell in column 2, row 1 |Cell in column 3, row 1 + +3*|Same cell content in columns 1, 2, and 3 + +|Cell in column 1, row 3 +|Cell in column 2, row 3 +|Cell in column 3, row 3 + +|=== + + +=== Cell Formatting (2) + +table where cell spans three columns + +|=== + +|Cell in column 1, row 1 |Cell in column 2, row 1 |Cell in column 3, row 1 + +3+|Content in a single cell that spans columns 1, 2, and 3 + +|Cell in column 1, row 3 +|Cell in column 2, row 3 +|Cell in column 3, row 3 + +|=== + + + +=== Cell Formatting (3) + + + + +Cell spanning two rows + +|=== + +|Cell in column 1, row 1 |Cell in column 2, row 1 |Cell in column 3, row 1 + +.2+|Content in a single cell that spans rows 2 and 3 +|Cell in column 2, row 2 +|Cell in column 3, row 2 + +|Cell in column 2, row 3 +|Cell in column 3, row 3 + +|=== + + + +=== Cell Formatting (4) + + + +Cell spanning columns and rows + +|=== + +|Column 1, row 1 |Column 2, row 1 |Column 3, row 1 |Column 4, row 1 + +|Column 1, row 2 +2.3+|Content in a single cell that spans over rows and columns +|Column 4, row 2 + +|Column 1, row 3 +|Column 4, row 3 + +|Column 1, row 4 +|Column 4, row 4 +|=== + +=== Cell Formatting (5) + + +Cells aligned horizontally, vertically, and across a span of three columns + +[cols="3"] +|=== +^|Prefix the `{vbar}` with `{caret}` to center content horizontally +<|Prefix the `{vbar}` with `<` to align the content to the left horizontally +>|Prefix the `{vbar}` with `>` to align the content to the right horizontally + +.^|Prefix the `{vbar}` with a `.` and `{caret}` to center the content in the cell vertically +.<|Prefix the `{vbar}` with a `.` and `<` to align the content to the top of the cell +.>|Prefix the `{vbar}` with a `.` and `>` to align the content to the bottom of the cell + +3+^.^|This content spans three columns (`3{plus}`) and is centered horizontally (`{caret}`) and vertically (`.{caret}`) within the cell. + +|=== + +=== Cell Formatting (6) + + +Cells with source code listing + +|=== +|Source Code 1 |Source Code 2 + +a| +[source,python] +---- +import os +print "%s" %(os.uname()) +---- + +a| +[source,python] +---- +import os +print ("%s" %(os.uname())) +---- +|=== + +=== Cell Formatting (7) + + +Building a variety of cell specifiers + +|=== + +2*>m|This content is duplicated across two columns. + +It is aligned right horizontally. + +And it is monospaced. + +.3+^.>s|This cell spans 3 rows. The content is centered horizontally, aligned to the bottom of the cell, and strong. +e|This content is emphasized. + +.^l|This content is aligned to the top of the cell and literal. + +v|This cell contains a verse +that may one day expound on the +wonders of tables in an +epic sonnet. + +|=== + + +=== Header Row + + +[cols=2*,options="header"] +|=== +|Name of Column 1 +|Name of Column 2 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|=== + +=== Header Row (implicit) + +|=== +|Name of Column 1 |Name of Column 2 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|=== + +=== Footer Row + +[options="footer"] +|=== +|Name of Column 1 |Name of Column 2 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 + +|Footer in column 1, row 3 +|Footer in column 2, row 3 +|=== + + +=== Table Width (1) + + +Table with width set to 75% + +[width=75%] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Table Width (2) + + +Table using autowidth + +[%autowidth] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Table Width (3) + + +Full-width table with autowidth columns + +[%autowidth.stretch] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + +=== Table Width (3) + + +Table with both fixed and autowidth columns + +[cols="25h,~,~"] +|=== +|small |as big as the column needs to be |the rest +|=== + + +=== Table Borders (1) + +frame=topbot + +[frame=topbot] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Table Borders (2) + +frame=sides + +[frame=sides] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Table Borders (3) + +frame=none + +[frame=none] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Grid (rows) + +[grid=rows] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + + +=== Grid (cols) + +[grid=cols] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + +=== Grid (none) + +[grid=none] +|=== +|Name of Column 1 |Name of Column 2 |Name of Column 3 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 +|Cell in column 3, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|Cell in column 3, row 2 +|=== + +=== Striping (1) + +[cols=3*, stripes=even] +|=== +| A1 +| B1 +| C1 + +| A2 +| B2 +| C2 + +| A3 +| B3 +| C3 +|=== + +=== Striping (2) + +[.stripes-even,cols=3*] +|=== +| A1 +| B1 +| C1 + +| A2 +| B2 +| C2 + +| A3 +| B3 +| C3 +|=== + + +=== Orientation + +[%rotate] +|=== +|a |b +|c |d +|=== + +[orientation=landscape] +|=== +|a |b +|c |d +|=== + + +=== Nested table + +[cols="1,2a"] +|=== +| Col 1 | Col 2 + +| Cell 1.1 +| Cell 1.2 + +| Cell 2.1 +| Cell 2.2 + +[cols="2,1"] +!=== +! Col1 ! Col2 + +! C11 +! C12 + +!=== + +|=== + +=== Table Caption (1) + +.A formal table +|=== +|Name of Column 1 |Name of Column 2 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|=== + + + +=== Table Caption (2) + +[caption="Table A. "] +.A formal table +|=== +|Name of Column 1 |Name of Column 2 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|=== + + +=== Table Caption (2) + +[caption=] +.A formal table +|=== +|Name of Column 1 |Name of Column 2 + +|Cell in column 1, row 1 +|Cell in column 2, row 1 + +|Cell in column 1, row 2 +|Cell in column 2, row 2 +|=== + + + +=== Escaping the Cell Separator + + +[cols=2*] +|==== +|The default separator in PSV tables is the \| character. +|The \| character is often referred to as a "`pipe`". +|==== + + +=== Delimiter-Separated Values (CSV) + +[%header,format=csv] +|=== +Artist,Track,Genre +Baauer,Harlem Shake,Hip Hop +The Lumineers,Ho Hey,Folk Rock +|=== diff --git a/preview-src/samples/content/index.adoc.yml b/preview-src/samples/content/index.adoc.yml new file mode 100644 index 0000000..c63b287 --- /dev/null +++ b/preview-src/samples/content/index.adoc.yml @@ -0,0 +1,23 @@ +url: /samples/content/index.html +component: + name: foobar +version: '2.0.0' +latest: + url: '/samples/content/index.html' + version: '2.0.0' + displayVersion: '2.0.0' + title: Spring Foobar +next: + content: Edge Cases + url: '/samples/edge-cases/index.html' + urlType: 'internal' +breadcrumbs: + - content: Spring Foobar + url: '#' + urlType: fragment + - content: Samples + url: '#' + urlType: fragment + - content: Content + url: '#' + urlType: fragment diff --git a/preview-src/samples/edge-cases/index.adoc b/preview-src/samples/edge-cases/index.adoc new file mode 100644 index 0000000..10f84fb --- /dev/null +++ b/preview-src/samples/edge-cases/index.adoc @@ -0,0 +1,124 @@ += Edge Cases +:antora-page-url: /samples/edge-cases/index.html +:tabs-sync-option: +:page-pagination: + +There are a few things that can trip our stylesheet up if we're not careful: + +== Title with Code (`withcode`) + +Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, +eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam +voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione + +Voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, +adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem + +== Long Tables + +A table with long entries and no breakable space. + +[cols="1,2", options="header"] +|=== +|Name +|Description + +|Loremipsumdolorsitamet,consecteturadipiscingelit,seddoeiusmodtemporincididuntutlaboreetdoloremagnaaliqua.Utenimadminimveniam,quisnostrudexercitationullamcolaborisnisiutaliquipexeacommodoconsequat.Duisauteiruredolorinreprehenderitinvoluptatevelitessecillumdoloreeufugiatnullapariatur +|reprehenderit in voluptate velit esse cillum dolore + +|Lorem ipsum +|consectetur adipiscing +|=== + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur + +[cols="2,2,2,3,5"] +|=== +|Startup phase |LivenessState |ReadinessState |HTTP server |Notes + +|Lorem +|`IPSUM` +|`DOLOR` +|tempor incididuntarted +|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + +|Consectetur +|`IPSUM` +|`CONSECTETUR_TEMPOR` +|ullamco laboris +|Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + +|Ipsum +|`CORRECT` +|`DOLOR_IN_REPREHENDERIT` +|fugiat nulla pariatur +|Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. +|=== + +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. +Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur + +[cols="2,2,2,3,5"] +|=== +|Shutdown phase |Liveness State |Readiness State |HTTP server |Notes + +|minim veniam +|`LOREM` +|`CONSECTETUR_TEMPOR` +|ullamco laboris +|Ut enim ad minim veniam. + +|nostrud exercitation +|`DOLOR` +|`DOLOR_IN_REPREHENDERIT` +|voluptate velit esse cillum +|Lorem ipsum, <<#_long_shell_blocks,velit esse cillum dolore>>. + +|magna aliqua +|N/A +|N/A +|consectetur adipiscing elit +|exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +|=== + +== Long Shell Blocks + +A shell code block can also break things: + +[indent=0,subs="attributes"] +---- + . ____ _ __ _ _ + /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ +( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ + \\/ ___)| |_)| | | | | || (_| | ) ) ) ) + ' |____| .__|_| |_|_| |_\__, | / / / / + =========|_|==============|___/=/_/_/_/ + :: Spring Boot :: v{spring-boot-version} + +2019-04-31 13:09:54.117 INFO 56603 --- [ main] o.s.b.s.app.SampleApplication : Starting SampleApplication v0.1.0 on mycomputer with PID 56603 (/apps/myapp.jar started by pwebb) +2019-04-31 13:09:54.166 INFO 56603 --- [ main] ationConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6e5a8246: startup date [Wed Jul 31 00:08:16 PDT 2013]; root of context hierarchy +2019-04-01 13:09:56.912 INFO 41370 --- [ main] .t.TomcatServletWebServerFactory : Server initialized with port: 8080 +2019-04-01 13:09:57.501 INFO 41370 --- [ main] o.s.b.s.app.SampleApplication : Started SampleApplication in 2.992 seconds (JVM running for 3.658) +---- + + +== Code With `nowrap` + +Have some HTTP that also has `nowrap` set: + +[source,http,options="nowrap"] +---- +HTTP/1.1 200 OK +Content-Type: application/vnd.spring-boot.actuator.v3+json +Content-Length: 121 +{ + "events" : [ { + "timestamp" : "2021-03-18T16:49:30.625Z", + "principal" : "alice", + "type" : "logout" + } ] +} +---- diff --git a/preview-src/samples/edge-cases/index.adoc.yml b/preview-src/samples/edge-cases/index.adoc.yml new file mode 100644 index 0000000..5cfe965 --- /dev/null +++ b/preview-src/samples/edge-cases/index.adoc.yml @@ -0,0 +1,27 @@ +url: /samples/edge-cases/index.html +component: + name: foobar +version: '2.0.0' +latest: + url: '/samples/edge-cases/index.html' + version: '2.0.0' + displayVersion: '2.0.0' + title: Spring Foobar +previous: + content: Content + url: '/samples/content/index.html' + urlType: 'internal' +next: + content: 404 + url: '/404.html' + urlType: 'internal' +breadcrumbs: + - content: Spring Foobar + url: '#' + urlType: fragment + - content: Samples + url: '#' + urlType: fragment + - content: Edge cases + url: '#' + urlType: fragment diff --git a/preview-src/samples/index.adoc b/preview-src/samples/index.adoc new file mode 100644 index 0000000..036c69a --- /dev/null +++ b/preview-src/samples/index.adoc @@ -0,0 +1,5 @@ += Samples +:antora-page-url: /samples/index.html +:page-section-summary-toc: true + +This contains a listing of samples. diff --git a/preview-src/features/index.adoc.yml b/preview-src/samples/index.adoc.yml similarity index 53% rename from preview-src/features/index.adoc.yml rename to preview-src/samples/index.adoc.yml index 150151b..3cecf5a 100644 --- a/preview-src/features/index.adoc.yml +++ b/preview-src/samples/index.adoc.yml @@ -1,13 +1,13 @@ -url: /features/index.html +url: /samples/index.html component: - name: security + name: foobar url: '#' -version: '6.1.0' +version: '2.0.0' latest: - url: '/features/index.html' - version: '6.1.0' - displayVersion: '6.1.0' - title: Spring Security + url: '/samples/index.html' + version: '2.0.0' + displayVersion: '2.0.0' + title: Spring Foobar previous: content: Quickstart url: '#' @@ -17,9 +17,9 @@ next: url: '#' urlType: 'internal' breadcrumbs: - - content: Spring Security + - content: Spring Foobar url: '#' urlType: fragment - - content: Features + - content: Samples url: '#' urlType: fragment diff --git a/preview-src/search.adoc.yml b/preview-src/search.adoc.yml index 10240d6..7538a75 100644 --- a/preview-src/search.adoc.yml +++ b/preview-src/search.adoc.yml @@ -1,7 +1,7 @@ url: /search.html component: - name: security -version: '6.1.0' + name: foobar +version: '2.0.0' latest: url: '/index.html' previous: @@ -13,7 +13,7 @@ next: url: '#' urlType: 'internal' breadcrumbs: - - content: Spring Security + - content: Spring Foobar url: '#' urlType: fragment - content: Overview diff --git a/preview-src/spring-projects.adoc.yml b/preview-src/spring-projects.adoc.yml index abd353e..a3f6997 100644 --- a/preview-src/spring-projects.adoc.yml +++ b/preview-src/spring-projects.adoc.yml @@ -1,7 +1,7 @@ url: /all-docs.html component: - name: security -version: '6.1.0' + name: foobar +version: '2.0.0' latest: url: '/index.html' previous: @@ -13,7 +13,7 @@ next: url: '#' urlType: 'internal' breadcrumbs: - - content: Spring Security + - content: Spring Foobar url: '#' urlType: fragment - content: Overview diff --git a/preview-src/ui-model.yml b/preview-src/ui-model.yml index acbc4e2..f036673 100644 --- a/preview-src/ui-model.yml +++ b/preview-src/ui-model.yml @@ -9,122 +9,115 @@ site: title: Spring homeUrl: /index.html components: - - name: security - title: &component_title Spring Security + - name: foobar + title: &component_title Spring Foobar url: '#' - versions: &security_versions - - &security_latest_version + versions: &foobar_versions + - &foobar_latest_version url: '/index.html' - version: '6.1.5' - displayVersion: '6.1.5' + version: '2.0.0' + displayVersion: '2.0.0' title: *component_title - versionSegment: '5.6' - - &security_5_5_version - url: '/5.5/index.html' - version: '5.5.9' - displayVersion: '5.5.9' - versionSegment: '5.5' - latest: *security_latest_version - - name: session - title: &session_component_title Spring Session + versionSegment: '2.0' + - &foobar_1_0_version + url: '/1.0/index.html' + version: '1.0.0' + displayVersion: '1.0.0' + versionSegment: '1.0' + latest: *foobar_latest_version + - name: baz + title: &baz_component_title Spring Baz url: '#' versions: - - &session_latest_version - url: '/session/index.html' - version: '2.5.9' - displayVersion: '2.5.9' - title: *session_component_title - versionSegment: '2.5' - latest: *session_latest_version + - &baz_latest_version + url: '/baz/index.html' + version: '1.0.0' + displayVersion: '1.0.0' + title: *baz_component_title + versionSegment: '1.0' + latest: *baz_latest_version shared: - security: - 5.5.9: + foobar: + 1.0.0: home: true - title: Spring Security + title: Spring Foobar relativeSrcPath: index.adoc editUrl: http://example.com/project-xyz/blob/master/index.adoc component: - title: Spring Security + title: Spring Foobar url: '#' versions: - url: '/index.html' - version: '6.1.5' - displayVersion: '6.1.5' + version: '2.0.0' + displayVersion: '2.0.0' title: *component_title - versionSegment: '5.6' - - url: '/5.5/index.html' - version: '5.5.9' - displayVersion: '5.5.9' - versionSegment: '5.5' - componentVersion: *security_5_5_version + versionSegment: '2.0' + - url: '/1.0/index.html' + version: '1.0.0' + displayVersion: '1.0.0' + versionSegment: '1.0' + componentVersion: *foobar_1_0_version versions: - - version: '6.1.5' - displayVersion: '6.1.5' + - version: '2.0.0' + displayVersion: '2.0.0' url: '#' versionSegment: '' - - version: '5.5.9' - displayVersion: '5.5.9' - versionSegment: '5.5' + - version: '1.0.0' + displayVersion: '1.0.0' + versionSegment: '1.0' url: '#' navigation: - root: true items: - content: Overview - url: '/5.5/index.html' - - content: Features - url: '#' - items: - - content: Authentication - url: '#' - - content: Protection Against Exploits - url: '#' - 6.1.5: + url: '/1.0/index.html' + 2.0.0: home: true - title: Spring Security + title: Spring Foobar relativeSrcPath: index.adoc editUrl: http://example.com/project-xyz/blob/master/index.adoc component: - title: &component_title Spring Security + title: &component_title Spring Foobar url: '#' - versions: *security_versions - componentVersion: *security_latest_version + versions: *foobar_versions + componentVersion: *foobar_latest_version versions: - - version: '6.1.5' - displayVersion: '6.1.5' + - version: '2.0.0' + displayVersion: '2.0.0' url: '#' versionSegment: '' - - version: '5.5.9' - displayVersion: '5.5.9' + - version: '1.0.0' + displayVersion: '1.0.0' url: '#' - versionSegment: '5.5' + versionSegment: '1.0' navigation: - root: true items: - content: Overview url: '/index.html' - - content: Features - url: '/features/index.html' + - content: Samples + url: '/samples/index.html' items: - - content: Authentication - url: '/features/authentication/index.html' - - content: Protection Against Exploits - url: '/features/exploits/index.html' - session: - 2.5.9: + - content: Content + url: '/samples/content/index.html' + - content: Edge cases + url: '/samples/edge-cases/index.html' + - content: 404 + url: '/404.html' + baz: + 1.0.0: home: true - title: Spring Session + title: Spring Baz relativeSrcPath: index.adoc editUrl: http://example.com/project-xyz/blob/master/index.adoc component: - title: Spring Session + title: Spring Baz url: '#' versions: - - *session_latest_version - componentVersion: *session_latest_version + - *baz_latest_version + componentVersion: *baz_latest_version navigation: - root: true items: - - content: Session - url: '/session/index.html' - - content: Features - url: '#' + - content: Baz + url: '/baz/index.html' From 5c59159a7ff81bcb421c8f4215e4ba0e3196d3f3 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Mon, 25 Mar 2024 15:28:12 +0100 Subject: [PATCH 05/26] fix: Sidebar icon state --- src/css/nav.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/css/nav.css b/src/css/nav.css index 6bbe200..14e1895 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -125,10 +125,15 @@ html.is-clipped--nav { .nav-item.is-current-page > .nav-item-toggle { background: transparent url(../img/chevron-white.svg) no-repeat center / 50%; - transform: rotate(0deg); + transform: rotate(-90deg); filter: opacity(75%); } + +.nav-item.is-current-page.is-active > .nav-item-toggle { + transform: rotate(0deg); +} + .dark-theme .nav-item.is-current-page > .nav-item-toggle { background: transparent url(../img/chevron.svg) no-repeat center / 50%; } From c679d2534132bcea8e3f1790cdf614828f586777 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Mon, 25 Mar 2024 16:33:47 +0100 Subject: [PATCH 06/26] fix: h2 styling Resoles #220 --- src/css/doc.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/css/doc.css b/src/css/doc.css index 46f8a2b..66b39eb 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -63,7 +63,6 @@ } .doc h2:not(.discrete) { - border-bottom: 1px solid var(--section-divider-color); margin-left: -1rem; margin-right: -1rem; padding: 0.4rem 1rem 0.1rem; From e0016e388c4a73a9a6f8367777c98f26c71b30e1 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Mon, 25 Mar 2024 16:34:47 +0100 Subject: [PATCH 07/26] fix: Lint --- src/css/nav.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/css/nav.css b/src/css/nav.css index 14e1895..35874be 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -129,7 +129,6 @@ html.is-clipped--nav { filter: opacity(75%); } - .nav-item.is-current-page.is-active > .nav-item-toggle { transform: rotate(0deg); } From 443b5eabce755639dd1922b90021e7fec3fca1f6 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Tue, 26 Mar 2024 14:39:51 +0100 Subject: [PATCH 08/26] Feat: improve nav Resolves #194 --- src/js/01-nav.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/js/01-nav.js b/src/js/01-nav.js index 1ea46dc..4557106 100644 --- a/src/js/01-nav.js +++ b/src/js/01-nav.js @@ -31,6 +31,15 @@ menuPanel.scrollTop = 0 } + var currentActivePageItem = menuPanel.querySelector('.nav-item.is-current-page.is-active') + if (currentActivePageItem && currentActivePageItem.querySelector('.nav-item-toggle')) { + currentActivePageItem.querySelector('.nav-link').addEventListener('click', function (e) { + currentActivePageItem.querySelector('.nav-item-toggle').click() + e.preventDefault() + return false + }) + } + find(menuPanel, '.nav-item-toggle').forEach(function (btn) { var li = btn.parentElement btn.addEventListener('click', toggleActive.bind(li)) @@ -41,8 +50,6 @@ } }) - // var isOpen = false - document.querySelector('#browse-version').addEventListener('click', function () { MicroModal.show('modal-versions', { disableScroll: true, From e576615d57b3f98ceb277e1434bcb82fa3bebd02 Mon Sep 17 00:00:00 2001 From: Phil Webb Date: Wed, 27 Mar 2024 06:57:15 -0700 Subject: [PATCH 09/26] feat: Add redirect support Add a new 'redirect' layout that can be used to as a target of an Apache HTTPD rewrite rule in order to perform redirects based on a page or anchor. Closes #221 --- preview-src/redirect.adoc | 5 +++++ src/js/vendor/redirect.js | 24 ++++++++++++++++++++++++ src/layouts/redirect.hbs | 7 +++++++ 3 files changed, 36 insertions(+) create mode 100644 preview-src/redirect.adoc create mode 100644 src/js/vendor/redirect.js create mode 100644 src/layouts/redirect.hbs diff --git a/preview-src/redirect.adoc b/preview-src/redirect.adoc new file mode 100644 index 0000000..7332cb6 --- /dev/null +++ b/preview-src/redirect.adoc @@ -0,0 +1,5 @@ +:page-layout: redirect + +* xref:index.adoc[oldpage] +* xref:baz/index.adoc[#old] +* xref:samples/index.adoc[oldpage#old] diff --git a/src/js/vendor/redirect.js b/src/js/vendor/redirect.js new file mode 100644 index 0000000..98bbf08 --- /dev/null +++ b/src/js/vendor/redirect.js @@ -0,0 +1,24 @@ +;(function () { + 'use strict' + + window.addEventListener('load', onChange) + window.addEventListener('hashchange', onChange) + + function onChange () { + const params = new URLSearchParams(window.location.search) + const page = params.get('page') || '' + const fragment = window.location.hash + const pageAndFragment = page + ((fragment.length === 1) ? '' : fragment) + let foundForFragment + let foundForPageAndFragment + const candidates = document.querySelector('body ul') + if (candidates) { + for (const candidate of candidates.children) { + const anchorElement = candidate.querySelector('a') + if (anchorElement.text === pageAndFragment) foundForPageAndFragment = anchorElement.href + if (anchorElement.text === fragment) foundForFragment = anchorElement.href + } + } + window.location.replace(foundForPageAndFragment || foundForFragment || 'index.html') + } +})() diff --git a/src/layouts/redirect.hbs b/src/layouts/redirect.hbs new file mode 100644 index 0000000..cda8699 --- /dev/null +++ b/src/layouts/redirect.hbs @@ -0,0 +1,7 @@ + + + +{{{page.contents}}} + From 037a7f478310acdfa3d32c83dd793d2eaf1d7a55 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Wed, 27 Mar 2024 16:56:28 +0100 Subject: [PATCH 10/26] fix: Update author font size --- src/css/spring/spring-doc.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/css/spring/spring-doc.css b/src/css/spring/spring-doc.css index 2363c01..0f5cbfc 100644 --- a/src/css/spring/spring-doc.css +++ b/src/css/spring/spring-doc.css @@ -7,7 +7,7 @@ color: var(--page-author-font-color); padding: 1rem; margin: 1rem 0; - font-size: calc(12 / var(--rem-base) * 1rem); + font-size: calc(15 / var(--rem-base) * 1rem); font-weight: var(--body-font-weight-bold); } From e4f2e929f44ddfb12a65091af2f468ae22855fe0 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Wed, 27 Mar 2024 16:57:52 +0100 Subject: [PATCH 11/26] fix: Update sidebar style --- src/css/doc.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/css/doc.css b/src/css/doc.css index 66b39eb..2ec10ee 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -760,7 +760,7 @@ .doc .sidebarblock { background: var(--sidebar-background); border-radius: 0.75rem; - padding: 0.75rem 1.5rem; + padding: 1.75rem 1.5rem; } .doc .sidebarblock > .content > .title { @@ -768,7 +768,6 @@ font-weight: var(--alt-heading-font-weight); line-height: 1.3; margin-bottom: 0.5rem; - text-align: center; } .doc .sidebarblock > .content > .title + *, From db3a5802255c3681b35e6705525ba1597f852562 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 28 Mar 2024 14:44:24 -0500 Subject: [PATCH 12/26] Add spring-boot to spring-projects.js --- src/helpers/spring-projects.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers/spring-projects.js b/src/helpers/spring-projects.js index 62c8f9a..364af54 100644 --- a/src/helpers/spring-projects.js +++ b/src/helpers/spring-projects.js @@ -1,6 +1,11 @@ 'use strict' module.exports = () => [ + { + href: 'https://docs.spring.io/spring-boot/', + id: 'boot', + text: 'Spring Boot', + }, { href: 'https://docs.spring.io/spring-framework/reference/', id: 'framework', From 136be151b13c7d3fdb79849b7f500ba9f1096ff3 Mon Sep 17 00:00:00 2001 From: Salvatore Date: Tue, 16 Apr 2024 15:15:59 +0200 Subject: [PATCH 13/26] fix: Add scrollable feature to modal's left column Resolves #223 --- src/css/main.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/css/main.css b/src/css/main.css index d52f2c4..22df743 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -221,6 +221,11 @@ html.dark-theme #modal-versions .colset .col-right { margin-left: 0; } +#modal-versions .col-left { + max-height: 80vh; + overflow: auto; +} + #modal-versions .current { background-color: #80ea6e; color: #111; From b52a8767324e03a8bd10f13d4a3a541591408596 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Tue, 16 Apr 2024 15:43:33 +0200 Subject: [PATCH 14/26] feat: Update Readme Resolves #226 --- README.adoc | 246 ---------------------------------------------------- README.md | 113 ++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 246 deletions(-) delete mode 100644 README.adoc create mode 100644 README.md diff --git a/README.adoc b/README.adoc deleted file mode 100644 index 9bffb35..0000000 --- a/README.adoc +++ /dev/null @@ -1,246 +0,0 @@ -= Antora Default UI -// Settings: -:experimental: -:hide-uri-scheme: -// Project URLs: -:url-project: https://gitlab.com/antora/antora-ui-default -:url-preview: https://antora.gitlab.io/antora-ui-default -:url-ci-pipelines: {url-project}/pipelines -:img-ci-status: {url-project}/badges/master/pipeline.svg -// External URLs: -:url-antora: https://antora.org -:url-antora-docs: https://docs.antora.org -:url-git: https://git-scm.com -:url-git-dl: {url-git}/downloads -:url-gulp: http://gulpjs.com -:url-opendevise: https://opendevise.com -:url-nodejs: https://nodejs.org -:url-nvm: https://github.com/creationix/nvm -:url-nvm-install: {url-nvm}#installation -:url-source-maps: https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map - -image:{img-ci-status}[CI Status (GitLab CI), link={url-ci-pipelines}] - -This project is an archetype that demonstrates how to produce a UI bundle that can be used by {url-antora}[Antora] to generated a documentation site. -You can see a preview of the default UI at {url-preview}. - -While the default UI is ready to be used with Antora, the intent is that you'll fork it and customize it for your own needs. -It's intentionally minimalistic so as to give you a good starting point without requiring too much effort to customize. - -== Code of Conduct - -The Antora project and its project spaces are governed by our https://gitlab.com/antora/antora/-/blob/master/CODE-OF-CONDUCT.adoc[Code of Conduct]. -By participating, you're agreeing to honor this code. -Let's work together to make this a welcoming, professional, inclusive, and safe environment for everyone. - -== Use the Default UI - -If you want to simply use the default UI for your Antora-generated site, add the following UI configuration to your playbook: - -[source,yaml] ----- -ui: - bundle: - url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable - snapshot: true ----- - -NOTE: The `snapshot` flag tells Antora to fetch the UI when the `--fetch` command-line flag is present. -This setting is required because updates to the UI bundle are pushed to the same URL. -If the URL were to be unique, this setting would not be required. - -Read on to learn how to customize the default UI for your own documentation. - -== Development Quickstart - -This section offers a basic tutorial to teach you how to set up the default UI project, preview it locally, and bundle it for use with Antora. -A more comprehensive tutorial can be found in the documentation at {url-antora-docs}. - -=== Prerequisites - -To preview and bundle the default UI, you need the following software on your computer: - -* {url-git}[git] (command: `git`) -* {url-nodejs}[Node.js] (commands: `node` and `npm`) -* {url-gulp}[Gulp CLI] (command: `gulp`) - -==== git - -First, make sure you have git installed. - - $ git --version - -If not, {url-git-dl}[download and install] the git package for your system. - -==== Node.js - -Next, make sure that you have Node.js installed (which also provides npm). - - $ node --version - -If this command fails with an error, you don't have Node.js installed. -If the command doesn't report an LTS version of Node.js (e.g., v10.15.3), it means you don't have a suitable version of Node.js installed. -In this guide, we'll be installing Node.js 10. - -While you can install Node.js from the official packages, we strongly recommend that you use {url-nvm}[nvm] (Node Version Manager) to manage your Node.js installation(s). -Follow the {url-nvm-install}[nvm installation instructions] to set up nvm on your machine. - -Once you've installed nvm, open a new terminal and install Node.js 10 using the following command: - - $ nvm install 10 - -You can switch to this version of Node.js at any time using the following command: - - $ nvm use 10 - -To make Node.js 10 the default in new terminals, type: - - $ nvm alias default 10 - -Now that you have Node.js installed, you can proceed with installing the Gulp CLI. - -==== Gulp CLI - -You'll need the Gulp command-line interface (CLI) to run the build. -The Gulp CLI package provides the `gulp` command which, in turn, executes the version of Gulp declared by the project. - -You can install the Gulp CLI globally (which resolves to a location in your user directory if you're using nvm) using the following command: - - $ npm install -g gulp-cli - -Verify the Gulp CLI is installed and on your PATH by running: - - $ gulp --version - -If you prefer to install global packages using Yarn, run this command instead: - - $ yarn global add gulp-cli - -Alternately, you can use the `gulp` command that is installed by the project's dependencies. - - $ $(npm bin)/gulp --version - -Now that you have the prerequisites installed, you can fetch and build the UI project. - -=== Clone and Initialize the UI Project - -Clone the default UI project using git: - -[subs=attributes+] - $ git clone {url-project} && - cd "`basename $_`" - -The example above clones Antora's default UI project and then switches to the project folder on your filesystem. -Stay in this project folder when executing all subsequent commands. - -Use npm to install the project's dependencies inside the project. -In your terminal, execute the following command: - - $ npm install - -This command installs the dependencies listed in [.path]_package.json_ into the [.path]_node_modules/_ folder inside the project. -This folder does not get included in the UI bundle and should _not_ be committed to the source control repository. - -[TIP] -==== -If you prefer to install packages using Yarn, run this command instead: - - $ yarn -==== - -=== Preview the UI - -The default UI project is configured to preview offline. -The files in the [.path]_preview-src/_ folder provide the sample content that allow you to see the UI in action. -In this folder, you'll primarily find pages written in AsciiDoc. -These pages provide a representative sample and kitchen sink of content from the real site. - -To build the UI and preview it in a local web server, run the `preview` command: - - $ gulp preview - -You'll see a URL listed in the output of this command: - -.... -[12:00:00] Starting server... -[12:00:00] Server started http://localhost:5252 -[12:00:00] Running server -.... - -Navigate to this URL to preview the site locally. - -While this command is running, any changes you make to the source files will be instantly reflected in the browser. -This works by monitoring the project for changes, running the `preview:build` task if a change is detected, and sending the updates to the browser. - -Press kbd:[Ctrl+C] to stop the preview server and end the continuous build. - -=== Package for Use with Antora - -If you need to package the UI so you can use it to generate the documentation site locally, run the following command: - - $ gulp bundle - -If any errors are reported by lint, you'll need to fix them. - -When the command completes successfully, the UI bundle will be available at [.path]_build/ui-bundle.zip_. -You can point Antora at this bundle using the `--ui-bundle-url` command-line option. - -If you have the preview running, and you want to bundle without causing the preview to be clobbered, use: - - $ gulp bundle:pack - -The UI bundle will again be available at [.path]_build/ui-bundle.zip_. - -==== Source Maps - -The build consolidates all the CSS and client-side JavaScript into combined files, [.path]_site.css_ and [.path]_site.js_, respectively, in order to reduce the size of the bundle. -{url-source-maps}[Source maps] correlate these combined files with their original sources. - -This "`source mapping`" is accomplished by generating additional map files that make this association. -These map files sit adjacent to the combined files in the build folder. -The mapping they provide allows the debugger to present the original source rather than the obfuscated file, an essential tool for debugging. - -In preview mode, source maps are enabled automatically, so there's nothing you have to do to make use of them. -If you need to include source maps in the bundle, you can do so by setting the `SOURCEMAPS` environment variable to `true` when you run the bundle command: - - $ SOURCEMAPS=true gulp bundle - -In this case, the bundle will include the source maps, which can be used for debugging your production site. - -== Copyright and License - -Copyright (C) 2017-present OpenDevise Inc. and the Antora Project. - -Use of this software is granted under the terms of the https://www.mozilla.org/en-US/MPL/2.0/[Mozilla Public License Version 2.0] (MPL-2.0). -See link:LICENSE[] to find the full license text. - -== Authors - -Development of Antora is led and sponsored by {url-opendevise}[OpenDevise Inc]. - -== Extensions to the UI - -=== Related Documentation - -The UI presents a list of related documentation and that documentation can be filtered using two attributes: - -* page-related-doc-categories - The categories to be included in the related documentation -* page-related-doc-projects - The project ids to be included in the related documentation - -For a complete listing of valid categories and ids view https://github.com/spring-io/antora-ui-spring/blob/main/src/helpers/related_projects.js[related_projects.js] - -The configuration is typically specified in asciidoc attributes section of the antora-playbook.yml: - -.antora-playbook.yml -[source,yml] ----- -asciidoc: - attributes: - # Include the projects with the security category - page-related-doc-categories: security - # Include the projects with ids framework and graphql - page-related-doc-projects: framework,graphql ----- - -The Related Documentation links to the `All Docs...` page. -To include this resource, ensure that the https://github.com/spring-io/antora-extensions/blob/main/README.adoc[antora-extensions] is using 1.7.0+ and the https://github.com/spring-io/antora-extensions/blob/main/README.adoc#static-page[Static Page Extension] is included. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0dc93c8 --- /dev/null +++ b/README.md @@ -0,0 +1,113 @@ + +

+ + Spring + +

+ +[![On Push](https://github.com/spring-io/antora-ui-spring/actions/workflows/push.yml/badge.svg?branch=main)](https://github.com/spring-io/antora-ui-spring/actions/workflows/push.yml) + + +This project generates and packages the static resources that Spring uses for document production. + +This project is based on [Antora](https://antora.org). + + +## Development Quickstart + +This section offers a basic tutorial to teach you how to preview it locally, and bundle it for use with Antora. +A more comprehensive tutorial can be found in the documentation at [docs.antora.org](https://docs.antora.org/). + +### Prerequisites + +To preview and bundle the Antora Spring UI, you need the following software on your computer: + +* [git](https://git-scm.com/) (command: `git`) +* [Node.js](https://nodejs.org/) (commands: `node` and `npm`) +* [Gulp CLI](http://gulpjs.com/) (command: `gulp`) + +### Preview the UI + +The Spring Antora UI project is configured to preview offline. +The files in the `preview-src/` folder provide the sample content that allow you to see the UI in action. +In this folder, you'll primarily find pages written in AsciiDoc. +These pages provide a representative sample and kitchen sink of content from the real site. + +To build the UI and preview it in a local web server, run the `preview` command: + +``` +npm install +gulp preview +``` + +You'll see a URL listed in the output of this command: + +``` +[12:00:00] Starting server... +[12:00:00] Server started http://localhost:5252 +[12:00:00] Running server +``` + +Navigate to this URL to preview the site locally. + +While this command is running, any changes you make to the source files will be instantly reflected in the browser. +This works by monitoring the project for changes, running the `preview:build` task if a change is detected, and sending the updates to the browser. + +Press `Ctrl`+`C` to stop the preview server and end the continuous build. + +### Package for Use with Antora + +If you need to package the UI so you can use it to generate the documentation site locally, run the following command: + +``` +gulp bundle +``` + +If any errors are reported by lint, you'll need to fix them. + +When the command completes successfully, the UI bundle will be available at `build/ui-bundle.zip`. +You can point Antora at this bundle using the `--ui-bundle-url` command-line option. + +If you have the preview running, and you want to bundle without causing the preview to be clobbered, use: + +``` +gulp bundle:pack +``` + +The UI bundle will again be available at `build/ui-bundle.zip`. + +## Extensions to the UI + +### Related Documentation + +The UI presents a list of related documentation and that documentation can be filtered using two attributes: + +* page-related-doc-categories - The categories to be included in the related documentation +* page-related-doc-projects - The project ids to be included in the related documentation + +For a complete listing of valid categories and ids view [related_projects.js](https://github.com/spring-io/antora-ui-spring/blob/main/src/helpers/related_projects.js) + +The configuration is typically specified in asciidoc attributes section of the `antora-playbook.yml`: + +``` +asciidoc: + attributes: + # Include the projects with the security category + page-related-doc-categories: security + # Include the projects with ids framework and graphql + page-related-doc-projects: framework,graphql +``` + +The Related Documentation links to the `All Docs...` page. +To include this resource, ensure that the [antora-extensions](https://github.com/spring-io/antora-extensions/blob/main/README.adoc) is using 1.7.0+ and the [Static Page Extension](https://github.com/spring-io/antora-extensions/blob/main/README.adoc#static-page) is included. + +## Authors + +Development of Antora is led and sponsored by [OpenDevise Inc](https://opendevise.com/). + +## Copyright and License + +Copyright (C) 2017-present OpenDevise Inc. and the Antora Project. + +Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). +See [LICENSE](https://github.com/spring-io/antora-ui-spring/blob/feat/gh-226/LICENSE) to find the full license text. From ff212836b4a9ce5227ad453cde9b7cd51918968c Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Wed, 17 Apr 2024 09:30:37 +0200 Subject: [PATCH 15/26] feat: image invert for dark mode Resolves #229 --- preview-src/samples/content/index.adoc | 5 +++++ src/css/main.css | 4 ++++ src/img/lorem.png | Bin 0 -> 1915 bytes 3 files changed, 9 insertions(+) create mode 100644 src/img/lorem.png diff --git a/preview-src/samples/content/index.adoc b/preview-src/samples/content/index.adoc index cadb0e5..c6c2503 100644 --- a/preview-src/samples/content/index.adoc +++ b/preview-src/samples/content/index.adoc @@ -142,6 +142,11 @@ image::/_/img/spring-logo.svg[Interactive,300,opts=interactive] image::/_/img/spring-logo.svg[Embedded,300,opts=inline] +=== Image invert dark mode + +[.invert-dark] +image::/_/img/lorem.png[Spring,100] + [.impact] == Text formatting diff --git a/src/css/main.css b/src/css/main.css index 22df743..bbbed92 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -270,3 +270,7 @@ html.dark-theme #modal-versions .modal-versions-close .cls-1h { display: block; } } + +html.dark-theme .invert-dark img { + filter: invert(1); +} diff --git a/src/img/lorem.png b/src/img/lorem.png new file mode 100644 index 0000000000000000000000000000000000000000..688d887806fc61db600a614b0e45fc6aeb519051 GIT binary patch literal 1915 zcmaJ?X;2eq7!ER8~0`HcEe^Rkq*caqW7kQaMzp2Ue(}v|6mKlxk@eDnkIV)}z{uitUfmo!R}q@16H~-s|~hOIAjQ zJJ`D0(r7e?$Ou^swH8sYx6Lf-n<{v0rWQ9+t|DV`HEDndlop2I$tWXI3#FhjD1>av z{2C3R(X5wf;#8zcxm*b2S~g_yVH>qN3QePhh>bc3PDe>bGMb{nM1c9!X@H?YM8KLr zC0D7FqN$pQYyyqVj*f$~(_s(+#BVb~j6#Y)i;@t-sLjCiLZb+H!7HTp7BdH6yl^4Y zMZn9XRLYeMDNdjakj-PkTrQsx46>1ANPs|sIgoWdgiV8f=xS_GlhQITaRp~*rK1%YcBFRB)5rq3mKTE16UWcpl| zPK)JG$#5*Q{nxCgOq75u+t=cy4zJ~pVwC0yO5FY5$9zHEnc+xTSe)_4k%aur!(4ms z=O<}?-_TY0+s`b>7te6>a?3BPETb_^^d0nWo9{+Ts*d1=NMUU5fo1DQC5ZUaiYD(p ziSy(+rv2t8i3=wNf2*zum34aozs{i(#WtYK0U+Mn*q+xR_C$SOMT%7*V<|; zi_#j>%G0X9G@E;JH?ALV6ZeI0t97mat{Uxg+vREj~nf7DQWoDk?-<8 zj$Y*9(=i`X+N+vJt?&KO=2IdGs2RF!I(yYu#8W&Eym}&zXA=GQ%<1THX4OnNk z&v@`zN|neP#CU4PdR8THIuux_lNp|R(f?V`P9zuHDSoNvJHn_V=wIX+RC|e(aPL6xBT~#x|=@$%vHg;E}(Bhgh%M!pAR|J*7C}81pY}5 zTc4&@(RPWC>E6SzKCDEjfSKJ9!~H z%OT2f+xr)1+GN2y1{I0x#(YN}ov>Dy?SpSMgtVmBH)?J!m%5zgcN!KKVz^^yRr%JSdg!V0L|=_P^S1imll4%bdr*EPZJAZTvGj z%KT&|mgC}Y1KRHrr`)P4g_j4qd{8+osafFCn^iJvPiDuYbXV`-miV7O-Eu9-xNsc6dw+e)7)vW=CEU)QEXx$Py7ZZ6yZKtd z=DVfIbGGstVH)$^WV1p;HjK5?xrZViIz3!{<;}m=mK(*%Z4EnD^b`CC9@{T}N-XIViBR3#)U>PcpSS3+8!@ibDs^9ecL7^-Rb9 zrsFfN9hM&4yZO2Mhx6frp;-Feb404=}6NO`oZQL>@nZ|oEGU;qFB literal 0 HcmV?d00001 From a061009d62dee98d7248a65b7b9ef5983679ef3a Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Tue, 30 Apr 2024 14:49:18 +0200 Subject: [PATCH 16/26] fix: Search link modal on Dark Mode Resolves #233 --- src/css/vendor/search.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/css/vendor/search.css b/src/css/vendor/search.css index 62b7152..7b42089 100644 --- a/src/css/vendor/search.css +++ b/src/css/vendor/search.css @@ -294,6 +294,10 @@ a.ais-Hits-item:hover { border-color: var(--nav-panel-divider-color); } +.dark-theme .search-link-box .search-link { + color: white; +} + .dark-theme #nomore { border-color: var(--nav-panel-divider-color); color: #fff; From df61fd423fa0bb007f7f2398dc538fa6e7739894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Thu, 2 May 2024 11:02:22 +0200 Subject: [PATCH 17/26] fix: Uppercase XML tab label Follow-up of #214, move the CSS rule to the right CSS file (asciidoctor-tabs.css). --- src/css/vendor/asciidoctor-tabs.css | 4 ++++ src/css/vendor/spring-tabs.css | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/css/vendor/asciidoctor-tabs.css b/src/css/vendor/asciidoctor-tabs.css index 7e12d2a..499b507 100644 --- a/src/css/vendor/asciidoctor-tabs.css +++ b/src/css/vendor/asciidoctor-tabs.css @@ -65,3 +65,7 @@ border: 0; padding: 0; } + +.doc li.tab[data-sync-id="Xml"] { + text-transform: uppercase; +} diff --git a/src/css/vendor/spring-tabs.css b/src/css/vendor/spring-tabs.css index 7c99d5f..afcfba5 100644 --- a/src/css/vendor/spring-tabs.css +++ b/src/css/vendor/spring-tabs.css @@ -68,7 +68,3 @@ padding: 1rem; background-color: var(--tabs-group-background-color); } - -.doc li.tab[data-sync-id="Xml"] { - text-transform: uppercase; -} From 420af974ae59e3f0622baac04fe8dbedd813ae7b Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Thu, 9 May 2024 15:26:17 +0200 Subject: [PATCH 18/26] feat: Sticky Breadcrumbs Resolves #237 --- src/css/breadcrumbs.css | 19 ++++++++++++++++- src/partials/breadcrumbs.hbs | 40 +++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 20 deletions(-) diff --git a/src/css/breadcrumbs.css b/src/css/breadcrumbs.css index 0eb079b..ea2d247 100644 --- a/src/css/breadcrumbs.css +++ b/src/css/breadcrumbs.css @@ -1,5 +1,8 @@ +.breadcrumbs-container { + padding-top: 2rem; +} + .breadcrumbs { - margin: 2.5rem 0 0; max-width: var(--doc-max-width); flex: 1 1; padding: 0; @@ -14,6 +17,20 @@ max-width: var(--doc-max-width--desktop); min-width: 0; } + .breadcrumbs-container { + position: fixed; + top: 80px; + padding: 1rem 0; + right: var(--toc-width--widescreen); + left: var(--nav-width); + margin-left: 3rem; + margin-right: 3rem; + background-color: var(--body-background-color); + border-bottom: 1px solid var(--nav-panel-divider-color); + } + .doc { + padding-top: 60px; + } } a + .breadcrumbs { diff --git a/src/partials/breadcrumbs.hbs b/src/partials/breadcrumbs.hbs index 24b6fb0..82d653a 100644 --- a/src/partials/breadcrumbs.hbs +++ b/src/partials/breadcrumbs.hbs @@ -1,20 +1,22 @@ - + + \ No newline at end of file From e93882db3e4ce41ea12ab266414ab1230b04e175 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Thu, 9 May 2024 15:26:41 +0200 Subject: [PATCH 19/26] feat: Sticky head sidebar Resolves #235 --- src/css/nav.css | 11 +++++++++-- src/css/vendor/search.css | 8 ++++++-- src/partials/nav-explore.hbs | 1 + src/partials/nav-menu.hbs | 1 - 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/css/nav.css b/src/css/nav.css index 35874be..640a1e6 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -177,6 +177,12 @@ html.is-clipped--nav { .nav-panel-menu .context { padding: 0.8rem 1rem; + padding-bottom: 0; + margin-bottom: 0.5rem; + position: sticky; + top: 0; + background-color: var(--body-background-color); + z-index: 99; } .nav-panel-menu .context .title { @@ -252,9 +258,10 @@ html.dark-theme button.browse-version:hover { .nav-menu .search { position: relative; border: 0 none; - height: 44px; + height: 40px; display: none; - margin-bottom: 0.5rem; + margin: 0 -1rem; + margin-top: 1rem; } .nav-resize { diff --git a/src/css/vendor/search.css b/src/css/vendor/search.css index 7b42089..ddfa504 100644 --- a/src/css/vendor/search.css +++ b/src/css/vendor/search.css @@ -12,7 +12,7 @@ color: var(--body-font-color); background: var(--body-background-color); text-align: left; - padding-left: 35px; + padding-left: 50px; border: 1px solid var(--nav-panel-divider-color); border-left-width: 0; border-right-width: 0; @@ -67,7 +67,7 @@ .DocSearch-Button svg { position: absolute; top: 10px; - left: 10px; + left: 25px; width: 20px; fill: var(--body-font-color); } @@ -333,5 +333,9 @@ a.ais-Hits-item:hover { .DocSearch-Button { border-left-width: 1px; border-right-width: 1px; + padding-left: 35px; + } + .DocSearch-Button svg { + left: 10px; } } diff --git a/src/partials/nav-explore.hbs b/src/partials/nav-explore.hbs index 0aa2622..9d7bbf0 100644 --- a/src/partials/nav-explore.hbs +++ b/src/partials/nav-explore.hbs @@ -18,4 +18,5 @@ d="M384,224c-17.7,0-32,14.3-32,32s14.3,32,32,32s32-14.3,32-32S401.7,224,384,224L384,224z" > + {{> nav-search}} \ No newline at end of file diff --git a/src/partials/nav-menu.hbs b/src/partials/nav-menu.hbs index c99b74a..4a04b9d 100644 --- a/src/partials/nav-menu.hbs +++ b/src/partials/nav-menu.hbs @@ -1,4 +1,3 @@ -{{> nav-search}} {{#with page.navigation}} {{> nav-tree navigation=this}} {{/with}} From 0b29699d68318b2cec450cc6cc09fe2cd9a00cd9 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Tue, 14 May 2024 16:06:18 -0500 Subject: [PATCH 20/26] Add log helper function Closes gh-242 --- src/helpers/log.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/helpers/log.js diff --git a/src/helpers/log.js b/src/helpers/log.js new file mode 100644 index 0000000..87e6622 --- /dev/null +++ b/src/helpers/log.js @@ -0,0 +1,3 @@ +'use strict' + +module.exports = (a) => console.log(JSON.stringify(a, null, 2)) From 33015498f84e624b1cf5db62869807b86e99e2ae Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Tue, 14 May 2024 16:07:52 -0500 Subject: [PATCH 21/26] Write roles and target for nav-tree.hbs Closes gh-243 --- src/partials/nav-tree.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partials/nav-tree.hbs b/src/partials/nav-tree.hbs index 79e3c1e..3bb495b 100644 --- a/src/partials/nav-tree.hbs +++ b/src/partials/nav-tree.hbs @@ -7,7 +7,7 @@ {{/if}} {{#if ./url}} - {{{./content}}} {{else}} From de1a789e9d39fc7951e1accd1c90137d3707fc5b Mon Sep 17 00:00:00 2001 From: Phil Webb Date: Thu, 16 May 2024 06:51:19 -0700 Subject: [PATCH 22/26] feat: Visual indicator for External link in the sidebar Resolves #240 --- gulp.d/tasks/generate-octicons.js | 1 + preview-src/ui-model.yml | 4 +++ src/css/nav.css | 10 ++++++++ src/img/octicons-16.svg | 42 ++++++++++++++++++------------- 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/gulp.d/tasks/generate-octicons.js b/gulp.d/tasks/generate-octicons.js index de19fce..dbd48af 100644 --- a/gulp.d/tasks/generate-octicons.js +++ b/gulp.d/tasks/generate-octicons.js @@ -16,6 +16,7 @@ const icons = [ 'info', 'law', 'light-bulb', + 'link-external', 'moon', 'question', 'rocket', diff --git a/preview-src/ui-model.yml b/preview-src/ui-model.yml index f036673..4906a0b 100644 --- a/preview-src/ui-model.yml +++ b/preview-src/ui-model.yml @@ -104,6 +104,10 @@ shared: url: '/samples/edge-cases/index.html' - content: 404 url: '/404.html' + - content: External Link + url: 'https://spring.io' + roles: 'link-external' + target: '_blank' baz: 1.0.0: home: true diff --git a/src/css/nav.css b/src/css/nav.css index 640a1e6..da0c6d8 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -80,6 +80,16 @@ html.is-clipped--nav { margin: 0 0 0 0.75rem; } +.nav-list a.link-external::after { + content: url(../img/octicons-16.svg#view-link-external); + width: 16px; + height: 16px; + display: inline-block; + vertical-align: middle; + margin: 0 0 2px 5px; + filter: opacity(0.5); +} + .nav-menu > .nav-list + .nav-list { margin-top: 0.5rem; } diff --git a/src/img/octicons-16.svg b/src/img/octicons-16.svg index b58752f..1c7cad3 100644 --- a/src/img/octicons-16.svg +++ b/src/img/octicons-16.svg @@ -92,58 +92,64 @@ + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + \ No newline at end of file From 6b3b45fa352026b94417479121a2b7ea1d189be5 Mon Sep 17 00:00:00 2001 From: Damien Vitrac Date: Thu, 16 May 2024 20:02:34 +0200 Subject: [PATCH 23/26] feat: Visually distinguish captions from floating text Resolves #224 --- src/css/vars.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/css/vars.css b/src/css/vars.css index 9265498..e0ed3e3 100644 --- a/src/css/vars.css +++ b/src/css/vars.css @@ -48,6 +48,7 @@ --scrollbar-thumb-color: silver; --mark-background-color: #80ea6e; --selected-background-color: #191e1e; + --caption-font-style: italic; /* Layout */ --layout-banner-height: 80px; From 6f7d82cb1ea6bb26666ebe1ba31533404c6c82a9 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 16 May 2024 14:12:45 -0500 Subject: [PATCH 24/26] Add antora-ui-version meta element Used to test rm -rf build; gulp bundle && cat public/_/partials/head-meta.hbs && unzip -q build/*.zip -d build && cat build/partials/head-meta.hbs Closes gh-245 --- gulp.d/tasks/build.js | 6 +- package-lock.json | 141 ++++++++++++++++++++++++++++++++++++- package.json | 5 +- src/partials/head-meta.hbs | 1 + 4 files changed, 150 insertions(+), 3 deletions(-) diff --git a/gulp.d/tasks/build.js b/gulp.d/tasks/build.js index 5d31899..6e7090e 100644 --- a/gulp.d/tasks/build.js +++ b/gulp.d/tasks/build.js @@ -17,9 +17,11 @@ const postcssUrl = require('postcss-url') const postcssVar = require('postcss-custom-properties') const { Transform } = require('stream') const map = (transform) => new Transform({ objectMode: true, transform }) +const replace = require('gulp-replace') const through = () => map((file, enc, next) => next(null, file)) const uglify = require('gulp-uglify') const vfs = require('vinyl-fs') +const git = require('git-rev-sync') module.exports = (src, dest, preview) => () => { const opts = { base: src, cwd: src } @@ -101,7 +103,9 @@ module.exports = (src, dest, preview) => () => { vfs.src('helpers/*.js', opts), vfs.src('layouts/*.hbs', opts), vfs.src('partials/*.hbs', opts) - ).pipe(vfs.dest(dest, { sourcemaps: sourcemaps && '.' })) + .pipe(replace('@@antora-ui-version', git.isTagDirty() ? git.long() : git.tag())) + ).pipe(vfs.dest(dest, { sourcemaps: sourcemaps && '.' }) + ) } function bundle ({ base: basedir, ext: bundleExt = '.bundle.js' }) { diff --git a/package-lock.json b/package-lock.json index 1bce9c1..7781452 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,8 @@ "license": "MPL-2.0", "dependencies": { "@algolia/client-search": "^4.17.0", - "@primer/octicons": "^19.8.0" + "@primer/octicons": "^19.8.0", + "init": "^0.1.2" }, "devDependencies": { "@asciidoctor/core": "~2.2", @@ -32,12 +33,14 @@ "eslint-plugin-promise": "~4.2", "eslint-plugin-standard": "~4.0", "fancy-log": "~2.0", + "git-rev-sync": "^3.0.2", "gulp": "~4.0", "gulp-concat": "~2.6", "gulp-connect": "~5.7", "gulp-eslint": "~6.0", "gulp-imagemin": "~6.2", "gulp-postcss": "~9.0", + "gulp-replace": "~1.1", "gulp-stylelint": "~13.0", "gulp-uglify": "~3.0", "gulp-vinyl-zip": "~2.5", @@ -927,6 +930,12 @@ "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", "dev": true }, + "node_modules/@types/expect": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", + "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", + "dev": true + }, "node_modules/@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -1019,6 +1028,16 @@ "integrity": "sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==", "dev": true }, + "node_modules/@types/vinyl": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.12.tgz", + "integrity": "sha512-Sr2fYMBUVGYq8kj3UthXFAu5UN6ZW+rYr4NACjZQJvHvj+c8lYv0CahmZ2P/r7iUkN44gGUBwqxZkrKXYPb7cw==", + "dev": true, + "dependencies": { + "@types/expect": "^1.20.4", + "@types/node": "*" + } + }, "node_modules/@typescript-eslint/experimental-utils": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", @@ -2346,6 +2365,18 @@ "node": ">=0.10.0" } }, + "node_modules/binaryextensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.3.0.tgz", + "integrity": "sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==", + "dev": true, + "engines": { + "node": ">=0.8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/bindings": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", @@ -4027,6 +4058,14 @@ "type": "^1.0.1" } }, + "node_modules/daemon": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/daemon/-/daemon-1.1.0.tgz", + "integrity": "sha512-1vX9YVcP21gt12nSD3SQRC/uPU7fyA6M8qyClTBIFuiRWoylFn57PwXhjBAqRl085bZAje7sILhZU48qcS9SWw==", + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/dash-ast": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-2.0.1.tgz", @@ -6582,6 +6621,23 @@ "once": "^1.3.1" } }, + "node_modules/git-rev-sync": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/git-rev-sync/-/git-rev-sync-3.0.2.tgz", + "integrity": "sha512-Nd5RiYpyncjLv0j6IONy0lGzAqdRXUaBctuGBbrEA2m6Bn4iDrN/9MeQTXuiquw8AEKL9D2BW0nw5m/lQvxqnQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "1.0.5", + "graceful-fs": "4.1.15", + "shelljs": "0.8.5" + } + }, + "node_modules/git-rev-sync/node_modules/graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, "node_modules/glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", @@ -7082,6 +7138,22 @@ "node": ">= 0.10" } }, + "node_modules/gulp-replace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.1.4.tgz", + "integrity": "sha512-SVSF7ikuWKhpAW4l4wapAqPPSToJoiNKsbDoUnRrSgwZHH7lH8pbPeQj1aOVYQrbZKhfSVBxVW+Py7vtulRktw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/vinyl": "^2.0.4", + "istextorbinary": "^3.0.0", + "replacestream": "^4.0.3", + "yargs-parser": ">=5.0.0-security.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/gulp-stylelint": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/gulp-stylelint/-/gulp-stylelint-13.0.0.tgz", @@ -7926,6 +7998,17 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "node_modules/init": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/init/-/init-0.1.2.tgz", + "integrity": "sha512-IvHUjULS2q+BXJdiu4FHkByh3+qSFmkOXQ2ItSfYTtkdUksQc0yNX6f1uDyokzRV71tjpFsFc3ckeYLJXunTGw==", + "dependencies": { + "daemon": ">=0.3.0" + }, + "engines": { + "node": ">=0.4.7" + } + }, "node_modules/inline-source-map": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", @@ -8825,6 +8908,22 @@ "node": ">=0.10.0" } }, + "node_modules/istextorbinary": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-3.3.0.tgz", + "integrity": "sha512-Tvq1W6NAcZeJ8op+Hq7tdZ434rqnMx4CCZ7H0ff83uEloDvVbqAwaMTZcafKGJT0VHkYzuXUiCY4hlXQg6WfoQ==", + "dev": true, + "dependencies": { + "binaryextensions": "^2.2.0", + "textextensions": "^3.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/isurl": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", @@ -13999,6 +14098,17 @@ "node": ">= 0.10" } }, + "node_modules/replacestream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", + "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.3", + "object-assign": "^4.0.1", + "readable-stream": "^2.0.2" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -14697,6 +14807,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -16694,6 +16821,18 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/textextensions": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-3.3.0.tgz", + "integrity": "sha512-mk82dS8eRABNbeVJrEiN5/UMSCliINAuz8mkUwH4SwslkNP//gbEzlWNS5au0z5Dpx40SQxzqZevZkn+WYJ9Dw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", diff --git a/package.json b/package.json index 9f0367b..efbdce6 100644 --- a/package.json +++ b/package.json @@ -39,12 +39,14 @@ "eslint-plugin-promise": "~4.2", "eslint-plugin-standard": "~4.0", "fancy-log": "~2.0", + "git-rev-sync": "^3.0.2", "gulp": "~4.0", "gulp-concat": "~2.6", "gulp-connect": "~5.7", "gulp-eslint": "~6.0", "gulp-imagemin": "~6.2", "gulp-postcss": "~9.0", + "gulp-replace": "~1.1", "gulp-stylelint": "~13.0", "gulp-uglify": "~3.0", "gulp-vinyl-zip": "~2.5", @@ -69,6 +71,7 @@ }, "dependencies": { "@algolia/client-search": "^4.17.0", - "@primer/octicons": "^19.8.0" + "@primer/octicons": "^19.8.0", + "init": "^0.1.2" } } diff --git a/src/partials/head-meta.hbs b/src/partials/head-meta.hbs index a3fd907..e348936 100644 --- a/src/partials/head-meta.hbs +++ b/src/partials/head-meta.hbs @@ -1,4 +1,5 @@ {{!-- Add additional meta tags here --}} + {{!-- replaced by the gulp build --}} From bf50410113275a4d86c5937a1f76ba388d895286 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 17 May 2024 10:20:09 -0700 Subject: [PATCH 25/26] Fix external link styling in dark mode --- src/css/nav.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/css/nav.css b/src/css/nav.css index da0c6d8..7d3e79c 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -90,6 +90,10 @@ html.is-clipped--nav { filter: opacity(0.5); } +.dark-theme .nav-list a.link-external::after { + filter: invert() opacity(0.4); +} + .nav-menu > .nav-list + .nav-list { margin-top: 0.5rem; } From cc45ff4e1c62bac3f94d8e3f6ab7b16c8990ceef Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 17 May 2024 10:22:03 -0700 Subject: [PATCH 26/26] Fix Chrome rendering issue --- src/css/nav.css | 8 ++++---- src/img/link-external.svg | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 src/img/link-external.svg diff --git a/src/css/nav.css b/src/css/nav.css index 7d3e79c..afcd7ac 100644 --- a/src/css/nav.css +++ b/src/css/nav.css @@ -81,12 +81,12 @@ html.is-clipped--nav { } .nav-list a.link-external::after { - content: url(../img/octicons-16.svg#view-link-external); - width: 16px; - height: 16px; + content: url(../img/link-external.svg); + width: 14px; + height: 14px; display: inline-block; vertical-align: middle; - margin: 0 0 2px 5px; + margin: 0 0 6px 5px; filter: opacity(0.5); } diff --git a/src/img/link-external.svg b/src/img/link-external.svg new file mode 100644 index 0000000..8824c41 --- /dev/null +++ b/src/img/link-external.svg @@ -0,0 +1 @@ + \ No newline at end of file