diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
index 37650e2..88d5a4b 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/push.yml
@@ -12,13 +12,13 @@ jobs:
uses: actions/checkout@v4
- name: Setup Java
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: 17
distribution: oracle
- name: Setup node
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: latest
@@ -34,7 +34,7 @@ jobs:
touch website/.nojekyll
- name: Deploy to GitHub Pages
- uses: JamesIves/github-pages-deploy-action@4.0.0
+ uses: JamesIves/github-pages-deploy-action@v4.6.3
with:
folder: website
branch: 'gh-pages'
diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml
index b511faa..e68d6fb 100644
--- a/.github/workflows/site.yml
+++ b/.github/workflows/site.yml
@@ -11,13 +11,13 @@ jobs:
uses: actions/checkout@v4
- name: Setup Java
- uses: actions/setup-java@v3
+ uses: actions/setup-java@v4
with:
java-version: 17
distribution: oracle
- name: Setup node
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: latest
@@ -33,7 +33,7 @@ jobs:
touch website/.nojekyll
- name: Deploy to GitHub Pages
- uses: JamesIves/github-pages-deploy-action@4.0.0
+ uses: JamesIves/github-pages-deploy-action@v4.6.3
with:
folder: website
branch: 'gh-pages'
diff --git a/.gitignore b/.gitignore
index e8e3377..3dc1741 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,7 +10,6 @@ target/
.project
tmp/
.DS_Store
-package.json
package-lock.json
node_modules
diff --git a/antora-default-ui/docs/modules/ROOT/pages/add-static-files.adoc b/antora-default-ui/docs/modules/ROOT/pages/add-static-files.adoc
deleted file mode 100644
index a5ddb79..0000000
--- a/antora-default-ui/docs/modules/ROOT/pages/add-static-files.adoc
+++ /dev/null
@@ -1,99 +0,0 @@
-= Add Static Files
-
-A static UI file is any file provided by the UI that is added directly to your site.
-A common example of a static file is a favicon image.
-One way to add static files is by using the xref:antora:playbook:ui-supplemental-files.adoc[supplemental UI], which is defined in your Antora playbook.
-This document explains how to add static files using a UI bundle instead.
-
-== Set up the static files folder
-
-You'll first need a place to store the static files in the UI project.
-Let's create a folder under [.path]_src_ named [.path]_static_ for this purpose.
-
- $ mkdir src/static
-
-You can add static files, such as a favicon image (e.g., [.path]_favicon.ico_), to this folder.
-The UI build will add files in this folder to the root of the UI bundle, dropping the [.path]_static_ folder prefix from the path.
-
-Antora automatically passes through static files in the bundle to the UI output folder (`+_+` by default), ignoring any hidden files (i.e., files that begin with a dot).
-A static file is any file that's not designated as a layout, partial, or helper.
-That means our favicon image file will end up at the path [.path]_++_/favicon.ico++_.
-
-.Contents of site
-....
-_/
- favicon.ico
- css/
- site.css
- ...
-sitemap.xml
-...
-....
-
-If that's where you want the file to go, there's nothing else you have to do.
-Otherwise, you have the option of promoting select static files to the site root.
-
-== Promote static files
-
-If you want to promote certain static files out of the UI output folder, you need to identify them.
-Antora looks for a file named [.path]_ui.yml_, the UI descriptor, in the UI bundle to configure the behavior of the UI.
-
-Start by creating the file [.path]_src/ui.yml_ in your UI project.
-The UI build copies this file, if present, to the root of the UI bundle.
-
-This file does not have any required keys.
-The key we're interested in is `static_files`.
-This key identifies files by relative path in the UI bundle that should be promoted from the UI output folder to the site root.
-The files must be specified as an array, where each entry is either a relative paths or a path glob.
-Unlike other static files, promoted static files can begin with a dot.
-
-Here's how to configure the UI descriptor to promote the favicon image file to the site root.
-
-.src/ui.yml
-[,yaml]
-----
-static_files:
-- favicon.ico
-----
-
-If you have multiple favicon files with different file extensions, you can match all of them using a glob.
-
-.src/ui.yml
-[,yaml]
-----
-static_files:
-- favicon*
-----
-
-With this configuration in place, Antora will read the favicon image from the UI bundle and copy it to the root of the site.
-
-.Contents of site
-....
-_/
- css/
- site.css
- ...
-favicon.ico
-sitemap.xml
-...
-....
-
-Let's now look at how to put the static files to use.
-
-== Use the static files
-
-Often when you add static files to your site, you need to reference them somewhere.
-In the case of a favicon image, it must be referenced in the `
` of the HTML page.
-If you are referencing a promoted static file, you'll use the prefix `+{{{siteRootPath}}}+`.
-Otherwise, you'll use the prefix `+{{{uiRootPath}}}+`.
-
-Let's update the [.path]_src/partials/head-icons.hbs_ partial to reference the favicon image at the root of the site.
-
-.src/partials/head-icons.hbs
-[,yaml]
-----
-
-----
-
-Rebuild the UI with `gulp bundle`.
-You should now see that your site has a favicon image that's provided by the UI bundle.
diff --git a/antora-default-ui/docs/modules/ROOT/pages/copy-to-clipboard.adoc b/antora-default-ui/docs/modules/ROOT/pages/copy-to-clipboard.adoc
deleted file mode 100644
index 0eaf058..0000000
--- a/antora-default-ui/docs/modules/ROOT/pages/copy-to-clipboard.adoc
+++ /dev/null
@@ -1,48 +0,0 @@
-= Copy to clipboard
-
-This page describes the copy to clipboard feature added to source blocks when using the default UI.
-
-== Source blocks
-
-The default UI provides JavaScript that adds a clipboard button to all source blocks.
-The clipboard button shows up next to the language label when the mouse is hovered over the block.
-When the user clicks the clipboard button, the contents of the source block will be copied to the user's clipboard.
-
-You can try this behavior below:
-
-[,ruby]
-----
-puts 'Take me to your clipboard!'
-----
-
-IMPORTANT: Copy to clipboard only works for a local site or if the site is hosted over https (SSL).
-The copy to clipboard does not work on an insecure site (http) since the clipboard API is not available in that environment.
-In that case, the behavior gracefully degrades so the user will not see the clipboard button or an error.
-
-== Console blocks
-
-The default UI also adds a clipboard button to all console blocks.
-A console block is either a literal paragraph that begins with a `$` or a source block with the language `console`.
-
-The script provided by the default UI will automatically strip the `$` prompt at the beginning of each line and join the lines with `&&`.
-In <>, since the language is `console` and each line begins with a `$`, the console copy-paste logic is triggered.
-
-.Copy to clipboard for a multi-line console command
-[#ex-console-copy-paste]
-------
-[,console]
-----
-$ mkdir example
-$ cd example
-----
-------
-
-When a user uses the copy-to-clipboard button, they will copy the combined command `mkdir example && cd example` instead of the literal text shown.
-This can be useful for tutorial examples that a user is expected to copy-paste to run.
-You can try this behavior below:
-
-[,console]
-----
-$ mkdir example
-$ cd example
-----
diff --git a/antora-default-ui/gulp.d/tasks/pack.js b/antora-default-ui/gulp.d/tasks/pack.js
deleted file mode 100644
index a792e72..0000000
--- a/antora-default-ui/gulp.d/tasks/pack.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict'
-
-const vfs = require('vinyl-fs')
-const zip = require('gulp-vinyl-zip')
-const path = require('path')
-
-module.exports = (src, dest, bundleName, onFinish) => () =>
- vfs
- .src('**/*', { base: src, cwd: src })
- .pipe(zip.dest(path.join(dest, `${bundleName}-bundle.zip`)))
- .on('finish', () => onFinish && onFinish(path.resolve(dest, `${bundleName}-bundle.zip`)))
diff --git a/antora-default-ui/src/partials/toolbar.hbs b/antora-default-ui/src/partials/toolbar.hbs
deleted file mode 100644
index c6e9ea6..0000000
--- a/antora-default-ui/src/partials/toolbar.hbs
+++ /dev/null
@@ -1,13 +0,0 @@
-
(.+?)<\/h2>/)
+ if (!firstVersion) return
+ const result = { anchor: firstVersion[1] }
+ if (isVersion(firstVersion[2])) result.innerText = firstVersion[2]
+ return result
+}
+
+function isVersion (versionText) {
+ return /^[0-9]+\.[0-9]+(?:\.[0-9]+)?/.test(versionText)
+}
+
+function removeYear (dateStr) {
+ if (!isValidDate(dateStr)) return
+ const dateObj = new Date(dateStr)
+ return `${dateObj.toLocaleString('default', { month: 'short' })} ${dateObj.getDate()}`
+}
+
+function cleanTitle (title) {
+ return title.split('Release Notes')[0].trim()
+}
diff --git a/antora-default-ui/docs/modules/ROOT/pages/add-fonts.adoc b/antora-ui-default/docs/modules/ROOT/pages/add-fonts.adoc
similarity index 98%
rename from antora-default-ui/docs/modules/ROOT/pages/add-fonts.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/add-fonts.adoc
index e4d2848..977551f 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/add-fonts.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/add-fonts.adoc
@@ -21,7 +21,7 @@ Here are the steps involved.
. Use npm (or Yarn) to install the font files from a package (e.g., https://www.npmjs.com/package/typeface-open-sans[typeface-open-sans])
- $ npm install --save typeface-open-sans
+ $ npm i --save typeface-open-sans
. In [.path]_src/css_, add a corresponding CSS file (e.g., [.path]_typeface-open-sans.css_)
. In that file, declare the font face:
@@ -64,7 +64,7 @@ TIP: If you're building on the default UI, you may instead want to define or upd
. Test the new font by previewing your UI:
- $ gulp preview
+ $ npx gulp preview
If you see the new font, you've now successfully added it to your UI.
If you aren't sure, look for the https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Edit_fonts[All fonts on page] section in your browser's developer tools to see whether the font was loaded.
@@ -117,7 +117,7 @@ TIP: If you're building on the default UI, you may instead want to define or upd
. Test the new font by previewing your UI:
- $ gulp preview
+ $ npx gulp preview
If you see the new font, you've now successfully added it to your UI.
If you aren't sure, look for the https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Edit_fonts[All fonts on page] section in your browser's developer tools to see whether the font was loaded.
diff --git a/antora-ui-default/docs/modules/ROOT/pages/add-static-files.adoc b/antora-ui-default/docs/modules/ROOT/pages/add-static-files.adoc
new file mode 100644
index 0000000..0f07416
--- /dev/null
+++ b/antora-ui-default/docs/modules/ROOT/pages/add-static-files.adoc
@@ -0,0 +1,227 @@
+= Add Static Files
+
+A static UI file is any file provided by the UI that's copied directly to your site.
+A common example of a static file is a favicon image.
+One way to add additional static files is by using the xref:antora:playbook:ui-supplemental-files.adoc[supplemental UI], which is defined in your Antora playbook.
+This document explains how to add static files from the UI bundle instead.
+A key benefit of putting static files in the UI bundle is that they can be shared across multiple projects instead of having to add them per project using the supplemental UI.
+
+== How Antora identifies static UI files
+
+Antora recognizes a number of non-publishable files and folders at the top level of a UI bundle.
+This list consists of the folders [.path]_helpers_, [.path]_layouts_, and [.path]_partials_ and the optional [.path]_ui.yml_ file.
+Although these files and folders are present in the UI bundle, they are not copied into the site's output directory.
+In other words, they are _not_ static files.
+Instead, they're used to compose the HTML pages that are published or for configuration.
+
+Any files or folders from the UI bundle that Antora does not recognize are classified as static.
+Static files and folders are automatically copied from the UI bundle to the site's output directory underneath the UI output directory (e.g., [.path]_++_++_), preserving the relative path of the file from the UI bundle.
+Any files or folders that begin with a dot (i.e., hidden) are ignored unless explicitly listed as static files.
+
+Antora's default UI already has several intrinsic static folders.
+This list includes the [.path]_css_, [.path]_font_ (generated), [.path]_img_, and [.path]_js_ folders.
+
+Although not used in the default UI, the UI build also recognizes another static folder named [.path]_src/static_.
+If the UI build finds any files inside this folder, including any files that are nested, it copies them directly to the root of the UI bundle, preserving any subfolders.
+
+Let's take advantage of this feature to add several new static files to the UI bundle.
+First, create a folder under [.path]_src_ named [.path]_static_:
+
+ $ mkdir src/static
+
+Let's now add several files, including one that is hidden, to the [.path]_src/static_ folder.
+Here's a file tree that shows the location of these new files:
+
+....
+src/
+ static/
+ about/
+ notice.txt
+ .DS_Store
+ favicon.ico
+ favicon.png
+....
+
+Let's now consider how static files flow from the UI project to the published site.
+We'll start with where these files reside within the UI project (non-static files not shown here):
+
+.UI project
+....
+src/
+ ...
+ css/
+ ...
+ img/
+ back.svg
+ ...
+ js/
+ ...
+ static/
+ about/
+ notice.txt
+ .DS_Store
+ favicon.ico
+ favicon.png
+....
+
+The UI build will assemble the files into the UI bundle as follows:
+
+.Contents of UI bundle
+....
+...
+css/
+ site.css
+font/
+ roboto-latin-400-italic.woff
+ ...
+img/
+ back.svg
+ ...
+js/
+ site.js
+about/
+ notice.txt
+.DS_Store
+favicon.ico
+favicon.png
+....
+
+NOTE: The [.path]_font_ folder is introduced by the UI build.
+
+When using this UI bundle in an Antora build, the contents of the output directory of your site will look like this:
+
+.Contents of site output directory
+....
+_/
+ css/
+ site.css
+ font/
+ roboto-latin-400-italic.woff
+ ...
+ img/
+ back.svg
+ ...
+ js/
+ site.js
+ about/
+ notice.txt
+ favicon.ico
+ favicon.png
+component-a/
+ ...
+sitemap.xml
+...
+....
+
+As stated earlier, static files are copied to the UI output directory (e.g., [.path]_++_++_) in the published site by default.
+In this directory, we see the [.path]_css_, [.path]_font_, [.path]_img_ and [.path]_js_ folders, all static folders provided by the default UI.
+We also see the [.path]_about_ folder and the favicon files we added to the UI project in the first step.
+We do not see the [.path]_helpers_, [.path]_partials_, and [.path]_layouts_ folders since they're not static files.
+We also don't see the [.path]_.DS_Store_ file since it's a hidden file.
+
+If the UI output directory is where you want static files to end up, there's nothing else you have to do.
+If you want all or some of the static files to be moved to the site root, you need to add additional configuration to promote them.
+
+== Promote static files
+
+If you want to promote certain static files to the root of your site, you need to identify them.
+You identify them using the [.path]_ui.yml_ file.
+This file, called the UI descriptor, is used to configure the behavior of the UI.
+The UI descriptor must be located at the root of the UI bundle.
+
+The UI descriptor has one required key, `static_files`, which is the one we're interested in.
+The `static_files` key identifies files that should be promoted from the UI output directory to the site root (i.e., the site output directory).
+The files you want to promote must be specified as an array, where each entry is either an exact relative path or a glob of relative paths in the UI bundle.
+The exact path or path glob must match files, not folders.
+Unlike implicit static files, promoted static files can begin with a dot (and are thus not ignored).
+
+To configure static files to promote, start by creating the file [.path]_src/ui.yml_ in your UI project.
+If this file exists, the UI build will copy the file from there to the root of the UI bundle.
+
+Next, add the `static_files` key to this file and add an entry for the [.path]_favicon.ico_ file.
+This entry will configure the UI to promote the favicon to the site root.
+
+.src/ui.yml
+[,yaml]
+----
+static_files:
+- favicon.ico
+----
+
+If you have multiple favicon files with different suffixes or file extensions, you can match all of them using a wildcard (aka glob).
+
+.src/ui.yml
+[,yaml]
+----
+static_files:
+- favicon*
+----
+
+With this configuration in place, Antora will read the favicon images from the UI bundle and copy them to the root of the site.
+Static files that are not identified are still copied to UI output directory.
+The result of the above [.path]_ui.yml_ would be the following:
+
+.Contents of site output directory
+....
+_/
+ css/
+ site.css
+ font/
+ roboto-latin-400-italic.woff
+ ...
+ img/
+ back.svg
+ ...
+ js/
+ site.js
+ about/
+ notice.txt
+component-a/
+favicon.ico
+favicon.png
+ ...
+sitemap.xml
+...
+....
+
+Notice that the promoted favicon files are now at the site root rather than inside the UI output directory.
+However, the [.path]_about_ folder is still inside the UI output directory.
+Let's promote that one as well.
+
+You can identify all files in a folder using the wildcard `+*+` in the last path segment, such as `+folder/*+`.
+You can identify all files in a folder at any depth using the wildcard `+**+` in the last path segment, such as `+folder/**+`.
+Matching a folder has no effect (e.g., `folder`).
+Wildcards never match hidden files.
+Hidden files must always be written using an exact path match.
+
+Let's also promote all files in the [.path]_about_ folder by adding the wildcard match the `static_files` key in the [.path]_ui.yml_ file.
+
+.src/ui.yml
+....
+static_files:
+- favicon*
+- about/*
+....
+
+Using this configuration, the [.path]_about_ folder will end up at the site root, adjacent to the favicon files, instead of inside the UI output directory.
+Notice that the [.path]_about_ folder is copied too, not just its contents.
+
+Now that the static files are where you want them, let's look at how to reference them from the HTML pages.
+
+== Use the static files
+
+Often when you add static files to your site, you need to reference them somewhere.
+In the case of a favicon image, it must be referenced in the `` of the HTML page.
+If you are referencing a promoted static file, you'll use the prefix `+{{{siteRootPath}}}+`.
+Otherwise, you'll use the prefix `+{{{uiRootPath}}}+`.
+
+Let's update the [.path]_src/partials/head-icons.hbs_ partial to reference a promoted favicon image at the root of the site.
+
+.src/partials/head-icons.hbs
+[,yaml,indent=4]
+----
+
+----
+
+Rebuild the UI with `gulp bundle`.
+You should now see that your site has a favicon image that's provided by the UI bundle.
diff --git a/antora-default-ui/docs/modules/ROOT/pages/admonition-styles.adoc b/antora-ui-default/docs/modules/ROOT/pages/admonition-styles.adoc
similarity index 100%
rename from antora-default-ui/docs/modules/ROOT/pages/admonition-styles.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/admonition-styles.adoc
diff --git a/antora-default-ui/docs/modules/ROOT/pages/build-preview-ui.adoc b/antora-ui-default/docs/modules/ROOT/pages/build-preview-ui.adoc
similarity index 96%
rename from antora-default-ui/docs/modules/ROOT/pages/build-preview-ui.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/build-preview-ui.adoc
index f55cdd7..7f1f0c6 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/build-preview-ui.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/build-preview-ui.adoc
@@ -20,7 +20,7 @@ The next two sections explain how to use these modes.
To build the UI once for preview, then stop, execute the following command:
- $ gulp preview:build
+ $ npx gulp preview:build
This task pre-compiles the UI files into the [.path]_public_ directory.
To view the preview pages, navigate to the HTML pages in the [.path]_public_ directory using your browser (e.g., [.path]_public/index.html_).
@@ -32,7 +32,7 @@ This task also launches a local HTTP server so updates get synchronized with the
To launch the preview server, execute the following command:
- $ gulp preview
+ $ npx gulp preview
You'll see a URL listed in the output of this command:
@@ -53,7 +53,7 @@ Press kbd:[Ctrl+C] to stop the preview server and end the continuous build.
If you need to bundle the UI in order to preview the UI on the real site in local development, run the following command:
- $ gulp bundle
+ $ npx gulp bundle
The `bundle` command also invokes the `lint` command to check that the CSS and JavaScript follow the coding standards.
@@ -62,6 +62,6 @@ You can then point Antora at this bundle using the `--ui-bundle-url` command-lin
If you have the preview running, and you want to bundle without causing the preview to be clobbered, use:
- $ gulp bundle:pack
+ $ npx gulp bundle:pack
The UI bundle will again be available at [.path]_build/ui-bundle.zip_.
diff --git a/antora-ui-default/docs/modules/ROOT/pages/code-blocks.adoc b/antora-ui-default/docs/modules/ROOT/pages/code-blocks.adoc
new file mode 100644
index 0000000..b334b3d
--- /dev/null
+++ b/antora-ui-default/docs/modules/ROOT/pages/code-blocks.adoc
@@ -0,0 +1,92 @@
+= Code Blocks
+:page-aliases: copy-to-clipboard.adoc
+
+This page describes some of the styles and behaviors of code blocks and how to support them in a custom UI.
+
+In AsciiDoc, code blocks a referred to as source and listing blocks.
+A source block is a listing block that has a source language defined on it (e.g., javascript).
+Refer to xref:antora:asciidoc:source.adoc[source blocks] to learn more about source blocks in AsciiDoc and how they are used in Antora.
+
+Readers typically expect that a source block will be presented with syntax highlighting, so we'll start there.
+
+== Syntax highlighting
+
+Antora uses highlight.js as syntax highlighter in the AsciiDoc processor by default.
+
+If you want to turn off syntax highlighting, you can do so by unsetting the `source-highlighter` attribute in the Antora playbook.
+
+[,yaml]
+----
+asciidoc:
+ attributes:
+ source-highlighter: ~
+----
+
+If you soft unset the value instead (i.e., set the value to `false`), it allows individual pages to selectively turn syntax highlighting back on.
+
+By default, Antora highlights a restricted set of languages in order to minimize the size of the supporting asset files.
+However, you can add or remove support for languages in your own UI bundle.
+To do so, follow these steps:
+
+. Switch to your UI project.
+. Open the file [.path]_src/js/vendor/highlight.bundle.js_.
+. Add or remove one of the `registerLanguage` statements.
+
+For example, to add AsciiDoc syntax highlighting, add the following line:
+
+[,js]
+----
+ hljs.registerLanguage('asciidoc', require('highlight.js/lib/languages/asciidoc'))
+----
+
+Keep in mind, the language must be supported by highlight.js.
+To find out what languages are supported and how to abbreviate them, set the https://github.com/highlightjs/highlight.js/tree/9-18-stable/src/languages[languages] folder in the project on GitHub.
+
+== Copy to clipboard
+
+This page describes the copy to clipboard feature added to source blocks when using the default UI.
+
+=== Source blocks
+
+The default UI automatically adds a clipboard button to all source blocks and provides the necesssary CSS and JavaScript to support that behavior.
+The clipboard button shows up next to the language label when the mouse is hovered over the block.
+When the user clicks the clipboard button, the contents of the source block will be copied to the user's clipboard and a notification overlay will be briefly shown.
+
+You can try this behavior below:
+
+[,ruby]
+----
+puts 'Take me to your clipboard!'
+----
+
+IMPORTANT: Copy to clipboard only works for a local site or if the site is hosted over https (SSL).
+The copy to clipboard does not work on an insecure site (http) since the clipboard API is not available in that environment.
+In that case, the behavior gracefully degrades so the user will not see the clipboard button or an error.
+
+=== Console blocks
+
+The default UI also adds a clipboard button to all console blocks.
+A console block is either a literal paragraph that begins with a `$` or a source block with the language `console`.
+
+The script provided by the default UI will automatically strip the `$` prompt at the beginning of each line and join the lines with `&&`.
+In <>, since the language is `console` and each line begins with a `$`, the console copy-paste logic is triggered.
+
+.Copy to clipboard for a multi-line console command
+[#ex-console-copy-paste]
+------
+[,console]
+----
+$ mkdir example
+$ cd example
+----
+------
+
+When a user uses the copy-to-clipboard button, they will copy the combined command `mkdir example && cd example` instead of the literal text shown.
+This can be useful for tutorial examples that a user is expected to copy-paste to run.
+You can try this behavior below:
+
+[,console]
+----
+$ mkdir example
+$ cd example
+----
diff --git a/antora-default-ui/docs/modules/ROOT/pages/create-helper.adoc b/antora-ui-default/docs/modules/ROOT/pages/create-helper.adoc
similarity index 92%
rename from antora-default-ui/docs/modules/ROOT/pages/create-helper.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/create-helper.adoc
index dfdb142..d9199be 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/create-helper.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/create-helper.adoc
@@ -175,3 +175,23 @@ This can impact performance.
If it's called on every page in your site, be sure that the operation is efficient to avoid slowing down site generation.
As an alternative to using a helper, you may want to consider whether writing an Antora extension is a better option.
+
+== Find latest release notes
+
+Here's another example of a helper that finds the latest release notes in a component named `release-notes`.
+
+[,js]
+----
+include::example$latest-release-notes.js[]
+----
+
+Here's how might use it to create a list of release notes.
+
+[,hbs]
+----
+
+----
diff --git a/antora-default-ui/docs/modules/ROOT/pages/development-workflow.adoc b/antora-ui-default/docs/modules/ROOT/pages/development-workflow.adoc
similarity index 100%
rename from antora-default-ui/docs/modules/ROOT/pages/development-workflow.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/development-workflow.adoc
diff --git a/antora-ui-default/docs/modules/ROOT/pages/image-styles.adoc b/antora-ui-default/docs/modules/ROOT/pages/image-styles.adoc
new file mode 100644
index 0000000..242dcc7
--- /dev/null
+++ b/antora-ui-default/docs/modules/ROOT/pages/image-styles.adoc
@@ -0,0 +1,59 @@
+= Image Styles
+:navtitle: Images
+
+This page describes how images in the content are styled and how to customize these styles.
+It covers both block and inline images, which are styled differently.
+
+[#size]
+== Image size
+
+If a width is not specified on the image macro, the image will be sized to match its intrinsic width.
+However, if that width exceeds the available width (i.e., the width of the content area), the image's width will be capped to fit the available space (`max-width: 100%`).
+
+If the image is an SVG, and a width is not specified on the image macro or on the root tag in the SVG, the image will use the maximum width available (i.e., the width of the content area).
+
+The image's height is not used when sizing the image.
+However, the aspect ratio of the image is preserved.
+
+[#block-position]
+== Block image position
+
+By default, a block image is centered within the content area of the page.
+If the block has a caption, that caption will also be centered under the image, but the text will be left-aligned.
+The caption may exceed the width of the image.
+
+If you want the image and its caption to be aligned to the left side of the content, add the `text-left` role to the image block.
+
+[,asciidoc]
+----
+[.text-left]
+image::my-image.png[]
+----
+
+If you want the image and its caption to be aligned to the right side of the content, add the `text-right` role to the image block.
+
+[,asciidoc]
+----
+[.text-left]
+image::my-image.png[]
+----
+
+Applying the `text-right` role also flips the text alignment of the caption to right-aligned.
+
+== Float an image
+
+You can float either a block or inline image to the left or right using the `float` attribute.
+When an image is configured to float, the content that follows it will wrap around it (on the opposing side) until that content clears the bottom of the image.
+
+Typically, you use the `float` property with an inline image since you can control when the floating starts relative to the surrounding content.
+
+[,asciidoc]
+----
+image:subject.png[Subject,250,float=right]
+This paragraph can refer to the image on the right.
+----
+
+If you use `float` on a block image, it overrides its default positioning (it will be aligned in the direction of the float).
+
+Using float implies that the image occupies less than the width of the content area.
+If, on the other hand, it extends from margin to margin, than it ceases to function as a float.
diff --git a/antora-default-ui/docs/modules/ROOT/pages/index.adoc b/antora-ui-default/docs/modules/ROOT/pages/index.adoc
similarity index 97%
rename from antora-default-ui/docs/modules/ROOT/pages/index.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/index.adoc
index 1d97ef3..4a9a41d 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/index.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/index.adoc
@@ -1,4 +1,4 @@
-= Antora Default UI
+= Antora Default UI Documentation
// Settings:
:hide-uri-scheme:
// URLs:
@@ -54,6 +54,11 @@ npm manages software packages (i.e., software dependencies) that it downloads fr
Software this project uses includes libraries that handle compilation as well as shared assets such as font files that are distributed as npm packages.
npm is part of Node.js.
+npx (command: `npx`)::
+npx runs bin scripts that are either installed in [.path]_node_modules/.bin_ or that it manages itself (if there's no package.json).
+npx is the preferred way to run any command.
+npx is part of Node.js.
+
package.json:::
This file keeps track of the dependencies (described using fuzzy versions) that npm (or Yarn) should fetch.
diff --git a/antora-default-ui/docs/modules/ROOT/pages/inline-text-styles.adoc b/antora-ui-default/docs/modules/ROOT/pages/inline-text-styles.adoc
similarity index 100%
rename from antora-default-ui/docs/modules/ROOT/pages/inline-text-styles.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/inline-text-styles.adoc
diff --git a/antora-default-ui/docs/modules/ROOT/pages/list-styles.adoc b/antora-ui-default/docs/modules/ROOT/pages/list-styles.adoc
similarity index 100%
rename from antora-default-ui/docs/modules/ROOT/pages/list-styles.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/list-styles.adoc
diff --git a/antora-default-ui/docs/modules/ROOT/pages/prerequisites.adoc b/antora-ui-default/docs/modules/ROOT/pages/prerequisites.adoc
similarity index 77%
rename from antora-default-ui/docs/modules/ROOT/pages/prerequisites.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/prerequisites.adoc
index 0b6571b..64df89b 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/prerequisites.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/prerequisites.adoc
@@ -10,9 +10,9 @@
An Antora UI project is based on tools built atop Node.js, namely:
-* {url-node}[Node.js] (commands: `node` and `npm`)
+* {url-node}[Node.js] (commands: `node`, `npm`, and `npx`)
** {url-nvm}[nvm] (optional, but strongly recommended)
-* {url-gulp}[Gulp CLI] (command: `gulp`)
+* {url-gulp}[Gulp CLI] (command: `gulp`) (can be accessed via `npx gulp`)
You also need {url-git}[git] (command: `git`) to pull down the project and push updates to it.
@@ -47,10 +47,16 @@ Once you have Node.js installed, you can proceed with installing the Gulp CLI.
== Gulp CLI
-Next, you'll need the Gulp CLI (aka wrapper).
+Next, you may choose to install the Gulp CLI globally.
This package provides the `gulp` command which executes the version of Gulp declared by the project.
-You should install the Gulp CLI globally (which resolves to a location in your user directory if you're using nvm) using the following command:
+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
+ $ npm i -g gulp-cli
+
+Alternately, you can run the `gulp` command using `npx` once you've installed the project dependencies, thus waiving the requirement to install it globally.
+
+ $ npx gulp
+
+Using `npx gulp` is the preferred way to invoke the `gulp` command.
Now that you have Node.js and Gulp installed, you're ready to set up the project.
diff --git a/antora-default-ui/docs/modules/ROOT/pages/set-up-project.adoc b/antora-ui-default/docs/modules/ROOT/pages/set-up-project.adoc
similarity index 84%
rename from antora-default-ui/docs/modules/ROOT/pages/set-up-project.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/set-up-project.adoc
index 03b7ed1..8c9fcdd 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/set-up-project.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/set-up-project.adoc
@@ -23,9 +23,9 @@ That's the job of npm.
In your terminal, execute the following command (while inside the project folder):
- $ npm install
+ $ npm i
-This command installs the dependencies listed in [.path]_package.json_ into the [.path]_node_modules/_ folder inside the project.
+The `npm i` command, short for `npm install`, 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.
The folder is safe to delete, though npm does a great job of managing it.
@@ -33,14 +33,19 @@ You'll notice another file which seems to be relevant here, [.path]_package-lock
npm uses this file to determine which concrete version of a dependency to use, since versions in [.path]_package.json_ are typically just a range.
The information in this file makes the build reproducible across different machines and runs.
-If a new dependency must be resolved that isn't yet listed in [.path]_package-lock.json_, npm will update this file with the new information when you run `npm install`.
+Installing the dependencies makes the `npx gulp` command available.
+You can verify this by querying the Gulp version:
+
+ $ npx gulp -v
+
+If a new dependency must be resolved that isn't yet listed in [.path]_package-lock.json_, npm will update this file with the new information when you run `npm i`.
Therefore, you're advised to commit the [.path]_package-lock.json_ file into the repository whenever it changes.
== Supported build tasks
Now that the dependencies are installed, you should be able to run the `gulp` command to find out what tasks the build supports:
- $ gulp --tasks-simple
+ $ npx gulp --tasks-simple
You should see:
diff --git a/antora-default-ui/docs/modules/ROOT/pages/sidebar-styles.adoc b/antora-ui-default/docs/modules/ROOT/pages/sidebar-styles.adoc
similarity index 100%
rename from antora-default-ui/docs/modules/ROOT/pages/sidebar-styles.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/sidebar-styles.adoc
diff --git a/antora-default-ui/docs/modules/ROOT/pages/style-guide.adoc b/antora-ui-default/docs/modules/ROOT/pages/style-guide.adoc
similarity index 75%
rename from antora-default-ui/docs/modules/ROOT/pages/style-guide.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/style-guide.adoc
index 24c245e..e1559ed 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/style-guide.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/style-guide.adoc
@@ -1,7 +1,7 @@
-= UI Element Style Guide
-:navtitle: UI Element Styles
+= UI Element Style and Behavior Guide
+:navtitle: UI Element Styles and Behaviors
-When creating a UI theme for Antora, there are certain elements in the UI that require support from the CSS to work correctly.
+When creating a UI theme for Antora, there are certain elements in the UI that require support from the CSS--as well as JavaScript in some cases--to work correctly.
This list includes elements in the shell (i.e., frame) and in the document content.
This document identifies these UI elements.
@@ -21,3 +21,4 @@ These elements include:
* xref:list-styles.adoc[Lists]
* xref:sidebar-styles.adoc[Sidebars]
* xref:ui-macro-styles.adoc[Button, keybinding, and menu UI macros]
+* xref:code-blocks.adoc[Code blocks]
diff --git a/antora-default-ui/docs/modules/ROOT/pages/stylesheets.adoc b/antora-ui-default/docs/modules/ROOT/pages/stylesheets.adoc
similarity index 66%
rename from antora-default-ui/docs/modules/ROOT/pages/stylesheets.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/stylesheets.adoc
index aff5316..b2f1a9a 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/stylesheets.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/stylesheets.adoc
@@ -8,7 +8,11 @@ These stylesheets utilize CSS variables to keep the CSS DRY and easy to customiz
Within the default UI project, the stylesheet files are separated into modules to help organize the rules and make them easier to find.
The UI build combines and minifies these files into a single file named [.path]_site.css_.
During the build, the CSS is enhanced using PostCSS in much the same way as a CSS preprocessor works, only the modifications are made to the CSS directly.
-The modifications mostly center around injecting vendor prefixes for compatibility or backporting new features to more broadly supported syntax.
+The modifications mostly revolve around injecting vendor prefixes for compatibility or backporting new features to more broadly supported syntax.
+
+NOTE: An Antora UI provides its own styles.
+While these styles are expected to support any roles defined in the AsciiDoc Language documentation, it does not provide all the selectors found in the Asciidoctor default stylesheet.
+If there's a selector that the Asciidoctor default stylesheet provides that you need in your Antora site, you'll need to add it to the CSS for your own UI.
== Add a new CSS rule
diff --git a/antora-ui-default/docs/modules/ROOT/pages/template-customization.adoc b/antora-ui-default/docs/modules/ROOT/pages/template-customization.adoc
new file mode 100644
index 0000000..6377746
--- /dev/null
+++ b/antora-ui-default/docs/modules/ROOT/pages/template-customization.adoc
@@ -0,0 +1,96 @@
+= Template Customization
+
+The default UI bundle can be customized using AsciiDoc attributes.
+xref:templates.adoc[] explains how to access such attributes.
+But what are the attributes that actually used by the templates.
+If you're going to use the default UI bundle for your project, you'll want to know.
+
+== page-role attribute
+
+The `page-role` attribute is typically defined per-page.
+This attribute is used to add one or more space-separated classes to the `` tag of that page.
+
+A common use of the `page-role` attribute is to label the home page.
+
+[,asciidoc]
+----
+= Home
+:page-role: home
+
+This is the home page.
+----
+
+////
+Alternately, the role can be set on the document itself.
+
+[,asciidoc]
+----
+[.home]
+= Home
+
+This is the home page.
+----
+////
+
+The resulting HTML will include the following `` start tag:
+
+[,html]
+----
+
+----
+
+The stylesheet can now take advantage of this identity to assign styles to pages that have a given role.
+For example, the home page often requires a different appearance.
+Being able to target that page with CSS allows UI developers to apply that customization.
+
+Note that the UI templates could make use of the page role in other ways.
+The default UI currently only appends the value to the `class` attribute on the `` tag.
+
+=== Hide the TOC sidebar
+
+The one reserved page role that the default UI recognizes is `-toc`.
+This role instructs the site script to remove (i.e., hide) the TOC sidebar.
+Here's how to set it.
+
+[,asciidoc]
+----
+= Page Title
+:page-role: -toc
+
+The TOC sidebar is not displayed even though this page has sections.
+
+== First Section
+
+== Second Section
+----
+
+The AsciiDoc `toc` attribute controls whether the TOC is rendered in the *body* of the article.
+Since the default UI provides an alternate TOC, you most likely don't want to activate the built-in TOC functionality in AsciiDoc when using Antora.
+
+== page-pagination attribute
+
+The `page-pagination` attribute is set in your xref:antora:playbook:asciidoc-attributes.adoc[playbook] in order to enable pagination, if your UI bundle supports it.
+The default UI bundle supports this and you'll get the links to previous and next pages at the bottom of every page, based your navigation.
+
+.Enable pagination
+[,yaml]
+----
+asciidoc:
+ attributes:
+ page-pagination: ''
+----
+
+Antora automatically calculates the appropriate URLs and inserts the correct links.
+
+Since you most likely want this enabled for every page in your site, there's no point setting this attribute per page.
+However, if you do want to be able to override it per page, such as to turn it off, then you need to soft set the value in the playbook.
+
+.Enable pagination, but make it overriddable
+[,yaml]
+----
+asciidoc:
+ attributes:
+ page-pagination: '@'
+----
+
+You can now turn page pagination off by unsetting the `page-pagination` attribute in the document header.
diff --git a/antora-default-ui/docs/modules/ROOT/pages/templates.adoc b/antora-ui-default/docs/modules/ROOT/pages/templates.adoc
similarity index 64%
rename from antora-default-ui/docs/modules/ROOT/pages/templates.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/templates.adoc
index 5cb9257..25bf1fc 100644
--- a/antora-default-ui/docs/modules/ROOT/pages/templates.adoc
+++ b/antora-ui-default/docs/modules/ROOT/pages/templates.adoc
@@ -37,6 +37,8 @@ s| [[site]]site
| site.url
| The base URL of the site, if specified in the playbook.
If a site start page is defined, the visitor will be redirected from this location to the start page.
+Includes the value of `site.path`.
+Can be prepended to `page.url` to create an absolute URL for a page (e.g., `+{{{site.url}}}{{{page.url}}}+`).
| site.path
| The pathname (i.e., subpath) of the site.url under which the site is hosted (e.g., /docs).
@@ -132,8 +134,8 @@ Each navigation item contains the property `content` as well as the optional pro
| page.url
| The URL for the current page.
-This value is a root-relative path.
-It's often used as the base URL to generate relative URLs from this page.
+This URL is a root-relative path (i.e., it begins with `/`), where root refers to where Antora published the files.
+The value is most often used by the `relativize` helper to generate relative URLs from this page.
| page.canonicalUrl
| The canonical URL for the current page.
@@ -220,3 +222,125 @@ Each template file has access to the template model, which exposes information a
The variables currently available are listed in <>.
Save the file, commit it to git, push the branch, and allow the approval workflow to play out.
+
+== Using built-in helpers
+
+Antora provides the following built-in template helpers:
+
+relativize:: Converts a root-relative URL to a URL path that is relative to the current page.
+resolvePageURL:: Resolves the specified page from a page reference and returns the root-relative URL of that page.
+resolvePage:: Resolves the specified page from a page reference, converts it to a UI page model (unless `model=false`), and returns it.
+
+These helpers are available in any Antora UI, not just the default UI.
+
+=== relativize
+
+Antora stores the URL of each publishable resource as a root-relative URL (i.e., /component/version/module/page.html).
+The root in this case is the root of the site (the site URL).
+Antora stores URLs in this way so they can be used to create a relative path from the current page to the target resource, independent of the site's configuration.
+That's the purpose of the `relativize` helper in a template.
+
+.Why use relativize?
+****
+By using relative paths for references, the site is not couple to the URL from which it is served.
+That means the site can be moved around without breaking references.
+It also means the site can be previewed locally without a web server.
+****
+
+You can find the `relativize` helper used throughout the templates in the default UI.
+Here's an example that uses the `relativize` helper to create a relative link to the next page in the navigation.
+
+[,html]
+----
+{{#with page.next}}
+{{{./content}}}
+{{/with}}
+----
+
+When creating a link to a URL within the site, you should always wrap it in the `relativize` helper.
+
+=== resolvePageURL
+
+If you want to create a link to another page in your template, you can use the `resolvePageURL` helper.
+This helper resolves the specified page and returns the root-relative URL of that page.
+It's the commplement of the xref macro in the AsciiDoc source.
+
+This helper accepts a page reference, just like the target of the xref macro.
+Internally, this helper uses `ContentCatalog#resolvePage` to resolve the reference.
+The reference will be resolved relative to the module of the page being composed unless broadened by an explicit module, version, or component segment.
+However, since a template is often used by every page in the site, you almost always want this reference to be fully-qualified.
+
+For information about the syntax of a page reference, refer to xref:antora:page:resource-id-coordinates.adoc[resource reference] documentation.
+
+Here's an example that creates a link to another page using the `resolvePageURL` helper.
+
+[,html]
+----
+Support
+----
+
+This helper also accepts a context object for specifying the module, version, and component, which can be useful when pages share a common naming pattern.
+
+[,html]
+----
+Support
+----
+
+The disadvantage of the `resolvePageURL` helper is that it only returns the root-relative URL, not the model of the page.
+If you need more information about the page, such as its title, you can use the `resolvePage` instead.
+
+=== resolvePage
+
+If you want to resolve another page in your template, perhaps to create a link to it, or perhaps to show some information from its model, you can use the `resolvePage` helper.
+This helper resolves the specified page and returns the page model for that page.
+//The page model is the same model used for the `page` variable in the template.
+//In other words, this helper allows you to switch the context of the template to that of another page.
+
+This helper accepts a page reference.
+Internally, this helper uses `ContentCatalog#resolvePage` to resolve the reference.
+
+Here's an example of how to use the `resolvePage` helper to make a link to another page, using the title of that page as the link text.
+
+[,html]
+----
+{{#with (resolvePage 'about::support.adoc')}}{{{./title}}}{{/with}}
+----
+
+This helper also accepts a context object for specifying the module, version, and component, which can be useful when pages share a common naming pattern.
+
+[,html]
+----
+{{#with (resolvePage 'support.adoc' component='about')}}{{{./title}}}{{/with}}
+----
+
+The object returned by the `resolvePage` helper is the UI page model, which is the same model used by the `page` variable.
+You can use the `log` helper inspect the object that this helper returns.
+
+[,html]
+----
+{{log (resolvePage 'about::support.adoc')}}
+----
+
+NOTE: The `resolvePage` helper is typically used inside a `with` block to switch the template's context to the resolved object.
+
+If you want the original virtual file as returned by `ContentCatalog#resolvePage`, you must set the `model=false` argument on the helper.
+Among other things, this gives you access to all the document attributes associated with that page, not just the page attributes.
+
+[,html]
+----
+{{#with (resolvePage 'program::policy-a.adoc' model=false)}}
+{{{./asciidoc.xreftext}}} {{./asciidoc.attributes.next-review-date}}
+{{/with}}
+----
+
+If you need to access the virtual file for the current page, you can do so as follows:
+
+[,html]
+----
+{{#with (resolvePage page.relativeSrcPath model=false)}}
+{{log ./asciidoc.attributes}}
+{{/with}}
+----
+
+Currently, there is no equivalent helper for resolving a non-page resource, but that may be added in the future.
+In the meantime, you could develop your own helper to provide that functionality.
diff --git a/antora-default-ui/docs/modules/ROOT/pages/ui-macro-styles.adoc b/antora-ui-default/docs/modules/ROOT/pages/ui-macro-styles.adoc
similarity index 100%
rename from antora-default-ui/docs/modules/ROOT/pages/ui-macro-styles.adoc
rename to antora-ui-default/docs/modules/ROOT/pages/ui-macro-styles.adoc
diff --git a/antora-default-ui/gulp.d/lib/create-task.js b/antora-ui-default/gulp.d/lib/create-task.js
similarity index 100%
rename from antora-default-ui/gulp.d/lib/create-task.js
rename to antora-ui-default/gulp.d/lib/create-task.js
diff --git a/antora-default-ui/gulp.d/lib/export-tasks.js b/antora-ui-default/gulp.d/lib/export-tasks.js
similarity index 100%
rename from antora-default-ui/gulp.d/lib/export-tasks.js
rename to antora-ui-default/gulp.d/lib/export-tasks.js
diff --git a/antora-default-ui/gulp.d/lib/gulp-prettier-eslint.js b/antora-ui-default/gulp.d/lib/gulp-prettier-eslint.js
similarity index 100%
rename from antora-default-ui/gulp.d/lib/gulp-prettier-eslint.js
rename to antora-ui-default/gulp.d/lib/gulp-prettier-eslint.js
diff --git a/antora-default-ui/gulp.d/tasks/build-preview-pages.js b/antora-ui-default/gulp.d/tasks/build-preview-pages.js
similarity index 97%
rename from antora-default-ui/gulp.d/tasks/build-preview-pages.js
rename to antora-ui-default/gulp.d/tasks/build-preview-pages.js
index 364f561..7516e0d 100644
--- a/antora-default-ui/gulp.d/tasks/build-preview-pages.js
+++ b/antora-ui-default/gulp.d/tasks/build-preview-pages.js
@@ -53,7 +53,7 @@ module.exports = (src, previewSrc, previewDest, sink = () => map()) => (done) =>
uiModel.page.attributes = Object.entries(doc.getAttributes())
.filter(([name, val]) => name.startsWith('page-'))
.reduce((accum, [name, val]) => {
- accum[name.substr(5)] = val
+ accum[name.slice(5)] = val
return accum
}, {})
uiModel.page.layout = doc.getAttribute('page-layout', 'default')
@@ -134,7 +134,7 @@ function transformHandlebarsError ({ message, stack }, layout) {
const m = stack.match(/^ *at Object\.ret \[as (.+?)\]/m)
const templatePath = `src/${m ? 'partials/' + m[1] : 'layouts/' + layout}.hbs`
const err = new Error(`${message}${~message.indexOf('\n') ? '\n^ ' : ' '}in UI template ${templatePath}`)
- err.stack = [err.toString()].concat(stack.substr(message.length + 8)).join('\n')
+ err.stack = [err.toString()].concat(stack.slice(message.length + 8)).join('\n')
return err
}
diff --git a/antora-default-ui/gulp.d/tasks/build.js b/antora-ui-default/gulp.d/tasks/build.js
similarity index 93%
rename from antora-default-ui/gulp.d/tasks/build.js
rename to antora-ui-default/gulp.d/tasks/build.js
index 60a1da8..7ca7c76 100644
--- a/antora-default-ui/gulp.d/tasks/build.js
+++ b/antora-ui-default/gulp.d/tasks/build.js
@@ -17,8 +17,7 @@ const postcssVar = require('postcss-custom-properties')
const { Transform } = require('stream')
const map = (transform) => new Transform({ objectMode: true, transform })
const through = () => map((file, enc, next) => next(null, file))
-const terser = require('gulp-terser')
-const terserConfig = { keep_fnames: true, mangle: false }
+const uglify = require('gulp-uglify')
const vfs = require('vinyl-fs')
module.exports = (src, dest, preview) => () => {
@@ -37,9 +36,9 @@ module.exports = (src, dest, preview) => () => {
}),
postcssUrl([
{
- filter: new RegExp('^src/css/[~][^/]*(?:font|face)[^/]*/.*/files/.+[.](?:ttf|woff2?)$'),
+ filter: (asset) => new RegExp('^[~][^/]*(?:font|typeface)[^/]*/.*/files/.+[.](?:ttf|woff2?)$').test(asset.url),
url: (asset) => {
- const relpath = asset.pathname.substr(1)
+ const relpath = asset.pathname.slice(1)
const abspath = require.resolve(relpath)
const basename = ospath.basename(abspath)
const destpath = ospath.join(dest, 'font', basename)
@@ -63,13 +62,13 @@ module.exports = (src, dest, preview) => () => {
vfs
.src('js/+([0-9])-*.js', { ...opts, read: false, sourcemaps })
.pipe(bundle(opts))
- .pipe(terser(terserConfig))
+ .pipe(uglify({ output: { comments: /^! / } }))
// NOTE concat already uses stat from newest combined file
.pipe(concat('js/site.js')),
vfs
- .src('js/vendor/*([^.])?(.bundle).js', { ...opts, read: false })
+ .src('js/vendor/+([^.])?(.bundle).js', { ...opts, read: false })
.pipe(bundle(opts))
- .pipe(terser(terserConfig)),
+ .pipe(uglify({ output: { comments: /^! / } })),
vfs
.src('js/vendor/*.min.js', opts)
.pipe(map((file, enc, next) => next(null, Object.assign(file, { extname: '' }, { extname: '.js' })))),
diff --git a/antora-default-ui/gulp.d/tasks/format.js b/antora-ui-default/gulp.d/tasks/format.js
similarity index 100%
rename from antora-default-ui/gulp.d/tasks/format.js
rename to antora-ui-default/gulp.d/tasks/format.js
diff --git a/antora-default-ui/gulp.d/tasks/index.js b/antora-ui-default/gulp.d/tasks/index.js
similarity index 58%
rename from antora-default-ui/gulp.d/tasks/index.js
rename to antora-ui-default/gulp.d/tasks/index.js
index a5795fc..4178c8f 100644
--- a/antora-default-ui/gulp.d/tasks/index.js
+++ b/antora-ui-default/gulp.d/tasks/index.js
@@ -1,5 +1,5 @@
'use strict'
-const camelCase = (name) => name.replace(/[-]./g, (m) => m.substr(1).toUpperCase())
+const camelCase = (name) => name.replace(/[-]./g, (m) => m.slice(1).toUpperCase())
module.exports = require('require-directory')(module, __dirname, { recurse: false, rename: camelCase })
diff --git a/antora-default-ui/gulp.d/tasks/lint-css.js b/antora-ui-default/gulp.d/tasks/lint-css.js
similarity index 100%
rename from antora-default-ui/gulp.d/tasks/lint-css.js
rename to antora-ui-default/gulp.d/tasks/lint-css.js
diff --git a/antora-default-ui/gulp.d/tasks/lint-js.js b/antora-ui-default/gulp.d/tasks/lint-js.js
similarity index 100%
rename from antora-default-ui/gulp.d/tasks/lint-js.js
rename to antora-ui-default/gulp.d/tasks/lint-js.js
diff --git a/antora-ui-default/gulp.d/tasks/pack.js b/antora-ui-default/gulp.d/tasks/pack.js
new file mode 100644
index 0000000..30cb07f
--- /dev/null
+++ b/antora-ui-default/gulp.d/tasks/pack.js
@@ -0,0 +1,17 @@
+'use strict'
+
+const ospath = require('path')
+const vfs = require('vinyl-fs')
+const zip = (() => {
+ try {
+ return require('@vscode/gulp-vinyl-zip')
+ } catch {
+ return require('gulp-vinyl-zip')
+ }
+})()
+
+module.exports = (src, dest, bundleName, onFinish) => () =>
+ vfs
+ .src('**/*', { base: src, cwd: src, dot: true })
+ .pipe(zip.dest(ospath.join(dest, `${bundleName}-bundle.zip`)))
+ .on('finish', () => onFinish && onFinish(ospath.resolve(dest, `${bundleName}-bundle.zip`)))
diff --git a/antora-default-ui/gulp.d/tasks/remove.js b/antora-ui-default/gulp.d/tasks/remove.js
similarity index 100%
rename from antora-default-ui/gulp.d/tasks/remove.js
rename to antora-ui-default/gulp.d/tasks/remove.js
diff --git a/antora-default-ui/gulp.d/tasks/serve.js b/antora-ui-default/gulp.d/tasks/serve.js
similarity index 100%
rename from antora-default-ui/gulp.d/tasks/serve.js
rename to antora-ui-default/gulp.d/tasks/serve.js
diff --git a/antora-default-ui/gulpfile.js b/antora-ui-default/gulpfile.js
similarity index 96%
rename from antora-default-ui/gulpfile.js
rename to antora-ui-default/gulpfile.js
index 25ce769..824ca04 100644
--- a/antora-default-ui/gulpfile.js
+++ b/antora-ui-default/gulpfile.js
@@ -18,7 +18,7 @@ const task = require('./gulp.d/tasks')
const glob = {
all: [srcDir, previewSrcDir],
css: `${srcDir}/css/**/*.css`,
- js: ['gulpfile.js', 'gulp.d/**/*.js', `${srcDir}/{helpers,js}/**/*.js`],
+ js: ['gulpfile.js', 'gulp.d/**/*.js', `${srcDir}/helpers/*.js`, `${srcDir}/js/**/+([^.])?(.bundle).js`],
}
const cleanTask = createTask({
diff --git a/antora-default-ui/index.js b/antora-ui-default/index.js
similarity index 100%
rename from antora-default-ui/index.js
rename to antora-ui-default/index.js
diff --git a/antora-ui-default/package.json b/antora-ui-default/package.json
new file mode 100644
index 0000000..528c3ef
--- /dev/null
+++ b/antora-ui-default/package.json
@@ -0,0 +1,59 @@
+{
+ "name": "@antora/ui-default",
+ "description": "An archetype project that produces a UI for creating documentation sites with Antora",
+ "homepage": "https://gitlab.com/antora/antora-ui-default",
+ "license": "MPL-2.0",
+ "repository": {
+ "type": "git",
+ "url": "https://gitlab.com/antora/antora-ui-default.git"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
+ },
+ "browserslist": [
+ "last 2 versions"
+ ],
+ "devDependencies": {
+ "@asciidoctor/core": "~2.2",
+ "@fontsource/roboto": "~4.5",
+ "@fontsource/roboto-mono": "~4.5",
+ "@vscode/gulp-vinyl-zip": "~2.5",
+ "autoprefixer": "~9.7",
+ "browser-pack-flat": "~3.4",
+ "browserify": "~16.5",
+ "cssnano": "~4.1",
+ "eslint": "~6.8",
+ "eslint-config-standard": "~14.1",
+ "eslint-plugin-import": "~2.20",
+ "eslint-plugin-node": "~11.1",
+ "eslint-plugin-promise": "~4.2",
+ "eslint-plugin-standard": "~4.0",
+ "fancy-log": "~1.3",
+ "fs-extra": "~8.1",
+ "gulp": "~4.0",
+ "gulp-concat": "~2.6",
+ "gulp-connect": "~5.7",
+ "gulp-eslint": "~6.0",
+ "gulp-imagemin": "~6.2",
+ "gulp-postcss": "~8.0",
+ "gulp-stylelint": "~13.0",
+ "gulp-uglify": "~3.0",
+ "handlebars": "~4.7",
+ "highlight.js": "9.18.3",
+ "js-yaml": "~3.13",
+ "merge-stream": "~2.0",
+ "postcss-calc": "~7.0",
+ "postcss-custom-properties": "~9.1",
+ "postcss-import": "~12.0",
+ "postcss-url": "~8.0",
+ "prettier-eslint": "~9.0",
+ "require-directory": "~2.1",
+ "require-from-string": "~2.0",
+ "stylelint": "~13.3",
+ "stylelint-config-standard": "~20.0",
+ "vinyl-fs": "~3.0"
+ },
+ "dependencies": {
+ "prismjs": "file:./../primsmjs"
+ }
+}
diff --git a/antora-default-ui/preview-src/404.adoc b/antora-ui-default/preview-src/404.adoc
similarity index 100%
rename from antora-default-ui/preview-src/404.adoc
rename to antora-ui-default/preview-src/404.adoc
diff --git a/antora-default-ui/preview-src/index.adoc b/antora-ui-default/preview-src/index.adoc
similarity index 89%
rename from antora-default-ui/preview-src/index.adoc
rename to antora-ui-default/preview-src/index.adoc
index af1200f..7cedc12 100644
--- a/antora-default-ui/preview-src/index.adoc
+++ b/antora-ui-default/preview-src/index.adoc
@@ -4,6 +4,7 @@ Author Name
:idseparator: -
:!example-caption:
:!table-caption:
+//:page-role: -toc
:page-pagination:
[.float-group]
@@ -22,46 +23,13 @@ Quisque pharetra tristique arcu fringilla dapibus.
https://example.org[Curabitur,role=unresolved] ut massa aliquam, cursus enim et, accumsan lectus.
Mauris eget leo nunc, nec tempus mi? Curabitur id nisl mi, ut vulputate urna.
-
-[source,sql]
-----
-WITH
- -- Function to capitalize input string
- FUNCTION capitalize
- (
- p_string VARCHAR2
- )
- RETURN VARCHAR2
- IS
- BEGIN
- RETURN CONCAT(UPPER(SUBSTR(p_string,1,1)), SUBSTR(p_string,2));
- END;
- -- Function to retrieve the domain name from a URL
- FUNCTION get_domain_name
- (
- p_url VARCHAR2,
- p_sub_domain VARCHAR2 DEFAULT 'www.'
- )
- RETURN VARCHAR2
- IS
- v_begin_pos BINARY_INTEGER;
- v_length BINARY_INTEGER;
- BEGIN
- v_begin_pos := INSTR(p_url, p_sub_domain) + LENGTH(p_sub_domain);
- v_length := INSTR(SUBSTR(p_url, v_begin_pos), '.') - 1;
- RETURN SUBSTR(p_url, v_begin_pos, v_length);
- END;
--- SQL statement
-SELECT capitalize(name) as name, capitalize(get_domain_name(url)) AS domain_name, url
- FROM products;
-----
-
== Cu solet
Nominavi luptatum eos, an vim hinc philosophia intellegebat.
Lorem pertinacia `expetenda` et nec, [.underline]#wisi# illud [.line-through]#sonet# qui ea.
H~2~0.
E = mc^2^.
+*Alphabet* *алфавит* _алфавит_ *_алфавит_*.
Eum an doctus <>.
Eu mea inani iriure.footnote:[Quisque porta facilisis tortor, vitae bibendum velit fringilla vitae! Lorem ipsum dolor sit amet, consectetur adipiscing elit.]
@@ -234,6 +202,7 @@ sed::
splendide sed
mea::
+tad::
agam graeci
Let's look at that another way.
@@ -330,6 +299,9 @@ Eu mea inani iriure.
[discrete]
== Voluptua singulis
+[discrete]
+=== Nominavi luptatum
+
Cum dicat putant ne.
Est in reque homero principes, meis deleniti mediocrem ad has.
Ex nam suas nemore dignissim, vel apeirian democritum et.
@@ -337,6 +309,9 @@ Ex nam suas nemore dignissim, vel apeirian democritum et.
.Antora is a multi-repo documentation site generator
image::multirepo-ssg.svg[Multirepo SSG,3000,opts=interactive]
+.Let's see that again, but a little smaller
+image::multirepo-ssg.svg[Multirepo SSG,300,role=text-left]
+
Make the switch today!
.Full Circle with Jake Blauvelt
diff --git a/antora-default-ui/preview-src/multirepo-ssg.svg b/antora-ui-default/preview-src/multirepo-ssg.svg
similarity index 100%
rename from antora-default-ui/preview-src/multirepo-ssg.svg
rename to antora-ui-default/preview-src/multirepo-ssg.svg
diff --git a/antora-default-ui/preview-src/ui-model.yml b/antora-ui-default/preview-src/ui-model.yml
similarity index 100%
rename from antora-default-ui/preview-src/ui-model.yml
rename to antora-ui-default/preview-src/ui-model.yml
diff --git a/antora-default-ui/src/css/base.css b/antora-ui-default/src/css/base.css
similarity index 100%
rename from antora-default-ui/src/css/base.css
rename to antora-ui-default/src/css/base.css
diff --git a/antora-default-ui/src/css/body.css b/antora-ui-default/src/css/body.css
similarity index 100%
rename from antora-default-ui/src/css/body.css
rename to antora-ui-default/src/css/body.css
diff --git a/antora-default-ui/src/css/breadcrumbs.css b/antora-ui-default/src/css/breadcrumbs.css
similarity index 100%
rename from antora-default-ui/src/css/breadcrumbs.css
rename to antora-ui-default/src/css/breadcrumbs.css
diff --git a/antora-default-ui/src/css/doc.css b/antora-ui-default/src/css/doc.css
similarity index 91%
rename from antora-default-ui/src/css/doc.css
rename to antora-ui-default/src/css/doc.css
index 021d1d1..4acb338 100644
--- a/antora-default-ui/src/css/doc.css
+++ b/antora-ui-default/src/css/doc.css
@@ -185,10 +185,34 @@
clear: both;
}
+.doc .text-left {
+ text-align: left;
+}
+
+.doc .text-center {
+ text-align: center;
+}
+
+.doc .text-right {
+ text-align: right;
+}
+
+.doc .text-justify {
+ text-align: justify;
+}
+
.doc .stretch {
width: 100%;
}
+.doc .big {
+ font-size: larger;
+}
+
+.doc .small {
+ font-size: smaller;
+}
+
.doc .underline {
text-decoration: underline;
}
@@ -217,10 +241,8 @@
margin: 1rem 0 0;
}
-.doc table.tableblock {
- font-size: calc(15 / var(--rem-base) * 1rem);
-}
-
+.doc > table.tableblock,
+.doc > table.tableblock + *,
.doc .tablecontainer,
.doc .tablecontainer + *,
.doc :not(.tablecontainer) > table.tableblock,
@@ -228,10 +250,22 @@
margin-top: 1.5rem;
}
+.doc table.tableblock {
+ font-size: calc(15 / var(--rem-base) * 1rem);
+}
+
.doc p.tableblock + p.tableblock {
margin-top: 0.5rem;
}
+.doc table.tableblock pre {
+ font-size: inherit;
+}
+
+.doc td.tableblock > .content {
+ word-wrap: anywhere; /* aka overflow-wrap; used when hyphens are disabled or aren't sufficient */
+}
+
.doc td.tableblock > .content > :first-child {
margin-top: 0;
}
@@ -344,7 +378,7 @@
margin-top: 0;
}
-.doc .admonitionblock pre {
+.doc .admonitionblock td.content pre {
font-size: calc(15 / var(--rem-base) * 1rem);
}
@@ -361,55 +395,59 @@
word-wrap: anywhere;
}
-.doc .admonitionblock .icon {
+.doc .admonitionblock td.icon {
+ font-size: calc(15 / var(--rem-base) * 1rem);
+ left: 0;
+ line-height: 1;
+ padding: 0;
position: absolute;
top: 0;
- left: 0;
- font-size: calc(15 / var(--rem-base) * 1rem);
- padding: 0 0.5rem;
+ transform: translate(-0.5rem, -50%);
+}
+
+.doc .admonitionblock td.icon i {
+ align-items: center;
+ border-radius: 0.45rem;
+ display: inline-flex;
+ filter: initial;
height: 1.25rem;
- line-height: 1;
+ padding: 0 0.5rem;
+ vertical-align: initial;
+ width: fit-content;
+}
+
+.doc .admonitionblock td.icon i::after {
+ content: attr(title);
font-weight: var(--admonition-label-font-weight);
+ font-style: normal;
text-transform: uppercase;
- border-radius: 0.45rem;
- transform: translate(-0.5rem, -50%);
}
-.doc .admonitionblock.caution .icon {
+.doc .admonitionblock td.icon i.icon-caution {
background-color: var(--caution-color);
color: var(--caution-on-color);
}
-.doc .admonitionblock.important .icon {
+.doc .admonitionblock td.icon i.icon-important {
background-color: var(--important-color);
color: var(--important-on-color);
}
-.doc .admonitionblock.note .icon {
+.doc .admonitionblock td.icon i.icon-note {
background-color: var(--note-color);
color: var(--note-on-color);
}
-.doc .admonitionblock.tip .icon {
+.doc .admonitionblock td.icon i.icon-tip {
background-color: var(--tip-color);
color: var(--tip-on-color);
}
-.doc .admonitionblock.warning .icon {
+.doc .admonitionblock td.icon i.icon-warning {
background-color: var(--warning-color);
color: var(--warning-on-color);
}
-.doc .admonitionblock .icon i {
- display: inline-flex;
- align-items: center;
- height: 100%;
-}
-
-.doc .admonitionblock .icon i::after {
- content: attr(title);
-}
-
.doc .imageblock,
.doc .videoblock {
display: flex;
@@ -417,16 +455,29 @@
align-items: center;
}
+.doc .imageblock .content {
+ align-self: stretch;
+ text-align: center;
+}
+
.doc .imageblock.text-left,
.doc .videoblock.text-left {
align-items: flex-start;
}
+.doc .imageblock.text-left .content {
+ text-align: left;
+}
+
.doc .imageblock.text-right,
.doc .videoblock.text-right {
align-items: flex-end;
}
+.doc .imageblock.text-right .content {
+ text-align: right;
+}
+
.doc .imageblock img,
.doc .imageblock object,
.doc .imageblock svg,
@@ -443,7 +494,8 @@
margin-top: -0.2em;
}
-.doc .videoblock iframe {
+.doc .videoblock iframe,
+.doc .videoblock video {
max-width: 100%;
vertical-align: middle;
}
@@ -617,7 +669,7 @@
.doc .listingblock .title,
.doc .openblock .title,
.doc .videoblock .title,
-.doc .tableblock caption {
+.doc table.tableblock caption {
color: var(--caption-font-color);
font-size: calc(16 / var(--rem-base) * 1rem);
font-style: var(--caption-font-style);
@@ -627,18 +679,19 @@
padding-bottom: 0.075rem;
}
-.doc .tableblock caption {
+.doc table.tableblock caption {
text-align: left;
}
-.doc .ulist .title,
-.doc .olist .title {
+.doc .olist .title,
+.doc .ulist .title {
font-style: var(--caption-font-style);
font-weight: var(--caption-font-weight);
margin-bottom: 0.25rem;
}
-.doc .imageblock .title {
+.doc .imageblock .title,
+.doc .videoblock .title {
margin-top: 0.5rem;
padding-bottom: 0;
}
@@ -728,21 +781,22 @@
font-size: calc(22.5 / var(--rem-base) * 1rem);
font-weight: var(--alt-heading-font-weight);
line-height: 1.3;
- margin-bottom: -0.3em;
+ margin-bottom: 0.5rem;
text-align: center;
}
+.doc .sidebarblock > .content > .title + *,
.doc .sidebarblock > .content > :not(.title):first-child {
margin-top: 0;
}
/* NEEDS REVIEW prevent pre in table from causing article to exceed bounds */
-.doc .tableblock pre,
+.doc table.tableblock pre,
.doc .listingblock.wrap pre {
white-space: pre-wrap;
}
-.doc pre.highlight code,
+.doc pre.highlight > code,
.doc .listingblock pre:not(.highlight),
.doc .literalblock pre {
background: var(--pre-background);
@@ -766,6 +820,7 @@
font-family: var(--body-font-family);
font-size: calc(13 / var(--rem-base) * 1rem);
line-height: 1;
+ user-select: none;
white-space: nowrap;
z-index: 1;
}
@@ -855,11 +910,12 @@
}
.doc .dlist dd {
- margin: 0 0 0.25rem 1.5rem;
+ margin: 0 0 0 1.5rem;
}
-.doc .dlist dd:last-of-type {
- margin-bottom: 0;
+.doc .dlist dd + dt,
+.doc .dlist dd > p:first-child {
+ margin-top: 0.5rem;
}
.doc td.hdlist1,
@@ -995,6 +1051,10 @@
word-wrap: normal;
}
+.doc :not(pre).pre-wrap {
+ white-space: pre-wrap;
+}
+
#footnotes {
font-size: 0.85em;
line-height: 1.5;
diff --git a/antora-default-ui/src/css/footer.css b/antora-ui-default/src/css/footer.css
similarity index 100%
rename from antora-default-ui/src/css/footer.css
rename to antora-ui-default/src/css/footer.css
diff --git a/antora-default-ui/src/css/header.css b/antora-ui-default/src/css/header.css
similarity index 98%
rename from antora-default-ui/src/css/header.css
rename to antora-ui-default/src/css/header.css
index 278abbe..9a2b294 100644
--- a/antora-default-ui/src/css/header.css
+++ b/antora-ui-default/src/css/header.css
@@ -1,5 +1,7 @@
-html.is-clipped--navbar {
- overflow-y: hidden;
+@media screen and (max-width: 1023.5px) {
+ html.is-clipped--navbar {
+ overflow-y: hidden;
+ }
}
body {
diff --git a/antora-default-ui/src/css/highlight.css b/antora-ui-default/src/css/highlight.css
similarity index 100%
rename from antora-default-ui/src/css/highlight.css
rename to antora-ui-default/src/css/highlight.css
diff --git a/antora-default-ui/src/css/main.css b/antora-ui-default/src/css/main.css
similarity index 92%
rename from antora-default-ui/src/css/main.css
rename to antora-ui-default/src/css/main.css
index e89461a..83a333c 100644
--- a/antora-default-ui/src/css/main.css
+++ b/antora-ui-default/src/css/main.css
@@ -1,3 +1,7 @@
+body.-toc aside.toc.sidebar {
+ display: none;
+}
+
@media screen and (max-width: 1023.5px) {
aside.toc.sidebar {
display: none;
diff --git a/antora-default-ui/src/css/nav.css b/antora-ui-default/src/css/nav.css
similarity index 82%
rename from antora-default-ui/src/css/nav.css
rename to antora-ui-default/src/css/nav.css
index 6f277b1..81f7d9e 100644
--- a/antora-default-ui/src/css/nav.css
+++ b/antora-ui-default/src/css/nav.css
@@ -1,3 +1,9 @@
+@media screen and (max-width: 1023.5px) {
+ html.is-clipped--nav {
+ overflow-y: hidden;
+ }
+}
+
.nav-container {
position: fixed;
top: var(--navbar-height);
@@ -60,16 +66,16 @@
height: inherit;
}
-html.is-clipped--nav {
- overflow-y: hidden;
-}
-
.nav-panel-menu {
overflow-y: scroll;
overscroll-behavior: none;
height: var(--nav-panel-menu-height);
}
+.nav-panel-menu:only-child {
+ height: 100%;
+}
+
.nav-panel-menu:not(.is-active) .nav-menu {
opacity: 0.75;
}
@@ -92,6 +98,29 @@ html.is-clipped--nav {
position: relative;
}
+.nav-menu-toggle {
+ background: transparent url(../img/octicons-16.svg#view-unfold) no-repeat center / 100% 100%;
+ border: none;
+ float: right;
+ height: 1em;
+ margin-right: -0.5rem;
+ opacity: 0.75;
+ outline: none;
+ padding: 0;
+ position: sticky;
+ top: calc((var(--nav-line-height) - 1 + 0.5) * 1rem);
+ visibility: hidden;
+ width: 1em;
+}
+
+.nav-menu-toggle.is-active {
+ background-image: url(../img/octicons-16.svg#view-fold);
+}
+
+.nav-panel-menu.is-active:hover .nav-menu-toggle {
+ visibility: visible;
+}
+
.nav-menu h3.title {
color: var(--nav-heading-font-color);
font-size: inherit;
@@ -197,11 +226,11 @@ html.is-clipped--nav {
}
.nav-panel-explore .components {
- line-height: var(--doc-line-height);
+ line-height: var(--nav-line-height);
flex-grow: 1;
box-shadow: inset 0 1px 5px var(--nav-panel-divider-color);
background: var(--nav-secondary-background);
- padding: 0.5rem 0.75rem 0 0.75rem;
+ padding: 0.75rem 0.75rem 0 0.75rem;
margin: 0;
overflow-y: scroll;
overscroll-behavior: none;
@@ -218,7 +247,7 @@ html.is-clipped--nav {
}
.nav-panel-explore .component + .component {
- margin-top: 0.5rem;
+ margin-top: 0.75rem;
}
.nav-panel-explore .component:last-child {
@@ -227,13 +256,14 @@ html.is-clipped--nav {
.nav-panel-explore .component .title {
font-weight: var(--body-font-weight-bold);
+ text-indent: 0.375rem hanging;
}
.nav-panel-explore .versions {
display: flex;
flex-wrap: wrap;
padding-left: 0;
- margin-top: -0.25rem;
+ margin: -0.125rem -0.375rem 0 0.375rem;
line-height: 1;
list-style: none;
}
@@ -243,16 +273,17 @@ html.is-clipped--nav {
}
.nav-panel-explore .component .version a {
- border: 1px solid var(--nav-border-color);
+ background: var(--nav-border-color);
border-radius: 0.25rem;
- opacity: 0.75;
white-space: nowrap;
- padding: 0.125em 0.25em;
+ padding: 0.25em 0.5em;
display: inherit;
+ opacity: 0.75;
}
.nav-panel-explore .component .is-current a {
- border-color: currentColor;
- opacity: 0.9;
+ background: var(--nav-heading-font-color);
+ color: var(--nav-secondary-background);
font-weight: var(--body-font-weight-bold);
+ opacity: 1;
}
diff --git a/antora-default-ui/src/css/page-versions.css b/antora-ui-default/src/css/page-versions.css
similarity index 100%
rename from antora-default-ui/src/css/page-versions.css
rename to antora-ui-default/src/css/page-versions.css
diff --git a/antora-default-ui/src/css/pagination.css b/antora-ui-default/src/css/pagination.css
similarity index 100%
rename from antora-default-ui/src/css/pagination.css
rename to antora-ui-default/src/css/pagination.css
diff --git a/antora-default-ui/src/css/print.css b/antora-ui-default/src/css/print.css
similarity index 100%
rename from antora-default-ui/src/css/print.css
rename to antora-ui-default/src/css/print.css
diff --git a/antora-ui-default/src/css/prism.css b/antora-ui-default/src/css/prism.css
new file mode 100644
index 0000000..5b8ed2d
--- /dev/null
+++ b/antora-ui-default/src/css/prism.css
@@ -0,0 +1,140 @@
+/**
+ * prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+
+code[class*="language-"],
+pre[class*="language-"] {
+ color: black;
+ background: none;
+ text-shadow: 0 1px white;
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+ font-size: 1em;
+ text-align: left;
+ white-space: pre;
+ word-spacing: normal;
+ word-break: normal;
+ word-wrap: normal;
+ line-height: 1.5;
+
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+ tab-size: 4;
+
+ -webkit-hyphens: none;
+ -moz-hyphens: none;
+ -ms-hyphens: none;
+ hyphens: none;
+}
+
+pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
+code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
+ text-shadow: none;
+ background: #b3d4fc;
+}
+
+pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
+code[class*="language-"]::selection, code[class*="language-"] ::selection {
+ text-shadow: none;
+ background: #b3d4fc;
+}
+
+@media print {
+ code[class*="language-"],
+ pre[class*="language-"] {
+ text-shadow: none;
+ }
+}
+
+/* Code blocks */
+pre[class*="language-"] {
+ padding: 1em;
+ margin: .5em 0;
+ overflow: auto;
+}
+
+:not(pre) > code[class*="language-"],
+pre[class*="language-"] {
+ background: #f5f2f0;
+}
+
+/* Inline code */
+:not(pre) > code[class*="language-"] {
+ padding: .1em;
+ border-radius: .3em;
+ white-space: normal;
+}
+
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+ color: slategray;
+}
+
+.token.punctuation {
+ color: #999;
+}
+
+.token.namespace {
+ opacity: .7;
+}
+
+.token.property,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+ color: #905;
+}
+
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+ color: #690;
+}
+
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+ color: #9a6e3a;
+ /* This background color was intended by the author of this theme. */
+ background: hsla(0, 0%, 100%, .5);
+}
+
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+ color: #07a;
+}
+
+.token.function,
+.token.class-name {
+ color: #DD4A68;
+}
+
+.token.regex,
+.token.important,
+.token.variable {
+ color: #e90;
+}
+
+.token.important,
+.token.bold {
+ font-weight: bold;
+}
+.token.italic {
+ font-style: italic;
+}
+
+.token.entity {
+ cursor: help;
+}
diff --git a/antora-default-ui/src/css/site.css b/antora-ui-default/src/css/site.css
similarity index 100%
rename from antora-default-ui/src/css/site.css
rename to antora-ui-default/src/css/site.css
diff --git a/antora-default-ui/src/css/toc.css b/antora-ui-default/src/css/toc.css
similarity index 96%
rename from antora-default-ui/src/css/toc.css
rename to antora-ui-default/src/css/toc.css
index 08989fe..dc33497 100644
--- a/antora-default-ui/src/css/toc.css
+++ b/antora-ui-default/src/css/toc.css
@@ -96,7 +96,3 @@
.sidebar.toc .toc-menu a:focus {
background: var(--panel-background);
}
-
-.toc .toc-menu .is-hidden-toc {
- display: none !important;
-}
diff --git a/antora-default-ui/src/css/toolbar.css b/antora-ui-default/src/css/toolbar.css
similarity index 100%
rename from antora-default-ui/src/css/toolbar.css
rename to antora-ui-default/src/css/toolbar.css
diff --git a/antora-default-ui/src/css/typeface-roboto-mono.css b/antora-ui-default/src/css/typeface-roboto-mono.css
similarity index 61%
rename from antora-default-ui/src/css/typeface-roboto-mono.css
rename to antora-ui-default/src/css/typeface-roboto-mono.css
index 841df08..b25128c 100644
--- a/antora-default-ui/src/css/typeface-roboto-mono.css
+++ b/antora-ui-default/src/css/typeface-roboto-mono.css
@@ -8,12 +8,32 @@
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+/*
@font-face {
font-family: "Roboto Mono";
font-style: normal;
- font-weight: 500;
+ font-weight: 400;
+ src: url(~@fontsource/roboto-mono/files/roboto-mono-cyrillic-400-normal.woff2) format("woff2");
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+*/
+
+@font-face {
+ font-family: "Roboto Mono";
+ font-style: normal;
+ font-weight: 600;
src:
url(~@fontsource/roboto-mono/files/roboto-mono-latin-500-normal.woff2) format("woff2"),
url(~@fontsource/roboto-mono/files/roboto-mono-latin-500-normal.woff) format("woff");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+
+/*
+@font-face {
+ font-family: "Roboto Mono";
+ font-style: normal;
+ font-weight: 600;
+ src: url(~@fontsource/roboto-mono/files/roboto-mono-cyrillic-500-normal.woff2) format("woff2");
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+*/
diff --git a/antora-default-ui/src/css/typeface-roboto.css b/antora-ui-default/src/css/typeface-roboto.css
similarity index 62%
rename from antora-default-ui/src/css/typeface-roboto.css
rename to antora-ui-default/src/css/typeface-roboto.css
index 1648a2b..931cc2c 100644
--- a/antora-default-ui/src/css/typeface-roboto.css
+++ b/antora-ui-default/src/css/typeface-roboto.css
@@ -8,6 +8,14 @@
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+@font-face {
+ font-family: "Roboto";
+ font-style: normal;
+ font-weight: 400;
+ src: url(~@fontsource/roboto/files/roboto-cyrillic-400-normal.woff2) format("woff2");
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+
@font-face {
font-family: "Roboto";
font-style: italic;
@@ -18,22 +26,46 @@
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+@font-face {
+ font-family: "Roboto";
+ font-style: italic;
+ font-weight: 400;
+ src: url(~@fontsource/roboto/files/roboto-cyrillic-400-italic.woff2) format("woff2");
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+
@font-face {
font-family: "Roboto";
font-style: normal;
- font-weight: 500;
+ font-weight: 600;
src:
url(~@fontsource/roboto/files/roboto-latin-500-normal.woff2) format("woff2"),
url(~@fontsource/roboto/files/roboto-latin-500-normal.woff) format("woff");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+@font-face {
+ font-family: "Roboto";
+ font-style: normal;
+ font-weight: 600;
+ src: url(~@fontsource/roboto/files/roboto-cyrillic-500-normal.woff2) format("woff2");
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+
@font-face {
font-family: "Roboto";
font-style: italic;
- font-weight: 500;
+ font-weight: 600;
src:
url(~@fontsource/roboto/files/roboto-latin-500-italic.woff2) format("woff2"),
url(~@fontsource/roboto/files/roboto-latin-500-italic.woff) format("woff");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
+
+@font-face {
+ font-family: "Roboto";
+ font-style: italic;
+ font-weight: 600;
+ src: url(~@fontsource/roboto/files/roboto-cyrillic-500-italic.woff2) format("woff2");
+ unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
diff --git a/antora-default-ui/src/css/vars.css b/antora-ui-default/src/css/vars.css
similarity index 98%
rename from antora-default-ui/src/css/vars.css
rename to antora-ui-default/src/css/vars.css
index 5df9e8b..91c9c09 100644
--- a/antora-default-ui/src/css/vars.css
+++ b/antora-ui-default/src/css/vars.css
@@ -25,9 +25,9 @@
--body-line-height: 1.15;
--body-font-color: var(--color-jet-70);
--body-font-family: "Roboto", sans-serif;
- --body-font-weight-bold: 500;
+ --body-font-weight-bold: 600;
--monospace-font-family: "Roboto Mono", monospace;
- --monospace-font-weight-bold: 500;
+ --monospace-font-weight-bold: 600;
/* base */
--body-background: var(--color-white);
--panel-background: var(--color-smoke-30);
diff --git a/antora-default-ui/src/helpers/and.js b/antora-ui-default/src/helpers/and.js
similarity index 100%
rename from antora-default-ui/src/helpers/and.js
rename to antora-ui-default/src/helpers/and.js
diff --git a/antora-default-ui/src/helpers/detag.js b/antora-ui-default/src/helpers/detag.js
similarity index 100%
rename from antora-default-ui/src/helpers/detag.js
rename to antora-ui-default/src/helpers/detag.js
diff --git a/antora-default-ui/src/helpers/eq.js b/antora-ui-default/src/helpers/eq.js
similarity index 100%
rename from antora-default-ui/src/helpers/eq.js
rename to antora-ui-default/src/helpers/eq.js
diff --git a/antora-default-ui/src/helpers/increment.js b/antora-ui-default/src/helpers/increment.js
similarity index 100%
rename from antora-default-ui/src/helpers/increment.js
rename to antora-ui-default/src/helpers/increment.js
diff --git a/antora-default-ui/src/helpers/ne.js b/antora-ui-default/src/helpers/ne.js
similarity index 100%
rename from antora-default-ui/src/helpers/ne.js
rename to antora-ui-default/src/helpers/ne.js
diff --git a/antora-default-ui/src/helpers/not.js b/antora-ui-default/src/helpers/not.js
similarity index 100%
rename from antora-default-ui/src/helpers/not.js
rename to antora-ui-default/src/helpers/not.js
diff --git a/antora-default-ui/src/helpers/or.js b/antora-ui-default/src/helpers/or.js
similarity index 100%
rename from antora-default-ui/src/helpers/or.js
rename to antora-ui-default/src/helpers/or.js
diff --git a/antora-default-ui/src/helpers/relativize.js b/antora-ui-default/src/helpers/relativize.js
similarity index 60%
rename from antora-default-ui/src/helpers/relativize.js
rename to antora-ui-default/src/helpers/relativize.js
index 6fdfb45..7989319 100644
--- a/antora-default-ui/src/helpers/relativize.js
+++ b/antora-ui-default/src/helpers/relativize.js
@@ -4,19 +4,19 @@ const { posix: path } = require('path')
module.exports = (to, from, ctx) => {
if (!to) return '#'
+ if (to.charAt() !== '/') return to
// NOTE only legacy invocation provides both to and from
if (!ctx) from = (ctx = from).data.root.page.url
- if (to.charAt() !== '/') return to
if (!from) return (ctx.data.root.site.path || '') + to
let hash = ''
const hashIdx = to.indexOf('#')
if (~hashIdx) {
- hash = to.substr(hashIdx)
- to = to.substr(0, hashIdx)
+ hash = to.slice(hashIdx)
+ to = to.slice(0, hashIdx)
}
- return to === from
- ? hash || (isDir(to) ? './' : path.basename(to))
- : (path.relative(path.dirname(from + '.'), to) || '.') + (isDir(to) ? '/' + hash : hash)
+ if (to === from) return hash || (isDir(to) ? './' : path.basename(to))
+ const rel = path.relative(path.dirname(from + '.'), to)
+ return rel ? (isDir(to) ? rel + '/' : rel) + hash : (isDir(to) ? './' : '../' + path.basename(to)) + hash
}
function isDir (str) {
diff --git a/antora-default-ui/src/helpers/year.js b/antora-ui-default/src/helpers/year.js
similarity index 100%
rename from antora-default-ui/src/helpers/year.js
rename to antora-ui-default/src/helpers/year.js
diff --git a/antora-default-ui/src/img/back.svg b/antora-ui-default/src/img/back.svg
similarity index 100%
rename from antora-default-ui/src/img/back.svg
rename to antora-ui-default/src/img/back.svg
diff --git a/antora-default-ui/src/img/caret.svg b/antora-ui-default/src/img/caret.svg
similarity index 100%
rename from antora-default-ui/src/img/caret.svg
rename to antora-ui-default/src/img/caret.svg
diff --git a/antora-default-ui/src/img/chevron.svg b/antora-ui-default/src/img/chevron.svg
similarity index 100%
rename from antora-default-ui/src/img/chevron.svg
rename to antora-ui-default/src/img/chevron.svg
diff --git a/antora-default-ui/src/img/home-o.svg b/antora-ui-default/src/img/home-o.svg
similarity index 100%
rename from antora-default-ui/src/img/home-o.svg
rename to antora-ui-default/src/img/home-o.svg
diff --git a/antora-default-ui/src/img/home.svg b/antora-ui-default/src/img/home.svg
similarity index 100%
rename from antora-default-ui/src/img/home.svg
rename to antora-ui-default/src/img/home.svg
diff --git a/antora-default-ui/src/img/menu.svg b/antora-ui-default/src/img/menu.svg
similarity index 100%
rename from antora-default-ui/src/img/menu.svg
rename to antora-ui-default/src/img/menu.svg
diff --git a/antora-default-ui/src/img/octicons-16.svg b/antora-ui-default/src/img/octicons-16.svg
similarity index 52%
rename from antora-default-ui/src/img/octicons-16.svg
rename to antora-ui-default/src/img/octicons-16.svg
index d8415d0..0e8ab39 100644
--- a/antora-default-ui/src/img/octicons-16.svg
+++ b/antora-ui-default/src/img/octicons-16.svg
@@ -31,6 +31,21 @@
fill-rule="evenodd"
d="M5.75 1a.75.75 0 00-.75.75v3c0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75v-3a.75.75 0 00-.75-.75h-4.5zm.75 3V2.5h3V4h-3zm-2.874-.467a.75.75 0 00-.752-1.298A1.75 1.75 0 002 3.75v9.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 13.25v-9.5a1.75 1.75 0 00-.874-1.515.75.75 0 10-.752 1.298.25.25 0 01.126.217v9.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-9.5a.25.25 0 01.126-.217z" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/antora-default-ui/src/js/01-nav.js b/antora-ui-default/src/js/01-nav.js
similarity index 87%
rename from antora-default-ui/src/js/01-nav.js
rename to antora-ui-default/src/js/01-nav.js
index 80937ee..eed4fc6 100644
--- a/antora-default-ui/src/js/01-nav.js
+++ b/antora-ui-default/src/js/01-nav.js
@@ -5,7 +5,9 @@
var navContainer = document.querySelector('.nav-container')
var navToggle = document.querySelector('.nav-toggle')
+ if (!navContainer && (!navToggle || (navToggle.hidden = true))) return
var nav = navContainer.querySelector('.nav')
+ var navMenuToggle = navContainer.querySelector('.nav-menu-toggle')
navToggle.addEventListener('click', showNav)
navContainer.addEventListener('click', trapEvent)
@@ -33,6 +35,22 @@
}
})
+ if (navMenuToggle && menuPanel.querySelector('.nav-item-toggle')) {
+ navMenuToggle.style.display = ''
+ navMenuToggle.addEventListener('click', function () {
+ var collapse = !this.classList.toggle('is-active')
+ find(menuPanel, '.nav-item > .nav-item-toggle').forEach(function (btn) {
+ collapse ? btn.parentElement.classList.remove('is-active') : btn.parentElement.classList.add('is-active')
+ })
+ if (currentPageItem) {
+ if (collapse) activateCurrentPath(currentPageItem)
+ scrollItemToMidpoint(menuPanel, currentPageItem.querySelector('.nav-link'))
+ } else {
+ menuPanel.scrollTop = 0
+ }
+ })
+ }
+
if (explorePanel) {
explorePanel.querySelector('.context').addEventListener('click', function () {
// NOTE logic assumes there are only two panels
diff --git a/antora-default-ui/src/js/02-on-this-page.js b/antora-ui-default/src/js/02-on-this-page.js
similarity index 97%
rename from antora-default-ui/src/js/02-on-this-page.js
rename to antora-ui-default/src/js/02-on-this-page.js
index 035bea4..f3b2732 100644
--- a/antora-default-ui/src/js/02-on-this-page.js
+++ b/antora-ui-default/src/js/02-on-this-page.js
@@ -9,12 +9,13 @@
var articleSelector = 'article.doc'
var article = document.querySelector(articleSelector)
+ if (!article) return
var headingsSelector = []
for (var level = 0; level <= levels; level++) {
var headingSelector = [articleSelector]
if (level) {
for (var l = 1; l <= level; l++) headingSelector.push((l === 2 ? '.sectionbody>' : '') + '.sect' + l)
- headingSelector.push('h' + (level + 1) + '[id]')
+ headingSelector.push('h' + (level + 1) + '[id]' + (level > 1 ? ':not(.discrete)' : ''))
} else {
headingSelector.push('h1[id].sect0')
}
diff --git a/antora-default-ui/src/js/03-fragment-jumper.js b/antora-ui-default/src/js/03-fragment-jumper.js
similarity index 98%
rename from antora-default-ui/src/js/03-fragment-jumper.js
rename to antora-ui-default/src/js/03-fragment-jumper.js
index d112e47..bff0896 100644
--- a/antora-default-ui/src/js/03-fragment-jumper.js
+++ b/antora-ui-default/src/js/03-fragment-jumper.js
@@ -2,6 +2,7 @@
'use strict'
var article = document.querySelector('article.doc')
+ if (!article) return
var toolbar = document.querySelector('.toolbar')
var supportsScrollToOptions = 'scrollTo' in document.documentElement
diff --git a/antora-default-ui/src/js/04-page-versions.js b/antora-ui-default/src/js/04-page-versions.js
similarity index 100%
rename from antora-default-ui/src/js/04-page-versions.js
rename to antora-ui-default/src/js/04-page-versions.js
diff --git a/antora-default-ui/src/js/05-mobile-navbar.js b/antora-ui-default/src/js/05-mobile-navbar.js
similarity index 79%
rename from antora-default-ui/src/js/05-mobile-navbar.js
rename to antora-ui-default/src/js/05-mobile-navbar.js
index 892d0e7..d85abb2 100644
--- a/antora-default-ui/src/js/05-mobile-navbar.js
+++ b/antora-ui-default/src/js/05-mobile-navbar.js
@@ -8,8 +8,8 @@
function toggleNavbarMenu (e) {
e.stopPropagation() // trap event
document.documentElement.classList.toggle('is-clipped--navbar')
- this.classList.toggle('is-active')
- var menu = document.getElementById(this.dataset.target)
+ navbarBurger.setAttribute('aria-expanded', this.classList.toggle('is-active'))
+ var menu = document.getElementById(this.getAttribute('aria-controls') || this.dataset.target)
if (menu.classList.toggle('is-active')) {
menu.style.maxHeight = ''
var expectedMaxHeight = window.innerHeight - Math.round(menu.getBoundingClientRect().top)
diff --git a/antora-default-ui/src/js/06-copy-to-clipboard.js b/antora-ui-default/src/js/06-copy-to-clipboard.js
similarity index 97%
rename from antora-default-ui/src/js/06-copy-to-clipboard.js
rename to antora-ui-default/src/js/06-copy-to-clipboard.js
index df86df8..8c9d698 100644
--- a/antora-default-ui/src/js/06-copy-to-clipboard.js
+++ b/antora-ui-default/src/js/06-copy-to-clipboard.js
@@ -6,9 +6,9 @@
var TRAILING_SPACE_RX = / +$/gm
var config = (document.getElementById('site-script') || { dataset: {} }).dataset
- var uiRootPath = config.uiRootPath == null ? '.' : config.uiRootPath
- var svgAs = config.svgAs
var supportsCopy = window.navigator.clipboard
+ var svgAs = config.svgAs
+ var uiRootPath = (config.uiRootPath == null ? window.uiRootPath : config.uiRootPath) || '.'
;[].slice.call(document.querySelectorAll('.doc pre.highlight, .doc .literalblock pre')).forEach(function (pre) {
var code, language, lang, copy, toast, toolbox
diff --git a/antora-default-ui/src/js/vendor/highlight.bundle.js b/antora-ui-default/src/js/vendor/highlight.bundle.js
similarity index 94%
rename from antora-default-ui/src/js/vendor/highlight.bundle.js
rename to antora-ui-default/src/js/vendor/highlight.bundle.js
index f679686..fe8ae5d 100644
--- a/antora-default-ui/src/js/vendor/highlight.bundle.js
+++ b/antora-ui-default/src/js/vendor/highlight.bundle.js
@@ -1,12 +1,12 @@
;(function () {
'use strict'
- var hljs = require('highlight.js/lib/core')
+ var hljs = require('highlight.js/lib/highlight')
hljs.registerLanguage('asciidoc', require('highlight.js/lib/languages/asciidoc'))
hljs.registerLanguage('bash', require('highlight.js/lib/languages/bash'))
hljs.registerLanguage('clojure', require('highlight.js/lib/languages/clojure'))
hljs.registerLanguage('cpp', require('highlight.js/lib/languages/cpp'))
- hljs.registerLanguage('cs', require('highlight.js/lib/languages/csharp'))
+ hljs.registerLanguage('cs', require('highlight.js/lib/languages/cs'))
hljs.registerLanguage('css', require('highlight.js/lib/languages/css'))
hljs.registerLanguage('diff', require('highlight.js/lib/languages/diff'))
hljs.registerLanguage('dockerfile', require('highlight.js/lib/languages/dockerfile'))
@@ -17,6 +17,7 @@
hljs.registerLanguage('java', require('highlight.js/lib/languages/java'))
hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript'))
hljs.registerLanguage('json', require('highlight.js/lib/languages/json'))
+ hljs.registerLanguage('julia', require('highlight.js/lib/languages/julia'))
hljs.registerLanguage('kotlin', require('highlight.js/lib/languages/kotlin'))
hljs.registerLanguage('lua', require('highlight.js/lib/languages/lua'))
hljs.registerLanguage('markdown', require('highlight.js/lib/languages/markdown'))
@@ -37,6 +38,6 @@
hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'))
hljs.registerLanguage('yaml', require('highlight.js/lib/languages/yaml'))
;[].slice.call(document.querySelectorAll('pre code.hljs[data-lang]')).forEach(function (node) {
- hljs.highlightElement(node)
+ hljs.highlightBlock(node)
})
})()
diff --git a/antora-ui-default/src/js/vendor/prism.bundle.js b/antora-ui-default/src/js/vendor/prism.bundle.js
new file mode 100644
index 0000000..a52b168
--- /dev/null
+++ b/antora-ui-default/src/js/vendor/prism.bundle.js
@@ -0,0 +1,15 @@
+;(function () {
+ var Prism = require('prismjs')
+ window.Prism = Prism
+ require('prismjs/components/prism-clike')
+ require('prismjs/components/prism-markup')
+ require('prismjs/components/prism-css')
+ require('prismjs/components/prism-javascript')
+ require('prismjs/components/prism-bash')
+ require('prismjs/components/prism-sql')
+ require('prismjs/components/prism-plsql')
+ require('prismjs/components/prism-yaml')
+ require('prismjs/components/prism-json')
+ require('prismjs/plugins/keep-markup/prism-keep-markup.min')
+ require('prismjs/plugins/line-numbers/prism-line-numbers.min')
+})()
diff --git a/antora-default-ui/src/layouts/404.hbs b/antora-ui-default/src/layouts/404.hbs
similarity index 100%
rename from antora-default-ui/src/layouts/404.hbs
rename to antora-ui-default/src/layouts/404.hbs
diff --git a/antora-default-ui/src/layouts/default.hbs b/antora-ui-default/src/layouts/default.hbs
similarity index 100%
rename from antora-default-ui/src/layouts/default.hbs
rename to antora-ui-default/src/layouts/default.hbs
diff --git a/antora-default-ui/src/partials/article-404.hbs b/antora-ui-default/src/partials/article-404.hbs
similarity index 100%
rename from antora-default-ui/src/partials/article-404.hbs
rename to antora-ui-default/src/partials/article-404.hbs
diff --git a/antora-default-ui/src/partials/article.hbs b/antora-ui-default/src/partials/article.hbs
similarity index 100%
rename from antora-default-ui/src/partials/article.hbs
rename to antora-ui-default/src/partials/article.hbs
diff --git a/antora-default-ui/src/partials/body.hbs b/antora-ui-default/src/partials/body.hbs
similarity index 100%
rename from antora-default-ui/src/partials/body.hbs
rename to antora-ui-default/src/partials/body.hbs
diff --git a/antora-default-ui/src/partials/breadcrumbs.hbs b/antora-ui-default/src/partials/breadcrumbs.hbs
similarity index 100%
rename from antora-default-ui/src/partials/breadcrumbs.hbs
rename to antora-ui-default/src/partials/breadcrumbs.hbs
diff --git a/antora-ui-default/src/partials/edit-this-page.hbs b/antora-ui-default/src/partials/edit-this-page.hbs
new file mode 100644
index 0000000..27946f4
--- /dev/null
+++ b/antora-ui-default/src/partials/edit-this-page.hbs
@@ -0,0 +1,5 @@
+{{#if (and page.fileUri (not env.CI))}}
+
+{{/if}}
diff --git a/antora-default-ui/src/partials/footer-content.hbs b/antora-ui-default/src/partials/footer-content.hbs
similarity index 100%
rename from antora-default-ui/src/partials/footer-content.hbs
rename to antora-ui-default/src/partials/footer-content.hbs
diff --git a/antora-default-ui/src/partials/footer-scripts.hbs b/antora-ui-default/src/partials/footer-scripts.hbs
similarity index 100%
rename from antora-default-ui/src/partials/footer-scripts.hbs
rename to antora-ui-default/src/partials/footer-scripts.hbs
diff --git a/antora-default-ui/src/partials/footer.hbs b/antora-ui-default/src/partials/footer.hbs
similarity index 100%
rename from antora-default-ui/src/partials/footer.hbs
rename to antora-ui-default/src/partials/footer.hbs
diff --git a/antora-default-ui/src/partials/head-icons.hbs b/antora-ui-default/src/partials/head-icons.hbs
similarity index 100%
rename from antora-default-ui/src/partials/head-icons.hbs
rename to antora-ui-default/src/partials/head-icons.hbs
diff --git a/antora-default-ui/src/partials/head-info.hbs b/antora-ui-default/src/partials/head-info.hbs
similarity index 100%
rename from antora-default-ui/src/partials/head-info.hbs
rename to antora-ui-default/src/partials/head-info.hbs
diff --git a/antora-default-ui/src/partials/head-meta.hbs b/antora-ui-default/src/partials/head-meta.hbs
similarity index 100%
rename from antora-default-ui/src/partials/head-meta.hbs
rename to antora-ui-default/src/partials/head-meta.hbs
diff --git a/antora-default-ui/src/partials/head-prelude.hbs b/antora-ui-default/src/partials/head-prelude.hbs
similarity index 100%
rename from antora-default-ui/src/partials/head-prelude.hbs
rename to antora-ui-default/src/partials/head-prelude.hbs
diff --git a/antora-default-ui/src/partials/head-scripts.hbs b/antora-ui-default/src/partials/head-scripts.hbs
similarity index 94%
rename from antora-default-ui/src/partials/head-scripts.hbs
rename to antora-ui-default/src/partials/head-scripts.hbs
index 3db8cee..8dbc7d0 100644
--- a/antora-default-ui/src/partials/head-scripts.hbs
+++ b/antora-ui-default/src/partials/head-scripts.hbs
@@ -2,4 +2,6 @@
{{/with}}
+ {{!--
+ --}}
diff --git a/antora-default-ui/src/partials/head-styles.hbs b/antora-ui-default/src/partials/head-styles.hbs
similarity index 100%
rename from antora-default-ui/src/partials/head-styles.hbs
rename to antora-ui-default/src/partials/head-styles.hbs
diff --git a/antora-default-ui/src/partials/head-title.hbs b/antora-ui-default/src/partials/head-title.hbs
similarity index 100%
rename from antora-default-ui/src/partials/head-title.hbs
rename to antora-ui-default/src/partials/head-title.hbs
diff --git a/antora-default-ui/src/partials/head.hbs b/antora-ui-default/src/partials/head.hbs
similarity index 100%
rename from antora-default-ui/src/partials/head.hbs
rename to antora-ui-default/src/partials/head.hbs
diff --git a/antora-default-ui/src/partials/header-content.hbs b/antora-ui-default/src/partials/header-content.hbs
similarity index 93%
rename from antora-default-ui/src/partials/header-content.hbs
rename to antora-ui-default/src/partials/header-content.hbs
index 8a094a4..f11bd60 100644
--- a/antora-default-ui/src/partials/header-content.hbs
+++ b/antora-ui-default/src/partials/header-content.hbs
@@ -9,7 +9,7 @@
{{/if}}
-