This is a paragraph in a sidebar.
-diff --git a/doc/doc-ui/docs/antora.yml b/doc/doc-ui/docs/antora.yml deleted file mode 100644 index 55876df..0000000 --- a/doc/doc-ui/docs/antora.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: antora-ui-default -title: Antora Default UI -version: ~ -nav: -- modules/ROOT/nav.adoc diff --git a/doc/doc-ui/docs/modules/ROOT/nav.adoc b/doc/doc-ui/docs/modules/ROOT/nav.adoc deleted file mode 100644 index 1af8968..0000000 --- a/doc/doc-ui/docs/modules/ROOT/nav.adoc +++ /dev/null @@ -1,16 +0,0 @@ -* xref:prerequisites.adoc[] -* xref:set-up-project.adoc[] -* xref:build-preview-ui.adoc[] -* xref:development-workflow.adoc[] -* xref:templates.adoc[] - ** xref:create-helper.adoc[] -* xref:add-static-files.adoc[] -* xref:stylesheets.adoc[] - ** xref:add-fonts.adoc[] -* xref:copy-to-clipboard.adoc[] -* xref:style-guide.adoc[] - ** xref:inline-text-styles.adoc[] - ** xref:admonition-styles.adoc[] - ** xref:list-styles.adoc[] - ** xref:sidebar-styles.adoc[] - ** xref:ui-macro-styles.adoc[] diff --git a/doc/doc-ui/docs/modules/ROOT/pages/add-fonts.adoc b/doc/doc-ui/docs/modules/ROOT/pages/add-fonts.adoc deleted file mode 100644 index e4d2848..0000000 --- a/doc/doc-ui/docs/modules/ROOT/pages/add-fonts.adoc +++ /dev/null @@ -1,123 +0,0 @@ -= Add Fonts - -This page explains how to add new fonts to your UI. -These instructions assume you've forked the default UI and are able to customize it. - -There are three steps involved: - -. Add the font to your UI project -. Add a font-face declaration to your stylesheet -. Use the new font in your stylesheet - -How you reference the font file in the font-face declaration depends on how you decide to manage it. -You can manage the font with npm or download it manually and add it directly to your UI project. -The following sections describe each approach in turn. - -== npm managed - -You can use npm (or Yarn) to manage the font. -This approach saves you from having to store the font file directly in your UI project. -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 - -. In [.path]_src/css_, add a corresponding CSS file (e.g., [.path]_typeface-open-sans.css_) -. In that file, declare the font face: -+ -[source,css] ----- -@font-face { - font-family: "Open Sans"; - font-style: normal; - font-weight: 400; - src: - local("Open Sans"), - local("Open Sans-Regular"), - url(~typeface-open-sans/files/open-sans-latin-400.woff) format("woff") -} ----- -+ -The Gulp build recognizes the `~` URL prefix and copies the font from the npm package to the build folder (and hence bundle). -+ -You must define one @font-face for each font weight and style combination (e.g., `font-weight: 500` + `font-style: italic`) from the font that you want to use in your stylesheet. - -. Import the typeface CSS file you just created into the main stylesheet, [.path]_src/css/site.css_ (adjacent to the other typeface imports): -+ -[source,css] ----- -@import "typeface-open-sans.css"; ----- - -. Repeat the previous steps for each font style and weight you want to use from that package. -. Change the CSS to use your newly imported font: -+ -[source,css] ----- -html { - font-family: "Open Sans", sans; -} ----- -+ -TIP: If you're building on the default UI, you may instead want to define or update the font family using a variable defined in [.path]_src/css/vars.css_. - -. Test the new font by previewing your UI: - - $ 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. - -== Manual - -A simpler approach to adding fonts is to store them directly in your project. -Here are the steps involved. - -. Download the font files and add them to the [.path]_src/font_ folder. -Create this folder if it does not exist. -. In [.path]_src/css_, add a corresponding CSS file (e.g., [.path]_typeface-open-sans.css_) -. In that file, declare the font face: -+ -[source,css] ----- -@font-face { - font-family: "Open Sans"; - font-style: normal; - font-weight: 400; - src: - local("Open Sans"), - local("Open Sans-Regular"), - url(../font/open-sans-latin-400.woff) format("woff") -} ----- -+ -Note that the path is a relative path starting from the [.path]_src/css_ folder to the [.path]_src/font_ folder. -+ -You must define one @font-face for each font weight and style combination (e.g., `font-weight: 500` + `font-style: italic`) from the font that you want to use in your stylesheet. - -. Import the typeface CSS file you just created into the main stylesheet, [.path]_src/css/site.css_ (adjacent to the other typeface imports): -+ -[source,css] ----- -@import "typeface-open-sans.css"; ----- - -. Repeat the previous steps for each font style and weight you want to use. -. Change the CSS to use your newly imported font: -+ -[source,css] ----- -html { - font-family: "Open Sans", sans; -} ----- -+ -TIP: If you're building on the default UI, you may instead want to define or update the font family using a variable defined in [.path]_src/css/vars.css_. - -. Test the new font by previewing your UI: - - $ 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/doc/doc-ui/docs/modules/ROOT/pages/add-static-files.adoc b/doc/doc-ui/docs/modules/ROOT/pages/add-static-files.adoc deleted file mode 100644 index a5ddb79..0000000 --- a/doc/doc-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/doc/doc-ui/docs/modules/ROOT/pages/admonition-styles.adoc b/doc/doc-ui/docs/modules/ROOT/pages/admonition-styles.adoc deleted file mode 100644 index 28bef0d..0000000 --- a/doc/doc-ui/docs/modules/ROOT/pages/admonition-styles.adoc +++ /dev/null @@ -1,39 +0,0 @@ -= Admonition Styles -:navtitle: Admonitions - -An xref:antora:asciidoc:admonitions.adoc[admonition], also known as a notice, helps draw attention to content with a special label or icon. - -== Admonition blocks - -An admonition block is a table. -The table title element is specified by the block class: tip, note, important, warning, or caution. -Here's an AsciiDoc source example that produces an admonition with the table title warning: - -[source,asciidoc] ----- -WARNING: Watch out! ----- - -If font-based icons are enabled (`icons=font`), the table title text is replaced by the associated icon. - -[source,html] ----- -- - | -
-
-
-Watch out! - |
-
)
-
-How xref:antora:asciidoc:monospace.adoc[inline monospace text] is displayed depends on the fixed-width font loaded by your UI and the CSS styles it applies to the `` HTML tag.
-
-[source,html]
-----
-A monospace word
, or a monospace phrase of text
.
-----
-
-Since `` is a semantic HTML element, it automatically inherits default styling (`font-family: monospace`) from the browser.
-If you want to override the browser styles, you'll need to define properties on the `code` selector in the stylesheet for your UI.
-
-In the default UI, the `code` element is styled using the fixed-width font loaded by the stylesheet (Roboto Mono).
-For example:
-
-[example]
-A monospace `word`, or a monospace `phrase of text`.
-
-[#highlight]
-== Highlighted text ()
-
-How xref:antora:asciidoc:highlight.adoc[highlighted (or marked) text] appears on your site depends on the CSS styles the UI applies to the `` HTML tag.
-
-[source,html]
-----
-Let’s add some highlight to it.
-----
-
-Since `` is a semantic HTML element, it automatically inherits default styling (`background-color: yellow`) from the browser.
-Here's an example:
-
-[example]
-Let's add some #highlight# to it.
-
-If you want to override the browser styles, you'll need to define properties on the `mark` selector in the stylesheet for your UI.
diff --git a/doc/doc-ui/docs/modules/ROOT/pages/list-styles.adoc b/doc/doc-ui/docs/modules/ROOT/pages/list-styles.adoc
deleted file mode 100644
index 414bb7a..0000000
--- a/doc/doc-ui/docs/modules/ROOT/pages/list-styles.adoc
+++ /dev/null
@@ -1,81 +0,0 @@
-= List Styles
-:navtitle: Lists
-
-== Ordered list numeration
-
-The browser automatically numbers xref:antora:asciidoc:ordered-and-unordered-lists.adoc[ordered lists] and selects a numeration style by list depth in the following order: decimal, lower-alpha, lower-roman, upper-alpha, upper-roman.
-
-AsciiDoc allows the author to override the numeration style for an ordered list.
-Here's an example of that output:
-
-[source,html]
-----
-
-
-a
-b
-c
-
-
-----
-
-In order to support this customization, you must assign the list-style-type property to the following classes on the `` element in your stylesheet.
-
-|===
-| class |list-style-type property value
-
-|arabic
-|decimal
-
-|decimal
-|decimal-leading-zero
-
-|loweralpha
-|lower-alpha
-
-|lowergreek
-|lower-greek
-
-|lowerroman
-|lower-roman
-
-|upperalpha
-|upper-alpha
-
-|upperroman
-|upper-roman
-|===
-
-== Checklist
-
-A xref:antora:asciidoc:checklists.adoc[checklist] is an unordered list with items that are prefixed with a checkbox marker (checked or unchecked).
-Here's an AsciiDoc source example that produces a checklist:
-
-[source,asciidoc]
-----
-* [ ] todo
-* [x] done!
-----
-
-If font-based icons are enabled (`icons=font`), the checkbox gets inserted as the first element of the paragraph element that contains the list item text.
-
-[source,html]
-----
-
-
--
-
todo
-
--
-
done!
-
-
-
-----
-
-The recommended approach is to hide the list markers (`list-style: none`), then add a checkbox glyph on the icon element using either a background image or a `before` pseudo element.
-
-Here's how it might appear:
-
-* [ ] todo
-* [*] done!
diff --git a/doc/doc-ui/docs/modules/ROOT/pages/prerequisites.adoc b/doc/doc-ui/docs/modules/ROOT/pages/prerequisites.adoc
deleted file mode 100644
index 0b6571b..0000000
--- a/doc/doc-ui/docs/modules/ROOT/pages/prerequisites.adoc
+++ /dev/null
@@ -1,56 +0,0 @@
-= UI Development Prerequisites
-// URLs:
-:url-nvm: https://github.com/creationix/nvm
-:url-node: https://nodejs.org
-:url-gulp: http://gulpjs.com
-:url-git: https://git-scm.com
-:url-git-dl: {url-git}/downloads
-:url-node-releases: https://nodejs.org/en/about/releases/
-// These prerequisite instructions are less detailed than Antora's prerequisite instructions, I don't know if this is a concern or not.
-
-An Antora UI project is based on tools built atop Node.js, namely:
-
-* {url-node}[Node.js] (commands: `node` and `npm`)
- ** {url-nvm}[nvm] (optional, but strongly recommended)
-* {url-gulp}[Gulp CLI] (command: `gulp`)
-
-You also need {url-git}[git] (command: `git`) to pull down the project and push updates to it.
-
-== git
-
-First, make sure you have git installed.
-
- $ git --version
-
-If not, {url-git-dl}[download and install] the git package for your system.
-
-== Node.js
-
-You need Node.js installed on your machine to use Antora, including the default UI.
-Antora follows the Node.js release schedule, so we advise that you choose an active long term support (LTS) release of Node.js.
-We recommend using the latest active Node.js LTS version.
-While you can use other versions of Node.js, Antora is only tested against LTS releases.
-
-To check whether you have Node.js installed, and which version, open a terminal and type:
-
- $ node --version
-
-You should see a version string, such as:
-
- v10.15.3
-
-If the command fails with an error, it means you don't have Node.js installed.
-The best way to install Node.js is to use nvm (Node Version Manager).
-Refer to xref:antora:install:linux-requirements.adoc#install-nvm[Install nvm and Node.js (Linux)], xref:antora:install:macos-requirements.adoc#install-nvm[Install nvm and Node.js (macOS)], or xref:antora:install:windows-requirements.adoc#install-nvm[Install nvm and Node.js (Windows)] for instructions.
-
-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).
-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:
-
- $ npm install -g gulp-cli
-
-Now that you have Node.js and Gulp installed, you're ready to set up the project.
diff --git a/doc/doc-ui/docs/modules/ROOT/pages/set-up-project.adoc b/doc/doc-ui/docs/modules/ROOT/pages/set-up-project.adoc
deleted file mode 100644
index 03b7ed1..0000000
--- a/doc/doc-ui/docs/modules/ROOT/pages/set-up-project.adoc
+++ /dev/null
@@ -1,60 +0,0 @@
-= Set up a UI Project
-:url-project: https://gitlab.com/antora/antora-ui-default.git
-
-Before you can start working on the UI, you need to grab the sources and initialize the project.
-The sources can be {url-project}[Antora's default UI] or an existing UI project structured to work with Antora.
-
-== Fetch the Default UI project
-
-To start, clone the default UI project using git:
-
-[subs=attributes+]
- $ git clone {url-project}
- $ cd "`basename ${_%.git}`"
-
-The example above clones Antora's default UI project and then switches to the project folder on your filesystem.
-Stay in this project folder in order to initialize the project using npm.
-
-== Install dependencies
-
-Next, you'll need to initialize the project.
-Initializing the project essentially means downloading and installing the dependencies into the project.
-That's the job of npm.
-
-In your terminal, execute the following command (while inside the project folder):
-
- $ npm install
-
-This command installs the dependencies listed in [.path]_package.json_ into the [.path]_node_modules/_ folder inside the project.
-This folder does not get included in the UI bundle.
-The folder is safe to delete, though npm does a great job of managing it.
-
-You'll notice another file which seems to be relevant here, [.path]_package-lock.json_.
-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`.
-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
-
-You should see:
-
-[.output]
-....
-default
-clean
-lint
-format
-build
-bundle
-bundle:pack
-preview
-preview:build
-....
-
-We'll explain what each of these tasks are for and when to use them.
diff --git a/doc/doc-ui/docs/modules/ROOT/pages/sidebar-styles.adoc b/doc/doc-ui/docs/modules/ROOT/pages/sidebar-styles.adoc
deleted file mode 100644
index 7a16d43..0000000
--- a/doc/doc-ui/docs/modules/ROOT/pages/sidebar-styles.adoc
+++ /dev/null
@@ -1,30 +0,0 @@
-= Sidebar Styles
-:navtitle: Sidebars
-
-This page describes the in-page sidebar block styles, not the styles for the navigation sidebar.
-
-== Sidebar blocks
-
-xref:antora:asciidoc:sidebar.adoc[Sidebars] can contain any type of content.
-The sidebar title is specified by the block class title.
-Here's an AsciiDoc source example that produces a sidebar with a title:
-
-[source,asciidoc]
-----
-.Optional Title
-****
-This is a paragraph in a sidebar.
-****
-----
-
-[source,html]
-----
-
-----
diff --git a/doc/doc-ui/docs/modules/ROOT/pages/style-guide.adoc b/doc/doc-ui/docs/modules/ROOT/pages/style-guide.adoc
deleted file mode 100644
index ac32da0..0000000
--- a/doc/doc-ui/docs/modules/ROOT/pages/style-guide.adoc
+++ /dev/null
@@ -1,23 +0,0 @@
-= UI Element Style Guide
-:navtitle: UI Element Styles
-
-When creating a UI theme for Antora, there are certain elements in the UI that require support from the CSS to work correctly.
-This list includes elements in the shell (i.e., frame) and in the document content.
-This document identifies these UI elements.
-
-//== UI Shell
-
-// TODO :
-
-== Document Content
-
-The HTML in the main content area is generated from AsciiDoc using Asciidoctor.
-AsciiDoc has numerous content elements that require assistance from CSS to render properly.
-
-These elements include:
-
-* xref:inline-text-styles.adoc[Inline text emphasis]
-* xref:admonition-styles.adoc[Admonitions]
-* xref:list-styles.adoc[Lists]
-* xref:sidebar-styles.adoc[Sidebars]
-* xref:ui-macro-styles.adoc[Button, keybinding, and menu UI macros]
diff --git a/doc/doc-ui/docs/modules/ROOT/pages/stylesheets.adoc b/doc/doc-ui/docs/modules/ROOT/pages/stylesheets.adoc
deleted file mode 100644
index aff5316..0000000
--- a/doc/doc-ui/docs/modules/ROOT/pages/stylesheets.adoc
+++ /dev/null
@@ -1,29 +0,0 @@
-= Work with the CSS Stylesheets
-
-The stylesheets are written in CSS.
-These stylesheets utilize CSS variables to keep the CSS DRY and easy to customize.
-
-== Stylesheet organization and processing
-
-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.
-
-== Add a new CSS rule
-
-Let's consider the case when you want to modify the font size of a section title.
-
-First, make sure you have set up the project and created a development branch.
-Next, open the file [.path]_src/css/doc.css_ and modify the rule for the section title.
-
-[source,css]
-----
-.doc h1 {
- font-size: 2.5rem;
- margin-bottom: 1rem;
- margin-top: 2rem
-}
-----
-
-Save the file, commit it to git, push the branch, and allow the approval workflow to play out.
diff --git a/doc/doc-ui/docs/modules/ROOT/pages/templates.adoc b/doc/doc-ui/docs/modules/ROOT/pages/templates.adoc
deleted file mode 100644
index f067689..0000000
--- a/doc/doc-ui/docs/modules/ROOT/pages/templates.adoc
+++ /dev/null
@@ -1,222 +0,0 @@
-= Work with the Handlebars Templates
-
-Antora combines the Handlebars templates with the converted AsciiDoc content and other UI model data to make the pages in the site.
-These "`logic-less`" templates are mostly HTML with some special mustache tags sprinkled in where content should be inserted.
-
-== What do the templates do?
-
-The layout templates, which are stored in [.path]_src/layouts/_, provide the main page structure.
-The partial templates, in [.path]_src/partials/_, fill in different regions of a page, such as the navigation and footer.
-
-The templates read from a model that's populated by Antora.
-The model can be accessed by enclosing path expressions in mustaches, which are `{{` and `}}` or `{{{` and `}}}` (e.g., `+{{{page.title}}}+`).
-The double mustaches escape the value for HTML, whereas triple mustaches insert the value as is.
-
-WARNING: If the mustaches are preceded by a backslash (e.g, `\{{`), the expression will be disabled.
-This often comes up when constructing URLs.
-To avoid this problem, you should use forward slashes in URLs instead of backslashes.
-
-When `{{` is immediately followed by `>`, that invokes a partial (from the partials directory) and inserts the result (e.g., `+{{> head}}+`.
-In other words, that's not a model reference like the other mustache expressions.
-
-=== Template variables
-
-CAUTION: This model is not final.
-Variable names and purposes may change.
-
-Here's an overview of the available UI model:
-
-.Variables available to the Handlebars templates (top-level variables in bold)
-[#template-variables-ref,cols="1m,2"]
-|===
-| Name | Description
-
-s| [[site]]site
-| Information about the 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.
-
-| site.path
-| The pathname (i.e., subpath) of the site.url under which the site is hosted (e.g., /docs).
-This value is empty if site.url is not defined, has no path segment, or matches /.
-Can be dropped from the site.url value using a helper (e.g., `deleteSuffix site.url site.path`)
-Can be prepended to `page.url` to create a root-relative URL for a page (e.g., `+{{{site.path}}}{{{page.url}}}+`).
-(since Antora 2.1)
-
-| site.title
-| The title of the site.
-
-| site.homeUrl
-| The URL that points directly to the start (aka home) page of the site.
-
-| site.components
-| A map of all the components in the site, keyed by component name.
-Properties of each component include name, title, url, latest, and versions.
-Properties of each version include name (since 2.3), version, displayVersion, prerelease (if set), title, url, asciidoc (since 2.3), and navigation.
-The navigation property on each version provides access to the navigation menu for that component version.
-
-| site.ui
-| Information about the site UI.
-
-| site.ui.defaultLayout
-| The default page layout used for this site.
-
-| site.ui.url
-| The absolute base URL of the UI.
-
-s| [[page]]page
-| Information about the current page.
-
-| page.title
-| The page title in HTML format (often used as the primary heading).
-This value may include inline HTML elements and XML character references.
-
-| page.contents
-| The main article content in HTML format.
-Sourced from AsciiDoc and converted to HTML by the Asciidoctor processor.
-
-| page.attributes
-| Any AsciiDoc document attribute prefixed with `page-`.
-The `page-` prefix is dropped from the name used in this model.
-For example, the value of the document attribute named `page-support-phone` can be accessed via the UI model using `page.attributes.support-phone`.
-Page attributes can be defined per page in the AsciiDoc document header (e.g., `:page-support-phone: +1 212-555-1234`) or globally in the playbook under the key `asciidoc.attributes`.
-The `page-` prefix is used to isolate page-related attributes from the numerous other document attributes in AsciiDoc.
-
-| page.author
-| The first author of the document, if one or more authors are specified in the AsciiDoc header.
-
-| page.description
-| The text of the description attribute in the AsciiDoc header, if specified.
-
-| page.keywords
-| A comma-separated list of keywords defined in the AsciiDoc header, if specified.
-
-| page.component
-| Information about the component for the current page.
-Properties include name, title, url, latest, and versions.
-
-| page.componentVersion
-| Information about the component version for the current page.
-Properties include name (since 2.3), version, displayVersion, prerelease (if set), title, url, and asciidoc (since 2.3).
-
-| page.module
-| The name of the module for the current page.
-
-| page.relativeSrcPath
-| The path of the current page relative to the pages directory in the current module (since 2.3).
-
-| page.version
-| The name of the version for the current page.
-
-| page.displayVersion
-| The name of the display version for the current page.
-
-| page.versions
-| All versions of the current page, including the current page.
-Each entry has the properties url, string, and missing.
-
-| page.latest
-| The entry from `page.versions` that corresponds to the latest version available of this page.
-The latest page may not come from the latest version of the component (if the page is missing in that version).
-This property is not set if this page is in a versionless component.
-
-| page.breadcrumbs
-| An array of breadcrumb items that represent the current selection in the navigation tree.
-Includes text-only and external items.
-
-| page.navigation
-| The hierarchical navigation menu for the component version of the current page.
-Each navigation item contains the property `content` as well as the optional properties `url` and (child) `items`.
-
-| 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.
-
-| page.canonicalUrl
-| The canonical URL for the current page.
-The canonicalUrl is only set if site.url is set to an absolute URL and the page's component has at least one non-prerelease version.
-If there are multiple versions of the component, the canonical URL is the qualified URL of the most recent, non-prerelease version of the page.
-If there's only a single version of the component, the canonical URL is the qualified URL of the current page.
-
-| page.editUrl
-| The URL to edit the current page (i.e., activates the web-based editor on the git host).
-This value is derived automatically for the hosts github.com, gitlab.com, pagure.io, and bitbucket.org, even if the repository is private.
-If the host is not recognized, or you want to customize the value, you can use the `edit_url` key on the content source in the playbook.
-
-The default UI shows an "Edit this Page" link that points to this URL unless the repository is private (i.e., `page.origin.private` is truthy) or `page.fileUri` is set.
-You can force this link to be shown by setting the environment variable `FORCE_SHOW_EDIT_PAGE_LINK` (e.g., `FORCE_SHOW_EDIT_PAGE_LINK=true`) or by customizing the logic in the UI template.
-
-| page.fileUri
-| The local file:// URI to edit the current page if the page originates from the local filesystem (i.e., the worktree).
-
-If this property is set, the default UI shows an "Edit this Page" link that points to this URI (instead of the `page.editUrl` value) unless the `CI` environment variable is set (e.g., `CI=true`).
-When the `CI` environment variable is set, the default UI ignores this property (since linking to a local file:// URI in a published site doesn't make any sense).
-
-| page.origin
-| Information about the content source from which the current page was taken.
-Properties include url, reftype (since 3.1), refname, branch, tag, refhash (since 2.3), startPath, worktree, webUrl, fileUriPattern, editUrlPattern, private.
-
-| page.origin.private
-| This value will be `auth-required` if the git server requests authentication credentials, otherwise `auth-embedded` if credentials are embedded in the content source URL in the playbook, otherwise unset.
-In the default UI, if this value is truthy, the "Edit this Page" link is not shown.
-A quick way to force this property to be truthy (even if the repository is public) is to begin the content source URL in the playbook with empty credentials, as in `\https://@`.
-Then, the "Edit the Page" link will not appear.
-
-| page.home
-| Indicates whether the current page is the start (aka home) page of the site.
-
-| page.layout
-| The page layout for the current page.
-
-| page.next
-| The next reachable page in the navigation tree (skips past text-only and external items).
-
-| page.previous
-| The previous reachable page in the navigation tree (skips past text-only and external items).
-
-| page.parent
-| The parent page in the navigation tree (skips past text-only and external items).
-
-s| env
-| The map of environment variables (sourced from `process.env`).
-
-s| siteRootPath
-| The relative path to the root of the published site.
-If a site start page is defined, the visitor will be redirected from this location to the start page.
-Can be used as a fallback when a site URL is not set.
-This value is _root-relative_ in the 404 page template, which is required for the 404 page to work correctly when served by the web server.
-
-s| uiRootPath
-| The relative path to the root directory of the UI.
-This value is _root-relative_ in the 404 page template, which is required for the 404 page to work correctly when served by the web server.
-
-s| antoraVersion
-| The version of Antora used to build the site (specifically the version of the @antora/page-composer package).
-
-s| contentCatalog
-| A proxy object around Antora's virtual content catalog, which provides access to components, component versions, pages, and resource files.
-Exposes the following methods: `findBy`, `getById`, `getComponent`, `getComponentVersion`, `getComponents`, `getComponentsSortedBy`, `getFiles`, `getPages`, `getSiteStartPage`, `resolvePage`, and `resolveResource`.
-*This object should only be used from a UI helper.*
-|===
-
-This model is likely to grow over time.
-
-== Modify a template
-
-Let's consider the case when you want to add a new meta tag inside the HTML head.
-
-First, make sure you have set up the project and created a development branch.
-Next, open the file [.path]_templates/partials/head.hbs_ and add your tag.
-
-[source,html]
-----
-
-----
-
-Each template file has access to the template model, which exposes information about the current page through variable names.
-The variables available are listed in <>.
-
-Save the file, commit it to git, push the branch, and allow the approval workflow to play out.
diff --git a/doc/doc-ui/docs/modules/ROOT/pages/ui-macro-styles.adoc b/doc/doc-ui/docs/modules/ROOT/pages/ui-macro-styles.adoc
deleted file mode 100644
index eaa4e17..0000000
--- a/doc/doc-ui/docs/modules/ROOT/pages/ui-macro-styles.adoc
+++ /dev/null
@@ -1,62 +0,0 @@
-= UI Macro Styles
-:navtitle: UI Macros
-
-Asciidoctor supports xref:antora:asciidoc:ui-macros.adoc[three UI element representations] out of the box, which are made from corresponding inline UI macros.
-
-* button (btn macro)
-* keybinding (kbd macro)
-* menu (menu macro)
-
-The UI elements are output using semantic HTML elements, so they inherit some default styling from the browser.
-However, to look proper, they require some additional styling.
-
-== Button
-
-A xref:antora:asciidoc:ui-macros.adoc#button[button] is meant to represent an on-screen button (`+btn:[Save]+`).
-However, it should not appear like an actual button as that could confuse the reader into thinking it's interactive.
-Therefore, a button is rendered as a bold text by default:
-
-[source,html]
-----
-Save
-----
-
-Traditionally, a button reference is styled by surrounding the text with square brackets, as shown here:
-
-btn:[Save]
-
-== Keybinding
-
-A xref:antora:asciidoc:ui-macros.adoc#keybinding[keybinding] can be a single key (`+kbd:[F11]+`) or a sequence of keys (`+kbd:[Ctrl+F]`).
-Here's the HTML that's generated for these two forms.
-
-[source,html]
-----
-F11
-Ctrl+F
-----
-
-Here's how these might appear:
-
-[%hardbreaks]
-kbd:[F11]
-kbd:[Ctrl+F]
-
-== Menu
-
-A xref:antora:asciidoc:ui-macros.adoc#menu[menu] can be a top-level menu reference (`+menu:File[]+`) or a nested selection (`+menu:File[Save]+`).
-Here's the HTML that's generated for these two forms.
-
-[source,html]
-----
-File
-
-----
-
-This might be rendered as:
-
-menu:File[]
-
-menu:File[Save]
-
-The default styling applied to a menu reference is usually sufficient.
diff --git a/doc/doc-ui/gulp.d/tasks/build-preview-pages.js b/doc/doc-ui/gulp.d/tasks/build-preview-pages.js
index 364f561..7516e0d 100644
--- a/doc/doc-ui/gulp.d/tasks/build-preview-pages.js
+++ b/doc/doc-ui/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/doc/doc-ui/gulp.d/tasks/build.js b/doc/doc-ui/gulp.d/tasks/build.js
index dab295b..7ca7c76 100644
--- a/doc/doc-ui/gulp.d/tasks/build.js
+++ b/doc/doc-ui/gulp.d/tasks/build.js
@@ -38,7 +38,7 @@ module.exports = (src, dest, preview) => () => {
{
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)
@@ -66,7 +66,7 @@ module.exports = (src, dest, preview) => () => {
// 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(uglify({ output: { comments: /^! / } })),
vfs
diff --git a/doc/doc-ui/gulp.d/tasks/index.js b/doc/doc-ui/gulp.d/tasks/index.js
index a5795fc..4178c8f 100644
--- a/doc/doc-ui/gulp.d/tasks/index.js
+++ b/doc/doc-ui/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/doc/doc-ui/gulp.d/tasks/pack.js b/doc/doc-ui/gulp.d/tasks/pack.js
index a792e72..30cb07f 100644
--- a/doc/doc-ui/gulp.d/tasks/pack.js
+++ b/doc/doc-ui/gulp.d/tasks/pack.js
@@ -1,11 +1,17 @@
'use strict'
+const ospath = require('path')
const vfs = require('vinyl-fs')
-const zip = require('gulp-vinyl-zip')
-const path = require('path')
+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 })
- .pipe(zip.dest(path.join(dest, `${bundleName}-bundle.zip`)))
- .on('finish', () => onFinish && onFinish(path.resolve(dest, `${bundleName}-bundle.zip`)))
+ .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/doc/doc-ui/gulpfile.js b/doc/doc-ui/gulpfile.js
index 25ce769..824ca04 100644
--- a/doc/doc-ui/gulpfile.js
+++ b/doc/doc-ui/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/doc/doc-ui/package.json b/doc/doc-ui/package.json
index 7c16817..ed06930 100644
--- a/doc/doc-ui/package.json
+++ b/doc/doc-ui/package.json
@@ -5,7 +5,7 @@
"@asciidoctor/core": "~2.2",
"@fontsource/roboto": "~4.5",
"@fontsource/roboto-mono": "~4.5",
- "@fortawesome/fontawesome-free": "~5.15",
+ "@vscode/gulp-vinyl-zip": "~2.5",
"autoprefixer": "~9.7",
"browser-pack-flat": "~3.4",
"browserify": "~16.5",
@@ -26,7 +26,6 @@
"gulp-postcss": "~8.0",
"gulp-stylelint": "~13.0",
"gulp-uglify": "~3.0",
- "gulp-vinyl-zip": "~2.2",
"handlebars": "~4.7",
"highlight.js": "9.18.3",
"js-yaml": "~3.13",
@@ -41,9 +40,5 @@
"stylelint": "~13.3",
"stylelint-config-standard": "~20.0",
"vinyl-fs": "~3.0"
- },
- "dependencies": {
- "html2canvas": "^1.4.1",
- "jspdf": "^2.5.1"
}
}
diff --git a/doc/doc-ui/preview-src/index.adoc b/doc/doc-ui/preview-src/index.adoc
index 62a869f..7cedc12 100644
--- a/doc/doc-ui/preview-src/index.adoc
+++ b/doc/doc-ui/preview-src/index.adoc
@@ -4,6 +4,7 @@ Author Name
:idseparator: -
:!example-caption:
:!table-caption:
+//:page-role: -toc
:page-pagination:
[.float-group]
@@ -28,6 +29,7 @@ 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.]
@@ -200,6 +202,7 @@ sed::
splendide sed
mea::
+tad::
agam graeci
Let's look at that another way.
@@ -296,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.
@@ -303,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/doc/doc-ui/src/css/comment.css b/doc/doc-ui/src/css/comment.css
deleted file mode 100644
index 5b02e25..0000000
--- a/doc/doc-ui/src/css/comment.css
+++ /dev/null
@@ -1,6 +0,0 @@
-.sidebar .comment {
- border-left: 2px solid var(--toc-border-color);
- padding-right: 0.75rem;
- padding-left: 0.75rem;
- margin-top: 1rem;
-}
diff --git a/doc/doc-ui/src/css/doc.css b/doc/doc-ui/src/css/doc.css
index c286f07..4acb338 100644
--- a/doc/doc-ui/src/css/doc.css
+++ b/doc/doc-ui/src/css/doc.css
@@ -42,7 +42,7 @@
}
}
-.doc > h1.page + aside.embedded {
+.doc > h1.page:first-child + aside.toc.embedded {
margin-top: -0.5rem;
}
@@ -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/doc/doc-ui/src/css/footer.css b/doc/doc-ui/src/css/footer.css
index 6521947..193128e 100644
--- a/doc/doc-ui/src/css/footer.css
+++ b/doc/doc-ui/src/css/footer.css
@@ -4,12 +4,24 @@ footer.footer {
font-size: calc(15 / var(--rem-base) * 1rem);
line-height: var(--footer-line-height);
padding: 1.5rem;
+ display: flex;
+ flex-flow: row wrap;
+ padding-right: 10%;
+ padding-left: 10%;
}
-.footer p {
+.footer-container {
+ display: block;
+ position: relative;
+ flex: 1 1 auto;
+ padding-right: 15px;
+ padding-left: 15px;
+}
+
+.footer-container p {
margin: 0.5rem 0;
}
-.footer a {
+.footer-container a {
color: var(--footer-link-font-color);
}
diff --git a/doc/doc-ui/src/css/header.css b/doc/doc-ui/src/css/header.css
index 278abbe..b15950a 100644
--- a/doc/doc-ui/src/css/header.css
+++ b/doc/doc-ui/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 {
@@ -138,8 +140,8 @@ body {
}
.navbar-item .icon {
- width: 1.25rem;
- height: 1.25rem;
+ width: 1.5rem;
+ height: 1.5rem;
display: block;
}
diff --git a/doc/doc-ui/src/css/main.css b/doc/doc-ui/src/css/main.css
index 6cc5b4f..83a333c 100644
--- a/doc/doc-ui/src/css/main.css
+++ b/doc/doc-ui/src/css/main.css
@@ -1,5 +1,9 @@
+body.-toc aside.toc.sidebar {
+ display: none;
+}
+
@media screen and (max-width: 1023.5px) {
- aside.sidebar {
+ aside.toc.sidebar {
display: none;
}
@@ -18,23 +22,18 @@
display: flex;
}
- .content .spacer {
- flex: 1 0 auto;
- order: 1;
- }
-
- aside.embedded {
+ aside.toc.embedded {
display: none;
}
- aside.sidebar {
- flex: 0 0 var(--sidebar-width);
- order: 2;
+ aside.toc.sidebar {
+ flex: 0 0 var(--toc-width);
+ order: 1;
}
}
@media screen and (min-width: 1216px) {
- aside.sidebar {
- flex-basis: var(--sidebar-width--widescreen);
+ aside.toc.sidebar {
+ flex-basis: var(--toc-width--widescreen);
}
}
diff --git a/doc/doc-ui/src/css/nav.css b/doc/doc-ui/src/css/nav.css
index 6f277b1..807a9fc 100644
--- a/doc/doc-ui/src/css/nav.css
+++ b/doc/doc-ui/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,10 +66,6 @@
height: inherit;
}
-html.is-clipped--nav {
- overflow-y: hidden;
-}
-
.nav-panel-menu {
overflow-y: scroll;
overscroll-behavior: none;
@@ -92,6 +94,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 +222,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 +243,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 +252,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 +269,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/doc/doc-ui/src/css/print.css b/doc/doc-ui/src/css/print.css
index 9a92d06..62fc6b4 100644
--- a/doc/doc-ui/src/css/print.css
+++ b/doc/doc-ui/src/css/print.css
@@ -55,7 +55,7 @@
.navbar > :not(.navbar-brand),
.nav-container,
.toolbar,
- aside.sidebar,
+ aside.toc,
nav.pagination {
display: none;
}
diff --git a/doc/doc-ui/src/css/site.css b/doc/doc-ui/src/css/site.css
index 4e26012..36e1767 100644
--- a/doc/doc-ui/src/css/site.css
+++ b/doc/doc-ui/src/css/site.css
@@ -9,7 +9,6 @@
@import "breadcrumbs.css";
@import "page-versions.css";
@import "toc.css";
-@import "comment.css";
@import "doc.css";
@import "pagination.css";
@import "header.css";
diff --git a/doc/doc-ui/src/css/toc.css b/doc/doc-ui/src/css/toc.css
index 7a3edee..dc33497 100644
--- a/doc/doc-ui/src/css/toc.css
+++ b/doc/doc-ui/src/css/toc.css
@@ -2,7 +2,7 @@
color: var(--toc-font-color);
}
-.sidebar .toc .toc-menu {
+.toc.sidebar .toc-menu {
margin-right: 0.75rem;
position: sticky;
top: var(--toc-top);
@@ -17,7 +17,7 @@
padding-bottom: 0.25rem;
}
-.sidebar .toc .toc-menu h3 {
+.toc.sidebar .toc-menu h3 {
display: flex;
flex-direction: column;
height: 2.5rem;
@@ -32,14 +32,14 @@
padding: 0;
}
-.sidebar .toc .toc-menu ul {
+.toc.sidebar .toc-menu ul {
max-height: var(--toc-height);
overflow-y: auto;
overscroll-behavior: none;
}
@supports (scrollbar-width: none) {
- .sidebar .toc .toc-menu ul {
+ .toc.sidebar .toc-menu ul {
scrollbar-width: none;
}
}
@@ -93,10 +93,6 @@
color: var(--doc-font-color);
}
-.sidebar .toc .toc-menu a:focus {
+.sidebar.toc .toc-menu a:focus {
background: var(--panel-background);
}
-
-.toc .toc-menu .is-hidden-toc {
- display: none !important;
-}
diff --git a/doc/doc-ui/src/css/typeface-fontawesome.css b/doc/doc-ui/src/css/typeface-fontawesome.css
deleted file mode 100644
index 54656c0..0000000
--- a/doc/doc-ui/src/css/typeface-fontawesome.css
+++ /dev/null
@@ -1,48 +0,0 @@
-@font-face {
- font-family: "Font Awesome 5 Free";
- font-style: normal;
- font-weight: 400;
- src:
- url(~@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2)
- format("woff2"),
- url(~@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff)
- format("woff");
-}
-
-@font-face {
- font-family: "Font Awesome 5 Free";
- font-style: normal;
- font-weight: 900;
- src:
- url(~@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2)
- format("woff2"),
- url(~@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff)
- format("woff");
-}
-
-@font-face {
- font-family: "Font Awesome 5 Brands";
- font-style: normal;
- font-weight: 400;
- src:
- url(~@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2)
- format("woff2"),
- url(~@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff)
- format("woff");
-}
-
-.fa,
-.fas {
- font-family: "Font Awesome 5 Free"; /* stylelint-disable-line */
- font-weight: 900;
-}
-
-.far {
- font-family: "Font Awesome 5 Free"; /* stylelint-disable-line */
- font-weight: 400;
-}
-
-.fab {
- font-family: "Font Awesome 5 Brands"; /* stylelint-disable-line */
- font-weight: 400;
-}
diff --git a/doc/doc-ui/src/css/typeface-roboto-mono.css b/doc/doc-ui/src/css/typeface-roboto-mono.css
index 841df08..b25128c 100644
--- a/doc/doc-ui/src/css/typeface-roboto-mono.css
+++ b/doc/doc-ui/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/doc/doc-ui/src/css/typeface-roboto.css b/doc/doc-ui/src/css/typeface-roboto.css
index 1648a2b..931cc2c 100644
--- a/doc/doc-ui/src/css/typeface-roboto.css
+++ b/doc/doc-ui/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/doc/doc-ui/src/css/vars.css b/doc/doc-ui/src/css/vars.css
index f4b05ce..f1a06fc 100644
--- a/doc/doc-ui/src/css/vars.css
+++ b/doc/doc-ui/src/css/vars.css
@@ -1,5 +1,7 @@
:root {
/* colors */
+ --syson-violet: #261e58;
+ --syson-violet-dark: #120e2c;
--color-white: #fff;
--color-smoke-10: #fefefe;
--color-smoke-30: #fafafa;
@@ -25,9 +27,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);
@@ -36,9 +38,9 @@
--scrollbar-thumb-color: var(--color-gray-10);
--scrollbar_hover-thumb-color: var(--color-gray-30);
/* navbar */
- --navbar-background: var(--color-jet-80);
+ --navbar-background: var(--syson-violet);
--navbar-font-color: var(--color-white);
- --navbar_hover-background: var(--color-black);
+ --navbar_hover-background: var(--syson-violet-dark);
--navbar-button-background: var(--color-white);
--navbar-button-border-color: var(--panel-border-color);
--navbar-button-font-color: var(--body-font-color);
@@ -118,9 +120,9 @@
--toc-line-height: 1.2;
/* footer */
--footer-line-height: var(--doc-line-height);
- --footer-background: var(--color-smoke-90);
- --footer-font-color: var(--color-gray-70);
- --footer-link-font-color: var(--color-jet-80);
+ --footer-background: var(--syson-violet);
+ --footer-font-color: var(--color-white);
+ --footer-link-font-color: var(--color-white);
/* dimensions and positioning */
--navbar-height: calc(63 / var(--rem-base) * 1rem);
--toolbar-height: calc(45 / var(--rem-base) * 1rem);
@@ -134,10 +136,10 @@
--nav-width: calc(270 / var(--rem-base) * 1rem);
--toc-top: calc(var(--body-top) + var(--toolbar-height));
--toc-height: calc(100vh - var(--toc-top) - 2.5rem);
- --sidebar-width: calc(200 / var(--rem-base) * 1rem);
- --sidebar-width--widescreen: calc(300 / var(--rem-base) * 1rem);
+ --toc-width: calc(162 / var(--rem-base) * 1rem);
+ --toc-width--widescreen: calc(216 / var(--rem-base) * 1rem);
--doc-max-width: calc(720 / var(--rem-base) * 1rem);
- --doc-max-width--desktop: calc(1440 / var(--rem-base) * 1rem);
+ --doc-max-width--desktop: calc(828 / var(--rem-base) * 1rem);
/* stacking */
--z-index-nav: 1;
--z-index-toolbar: 2;
diff --git a/doc/doc-ui/src/css/vendor/fontawesome.css b/doc/doc-ui/src/css/vendor/fontawesome.css
deleted file mode 100644
index a2c0be9..0000000
--- a/doc/doc-ui/src/css/vendor/fontawesome.css
+++ /dev/null
@@ -1,2 +0,0 @@
-@import "../typeface-fontawesome.css";
-@import "@fortawesome/fontawesome-free/css/all.min.css";
diff --git a/doc/doc-ui/src/helpers/get_pdf_link.js b/doc/doc-ui/src/helpers/get_pdf_link.js
deleted file mode 100644
index e9b116a..0000000
--- a/doc/doc-ui/src/helpers/get_pdf_link.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict'
-
-module.exports = ({ data }) => {
- return '/' + data.root.page.component.name +
- '/' + data.root.page.version +
- '/' + data.root.page.component.title.toLowerCase().replaceAll(' ', '-') +
- '.pdf'
-}
diff --git a/doc/doc-ui/src/helpers/relativize.js b/doc/doc-ui/src/helpers/relativize.js
index 6fdfb45..7989319 100644
--- a/doc/doc-ui/src/helpers/relativize.js
+++ b/doc/doc-ui/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/doc/doc-ui/src/img/caution.svg b/doc/doc-ui/src/img/caution.svg
deleted file mode 100644
index 98c9421..0000000
--- a/doc/doc-ui/src/img/caution.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/doc/doc-ui/src/img/favicon.svg b/doc/doc-ui/src/img/favicon.svg
new file mode 100644
index 0000000..3f31bad
--- /dev/null
+++ b/doc/doc-ui/src/img/favicon.svg
@@ -0,0 +1,57 @@
+
+
+
+
diff --git a/doc/doc-ui/src/img/important.svg b/doc/doc-ui/src/img/important.svg
deleted file mode 100644
index 3ddcc81..0000000
--- a/doc/doc-ui/src/img/important.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/doc/doc-ui/src/img/note.svg b/doc/doc-ui/src/img/note.svg
deleted file mode 100644
index 7d77853..0000000
--- a/doc/doc-ui/src/img/note.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/doc/doc-ui/src/img/octicons-16.svg b/doc/doc-ui/src/img/octicons-16.svg
index d8415d0..0e8ab39 100644
--- a/doc/doc-ui/src/img/octicons-16.svg
+++ b/doc/doc-ui/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/doc/doc-ui/src/img/tip.svg b/doc/doc-ui/src/img/tip.svg
deleted file mode 100644
index 1405622..0000000
--- a/doc/doc-ui/src/img/tip.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/doc/doc-ui/src/img/warning.svg b/doc/doc-ui/src/img/warning.svg
deleted file mode 100644
index 3ddcc81..0000000
--- a/doc/doc-ui/src/img/warning.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-
diff --git a/doc/doc-ui/src/js/01-nav.js b/doc/doc-ui/src/js/01-nav.js
index 80937ee..02ebe5d 100644
--- a/doc/doc-ui/src/js/01-nav.js
+++ b/doc/doc-ui/src/js/01-nav.js
@@ -4,8 +4,10 @@
var SECT_CLASS_RX = /^sect(\d)$/
var navContainer = document.querySelector('.nav-container')
+ if (!navContainer) return
var navToggle = document.querySelector('.nav-toggle')
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/doc/doc-ui/src/js/02-on-this-page.js b/doc/doc-ui/src/js/02-on-this-page.js
index 9d0d1f5..f3b2732 100644
--- a/doc/doc-ui/src/js/02-on-this-page.js
+++ b/doc/doc-ui/src/js/02-on-this-page.js
@@ -1,28 +1,28 @@
;(function () {
'use strict'
- var sidebar = document.querySelector('aside.sidebar')
- var toc = sidebar.querySelector('.toc')
+ var sidebar = document.querySelector('aside.toc.sidebar')
if (!sidebar) return
- if (document.querySelector('body.-toc')) return sidebar.removeChild(toc)
- var levels = parseInt(toc.dataset.levels || 2, 10)
+ if (document.querySelector('body.-toc')) return sidebar.parentNode.removeChild(sidebar)
+ var levels = parseInt(sidebar.dataset.levels || 2, 10)
if (levels < 0) return
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')
}
headingsSelector.push(headingSelector.join('>'))
}
var headings = find(headingsSelector.join(','), article.parentNode)
- if (!headings.length) return sidebar.removeChild(toc)
+ if (!headings.length) return sidebar.parentNode.removeChild(sidebar)
var lastActiveFragment
var links = {}
@@ -37,20 +37,20 @@
return accum
}, document.createElement('ul'))
- var tocMenu = toc.querySelector('.toc-menu')
- if (!tocMenu) (tocMenu = document.createElement('div')).className = 'toc-menu'
+ var menu = sidebar.querySelector('.toc-menu')
+ if (!menu) (menu = document.createElement('div')).className = 'toc-menu'
var title = document.createElement('h3')
- title.textContent = toc.dataset.title || 'Contents'
- tocMenu.appendChild(title)
- tocMenu.appendChild(list)
+ title.textContent = sidebar.dataset.title || 'Contents'
+ menu.appendChild(title)
+ menu.appendChild(list)
var startOfContent = !document.getElementById('toc') && article.querySelector('h1.page ~ :not(.is-before-toc)')
if (startOfContent) {
- var embeddedTocAside = document.createElement('aside')
- embeddedTocAside.className = 'toc embedded'
- embeddedTocAside.appendChild(tocMenu.cloneNode(true))
- startOfContent.parentNode.insertBefore(embeddedTocAside, startOfContent)
+ var embeddedToc = document.createElement('aside')
+ embeddedToc.className = 'toc embedded'
+ embeddedToc.appendChild(menu.cloneNode(true))
+ startOfContent.parentNode.insertBefore(embeddedToc, startOfContent)
}
window.addEventListener('load', function () {
diff --git a/doc/doc-ui/src/js/03-fragment-jumper.js b/doc/doc-ui/src/js/03-fragment-jumper.js
index d112e47..bff0896 100644
--- a/doc/doc-ui/src/js/03-fragment-jumper.js
+++ b/doc/doc-ui/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/doc/doc-ui/src/js/05-mobile-navbar.js b/doc/doc-ui/src/js/05-mobile-navbar.js
index 892d0e7..d85abb2 100644
--- a/doc/doc-ui/src/js/05-mobile-navbar.js
+++ b/doc/doc-ui/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/doc/doc-ui/src/js/06-copy-to-clipboard.js b/doc/doc-ui/src/js/06-copy-to-clipboard.js
index df86df8..8c9d698 100644
--- a/doc/doc-ui/src/js/06-copy-to-clipboard.js
+++ b/doc/doc-ui/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/doc/doc-ui/src/js/07-download-pdf.js b/doc/doc-ui/src/js/07-download-pdf.js
deleted file mode 100644
index 1d8fa7a..0000000
--- a/doc/doc-ui/src/js/07-download-pdf.js
+++ /dev/null
@@ -1,20 +0,0 @@
-;(function () {
- 'use strict'
-
- var downloadButton = document.querySelector('#download')
-
- downloadButton.addEventListener('click', function () {
- var articleContent = document.querySelector('article')
- var title = document.querySelector('h1.page')
-
- var opt = {
- margin: 1,
- filename: title.textContent + '.pdf',
- image: { type: 'jpeg', quality: 0.98 },
- html2canvas: { scale: 2 },
- pagebreak: { mode: ['avoid-all', 'css', 'legacy'] },
- }
-
- window.html2pdf().set(opt).from(articleContent).save()
- })
-})()
diff --git a/doc/doc-ui/src/js/vendor/highlight.bundle.js b/doc/doc-ui/src/js/vendor/highlight.bundle.js
index 4d90370..fe8ae5d 100644
--- a/doc/doc-ui/src/js/vendor/highlight.bundle.js
+++ b/doc/doc-ui/src/js/vendor/highlight.bundle.js
@@ -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'))
diff --git a/doc/doc-ui/src/layouts/default.hbs b/doc/doc-ui/src/layouts/default.hbs
index 02c84f4..c5282ec 100644
--- a/doc/doc-ui/src/layouts/default.hbs
+++ b/doc/doc-ui/src/layouts/default.hbs
@@ -8,5 +8,4 @@
{{> body}}
{{> footer}}
-