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!

-
-
-
----- - -Here's how it might appear when the title is displayed as text: - -WARNING: Watch out! diff --git a/doc/doc-ui/docs/modules/ROOT/pages/build-preview-ui.adoc b/doc/doc-ui/docs/modules/ROOT/pages/build-preview-ui.adoc deleted file mode 100644 index f55cdd7..0000000 --- a/doc/doc-ui/docs/modules/ROOT/pages/build-preview-ui.adoc +++ /dev/null @@ -1,67 +0,0 @@ -= Build a UI Project for Local Preview -:navtitle: Build and Preview the UI - -== Build Preview Site - -Once you've modified the site UI, the first thing you'll want to do is check out how it looks. -That's what the files in the [.path]_preview-src/_ folder are for. -This folder contains HTML file fragments that provide a representative sample of content from the site. -The preview saves you from having to generate the whole site just to test the UI. -These files should give you an idea of how the UI will look when applied to the actual site. - -The pages in the preview site are assembled using the Handlebars templates and link to the pre-compiled asset files (emulating the behavior of the site generator). -Thus, to look at them, you need to run them through the UI build. - -There are two preview modes available. -You can run the build once and examine the result or you can run the build continuously so you can see changes as you make them. -The next two sections explain how to use these modes. - -=== Build Once - -To build the UI once for preview, then stop, execute the following command: - - $ 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_). - -=== Build Continuously - -To avoid the need to run the `preview:build` task over and over while developing, you can use the `preview` command instead to have it run continuously. -This task also launches a local HTTP server so updates get synchronized with the browser (i.e., "`live reload`"). - -To launch the preview server, execute the following command: - - $ gulp preview - -You'll see a URL listed in the output of this command: - -.... -[12:59:28] Starting 'preview:serve'... -[12:59:28] Starting server... -[12:59:28] Server started http://localhost:5252 -[12:59:28] Running server -.... - -Navigate to the URL to view the preview site. -While this command is running, any changes you make to the source files will be instantly reflected in the browser. -This works by monitoring the project for changes, running the `preview:build` task if a change is detected, and sending the updates to the browser. - -Press kbd:[Ctrl+C] to stop the preview server and end the continuous build. - -== Package for Previewing - -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 - -The `bundle` command also invokes the `lint` command to check that the CSS and JavaScript follow the coding standards. - -The UI bundle will be available at [.path]_build/ui-bundle.zip_. -You can then point Antora at this bundle using the `--ui-bundle-url` command-line option. - -If you have the preview running, and you want to bundle without causing the preview to be clobbered, use: - - $ gulp bundle:pack - -The UI bundle will again be available at [.path]_build/ui-bundle.zip_. diff --git a/doc/doc-ui/docs/modules/ROOT/pages/copy-to-clipboard.adoc b/doc/doc-ui/docs/modules/ROOT/pages/copy-to-clipboard.adoc deleted file mode 100644 index 0eaf058..0000000 --- a/doc/doc-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/doc/doc-ui/docs/modules/ROOT/pages/create-helper.adoc b/doc/doc-ui/docs/modules/ROOT/pages/create-helper.adoc deleted file mode 100644 index dfdb142..0000000 --- a/doc/doc-ui/docs/modules/ROOT/pages/create-helper.adoc +++ /dev/null @@ -1,177 +0,0 @@ -= Create a UI Helper - -This page explains how to create a UI helper for use in a page template (layout or partial). -A helper is a JavaScript function that's invoked by Handlebars when it comes across a helper call in a template. - -== Helper anatomy - -A helper must be defined as a JavaScript file in the [.path]_helpers_ directory of the UI bundle. -The basename of the file without the file extension will be used as the function name. -For example, if the helper is located at [.path]_helpers/join.js_, the name of the function will be `join`. - -You don't have to register the helper as Antora does that for you automatically. -This automatic behavior replaces this Handlebars API call (which you *don't* have to do): - -[,js] ----- -Handlebars.registerHelper('join', function () { ... }) ----- - -The helper file should export exactly one default function. -The name of the function in the file does not matter. - -Here's a template of a helper function you can use as a starting point: - -.new-helper.js -[,js] ----- -'use strict' - -module.exports = () => { - return true -} ----- - -The return value of the function will be used in the logic in the template. -If the helper is used in a conditional, it should return a boolean value (as in the previous example). -If the helper is used to create output, it should return a string. -If the helper is used in an iteration loop, it should return a collection. - -We can now use our conditional helper in a template as follows: - -[,hbs] ----- -{{#if (new-helper)}} -always true! -{{/if}} ----- - -The round brackets are always required around a helper function call (except in cases when they're implied by Handlebars). - -The helper can access top-level variables in the template by accepting the template context as the final parameter. -The top-level variables are stored in in the `data.root` property of this object. - -.new-helper.js -[,js] ----- -'use strict' - -module.exports = ({ data: { root } }) => { - return root.site.url === 'https://docs.example.org' -} ----- - -Now our condition will change: - -[,hbs] ----- -{{#if (new-helper)}} -Only true if the site URL is https://docs.example.org. -{{/if}} ----- - -A helper can also accept input parameters. -These parameters get inserted in the parameter list before the context object. -Handlebars only calls the function with the input parameters passed by the template, so it's important to use a fixed number of them. -Otherwise, the position of the context object will jump around. - -.new-helper.js -[,js] ----- -'use strict' - -module.exports = (urlToCheck, { data: { root } }) => { - return root.site.url === urlToCheck -} ----- - -Now we can accept the URL to check as an input parameter: - -[,hbs] ----- -{{#if (new-helper 'https://docs.example.org')}} -Only true if the site URL matches the one specified. -{{/if}} ----- - -You can consult the https://handlebarsjs.com/guide/[Handlebars language guide] for more information about creating helpers. - -== Use the content catalog in a helper - -You can work directly with Antora's content catalog in a helper to work with other pages and resources. -Let's define a helper that assembles a collection of pages that have a given tag defined in the `page-tags` attribute. -The helper call will look something like this: - -[,hbs] ----- -{{#each (pages-with-tag 'tutorial')}} ----- - -We'll start by defining the helper in a file named [.path]_pages-with-tag.js_. -In this first iteration, we'll have it return a collection of raw virtual file objects from Antora's content catalog. -Populate the file with the following contents: - -.pages-with-tag.js -[,js] ----- -'use strict' - -module.exports = (tag, { data }) => { - const { contentCatalog } = data.root - return contentCatalog.getPages(({ asciidoc, out }) => { - if (!out || !asciidoc) return - const pageTags = asciidoc.attributes['page-tags'] - return pageTags && pageTags.split(', ').includes(tag) - }) -} ----- - -Here we're obtaining a reference to the content catalog, then filtering the pages by our criteria using the `getPage()` method. -It's always good to check for the presence of the `out` property to ensure the page is publishable. - -Here's how this helper is used in the template: - -[,hbs] ----- -{{#each (pages-with-tag 'tutorial')}} -{{{./asciidoc.doctitle}}} -{{/each}} ----- - -You'll notice that the page objects in the collection differ from the typical page UI model. -We can convert each page to a page UI model before returning the collection. -Let's write the extension again, this time running each page through Antora's `buildPageUiModel` function: - -.pages-with-tag.js -[,js] ----- -'use strict' - -module.exports = (tag, { data }) => { - const { contentCatalog, site } = data.root - const pages = contentCatalog.getPages(({ asciidoc, out }) => { - if (!out || !asciidoc) return - const pageTags = asciidoc.attributes['page-tags'] - return pageTags && pageTags.split(', ').includes(tag) - }) - const { buildPageUiModel } = require.main.require('@antora/page-composer/build-ui-model') - return pages.map((page) => buildPageUiModel(site, page, contentCatalog)) -} ----- - -In this case, the usage of the item object is simpler and more familiar: - -[,hbs] ----- -{{#each (pages-with-tag 'tutorial')}} -{{{./doctitle}}} -{{/each}} ----- - -Using this helper as a foundation, you can implement a variety of customizations and custom collections. - -CAUTION: Keep in mind that any helper you will use will be called for each page that uses the template. -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. diff --git a/doc/doc-ui/docs/modules/ROOT/pages/development-workflow.adoc b/doc/doc-ui/docs/modules/ROOT/pages/development-workflow.adoc deleted file mode 100644 index 7296c4f..0000000 --- a/doc/doc-ui/docs/modules/ROOT/pages/development-workflow.adoc +++ /dev/null @@ -1,31 +0,0 @@ -= UI Development Workflow - -// This section provides information about some of the UI files you'll be modifying and how to prepare and submit those changes. - -All changes pushed to a UI project's default branch can trigger a new release (not described here). -Therefore, you want to make your changes to a development branch and submit it as a pull request (PR) to be approved. -(Even better would be to issue the PR from a fork). -Only when the PR is approved and merged will the new release be triggered. - -== git steps - -Use the following command to create a local development branch named `name-me`: - - $ git checkout -b name-me -t origin/HEAD - -You'll then apply your changes to the UI files. -Once you're done making changes, commit those changes to the local branch: - - $ git commit -a -m "describe your change" - -Then, push your branch to the remote repository: - - $ git push origin name-me - -Finally, navigate to your UI project in your browser and create a new pull request from this branch. - -The maintainer of the UI should review the changes. -If the changes are acceptable, the maintainer will merge the pull request. -As soon as the pull request is merged into the default branch, an automated process will take over to publish a new release for the site generator to use. - -Now that you've got the process down, let's review some of the files you'll be working with in more detail. diff --git a/doc/doc-ui/docs/modules/ROOT/pages/index.adoc b/doc/doc-ui/docs/modules/ROOT/pages/index.adoc deleted file mode 100644 index 1d97ef3..0000000 --- a/doc/doc-ui/docs/modules/ROOT/pages/index.adoc +++ /dev/null @@ -1,224 +0,0 @@ -= Antora Default UI -// Settings: -:hide-uri-scheme: -// URLs: -:url-antora: https://antora.org -:url-repo: https://gitlab.com/antora/antora-ui-default -:url-preview: https://antora.gitlab.io/antora-ui-default -:url-hbs: https://handlebarsjs.com -:url-gulp: https://gulpjs.com -:url-npm: https://npmjs.com -:url-node: https://nodejs.org -:url-nvm: https://github.com/creationix/nvm -:url-nvm-install: {url-nvm}#installation -:url-git: https://git-scm.com -:url-git-dl: {url-git}/downloads - -This project produces the {url-preview}[default UI bundle] for documentation sites generated with {url-antora}[Antora]. -It contains the UI assets (page templates, CSS, JavaScript, images, etc.) and a Gulp build script. -The build can be used to preview the UI locally (featuring live updates), or to package it for consumption by the Antora site generator. - -This documentation explains how to use this project to set up, customize and manage a UI for a documentation site generated with Antora. -After reading it, you'll be able to: - -* [x] Understand how an Antora UI project is structured. -* [x] Set up your environment to work on the UI project. -* [x] Launch a preview server to visually inspect the UI. -* [x] Adopt a development workflow to share and accept changes to the UI. -* [x] Package a UI for your documentation site that Antora can use. - -== File type and technology overview - -The Antora UI consists of the following file types that are used to structure and style the documentation site pages generated by Antora. - -* Handlebars "`page`" templates (layouts, partials, and helpers) -* CSS (enhanced using PostCSS) -* JavaScript (UI scripts) -* Images / Graphics (specific to the UI) -* Fonts -* Sample content for previewing the UI (HTML and UI model) - -To understand how the UI works, let's begin by surveying the primary technologies used by the UI. - -Handlebars (file extension: `.hbs`):: -{url-hbs}[Handlebars] is a "`logic-less`" templating engine used to create HTML from template files. -Templates contain placeholders (i.e., mustache expressions like `+{{{page.title}}}+`) into which content is injected from a model. -They also accommodate simple logic expressions for repeating content or including it conditionally (e.g., `+{{#each navigation}}+`) as well as partials (e.g., `+{{> header}}+`). - -Gulp (script file: [.path]_gulpfile.js/index.js_):: -{url-gulp}[Gulp] is a build tool for JavaScript projects. -It configures a collection of tasks that can be used to perform automated tasks such as compiling files, running a preview server, or publishing a release. - -npm (command: `npm`):: -npm manages software packages (i.e., software dependencies) that it downloads from {url-npm}. -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. - -package.json::: -This file keeps track of the dependencies (described using fuzzy versions) that npm (or Yarn) should fetch. - -package-lock.json::: -This file contains a report of which dependencies npm resolved. -This information ensures that dependency resolution is reproducible. - -node_modules/::: -A local cache of resolved dependencies that npm (or Yarn) fetches. - -PostCSS:: -This project does not use a CSS preprocessor such as Sass or LESS. -Instead, it relies on normal CSS which is enhanced by a series of postprocessors. -The most common postprocessor backports newer CSS features to older browsers by adding properties with vendor prefixes. - -== UI project versus UI bundle - -The [.term]*UI project*, which is comprised of the source files in the git repository, provides the recipe and raw materials for creating an Antora UI bundle. -It includes a build, source files, project files, and dependency information. -This is your development workspace. - -The [.term]*UI bundle*, a distributable archive, provides pre-compiled (interpreted, consolidated, and/or minimized) files that are ready to be used by Antora. - -=== UI project repository structure (default branch) - -You should think of the UI project's default branch as your UI workspace. -It contains the recipe and raw materials for creating a UI, including a build, source files, project files, and dependency information. - -Here's how the files are structured in the UI project: - -[.output] -.... -README.adoc -gulpfile.js/ - index.js - lib/ - tasks/ -package.json -package-lock.json -src/ - css/ - base.css - breadcrumbs.css - ... - helpers/ - and.js - eq.js - ... - img/ - back.svg - caret.svg - ... - layouts/ - 404.hbs - default.hbs - partials/ - article.hbs - breadcrumbs.hbs - ... - js/ - 01-navigation.js - 02-fragment-jumper.js - ... - vendor/ - highlight.js -preview-src/ - index.html - ui-model.yml -.... - -A Gulp build is used to compile and assemble the UI project files into a UI bundle. - -=== UI bundle structure (releases) - -The UI bundle--a distributable archive--provides files which are ready to be used by Antora. - -When the UI project files are built by Gulp, they are assembled under the [.path]_public_ directory. -Since the [.path]_public_ directory is generated, it's safe to remove. - -The contents of the UI bundle resembles the UI project's default branch contents, except the bundle doesn't contain any files other than the ones that make up the UI. -This is the content that is used by Antora. - -[.output] -.... -css/ - site.css -font/ - ... -helpers/ - and.js - eq.js - ... -img/ - back.svg - caret.svg - ... -layouts/ - 404.hbs - default.hbs -partials/ - article.hbs - breadcrumbs.hbs - ... -js/ - site.js - vendor/ - highlight.js -.... - -Some of these files have been compiled or aggregated, such as the stylesheets and JavaScript. -The benefit of building the UI files is that the files can be optimized for static inclusion in the site without that optimization getting in the way of UI development. -For example, the UI build can optimize SVGs or add vendor prefixes to the CSS. -Since these optimizations are only applied to the pre-compiled files, they don't interfere with the web developer's workflow. - -== UI compilation and generator consumption overview - -The purpose of an Antora UI project is to assemble the UI files into a reusable distribution that Antora can use to compose the HTML pages and the assets they require. - -The only required file in the UI bundle is the default Handlebars layout for pages (i.e., [.path]_layouts/default.hbs_). -If the 404 page is enabled, the Handlebars layout for the 404 page is also required (i.e., [.path]_layouts/404.hbs_). - -The layout files must be located in the [.path]_layouts_ folder in the UI bundle. -The name of the layout is the stem of the file, which is the file's basename with a file extension (e.g., [.path]_layouts/default.hbs_ becomes `default`). - -[.output] -.... -layouts/ - 404.hbs - default.hbs -.... - -There are no other required files in a UI bundle. -Any additional files are only required because they are referenced by a layout, either when generating the HTML (partial or helper) or assets referenced by the HTML (CSS or JavaScript) that are served to the browser. -Antora does not copy layouts, partials, or helpers to the generated site. - -If the layout looks for a partial, that partial must be located in the [.path]_partials_ directory. -The name of the partial is the stem of the file (e.g,. [.path]_partials/body.hbs_] becomes `body` and used as `> body`). -If the partial is inside a folder, the name of that folder is not used in the partial's name. -Additionally, any JavaScript files found in the [.path]_helpers_ directory are automatically registered as template helpers. -The name of the helper function matches the stem of the file (e.g., [.path]_helpers/concat.js_ becomes `concat`). - -Here's how a UI would be structured if it had layouts, partials, and helpers: - -[.output] -.... -helpers/ - concat.js -layouts/ - 404.hbs - default.hbs -partials/ - body.hbs -.... - -The UI is served statically in a production site, but the UI's assets live in a source form in a UI project to accommodate development and simplify maintenance. -When handed off to the Antora pipeline, the UI is in an interim, pre-compiled state. -Specifically, the default branch of the git repository contains the files in source form while releases are used to distribute the files in pre-compiled form. - -The responsibility of compiling the UI is shared between a UI project and Antora. -The UI project uses a local build to pre-compile (i.e., interpret, consolidate, and/or minimize) the files. -The pre-compiled files are agnostic to Antora's content model, relieving the generator from having to deal with this part. -It also allows the UI to be reused. - -The UI project build then packages the UI into a bundle, which the UI Loader in Antora consumes. -Antora grabs the bundle, extracts it into a UI catalog, and takes compilation to completion by weaving the Antora's content model into the Handlebars templates to make the pages and auxiliary data files. -Antora then copies the remaining UI assets to the site output. - -Now that you have an overview of the files that make up the UI and how it gets assembled, let's go over how to set up the project, build the UI, and preview it. diff --git a/doc/doc-ui/docs/modules/ROOT/pages/inline-text-styles.adoc b/doc/doc-ui/docs/modules/ROOT/pages/inline-text-styles.adoc deleted file mode 100644 index 61bddc8..0000000 --- a/doc/doc-ui/docs/modules/ROOT/pages/inline-text-styles.adoc +++ /dev/null @@ -1,86 +0,0 @@ -= Inline Text Styles -:navtitle: Inline Text -:example-caption!: - -//// -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. -//// - -This page describes how to style text in the contents of the page which is visually emphasized. - -[#bold] -== Bold text () - -How xref:antora:asciidoc:bold.adoc[text marked as bold] appears on your site depends on the fonts loaded by the UI and the CSS styles the UI applies to the `` HTML tag. - -[source,html] ----- -A bold word, or a bold phrase of text. ----- - -Since `` is a semantic HTML element, it automatically inherits default styling (`font-weight: bold`) from the browser. -If you want to override the browser styles, you'll need to define properties on the `strong` selector in the stylesheet for your UI. - -In the default UI, the `` element is styled in the 500 font weight of the current typeface (Roboto). -For example: - -[example] -A bold *word*, or a bold *phrase of text*. - -[#italic] -== Italic text () - -How xref:antora:asciidoc:italic.adoc[italicized text] appears on your site depends on the fonts loaded by the UI and the CSS styles the UI applies to the `` HTML tag. - -[source,html] ----- -An italic word, or an italic phrase of text. ----- - -Since `` is a semantic HTML element, it automatically inherits default styling (`font-style: italic`) from the browser. -If you want to override the browser styles, you'll need to define properties on the `em` selector in the stylesheet for your UI. - -In the default UI, the `em` element is styled in the italic font variant of the current typeface (Roboto). -For example: - -[example] -An italic _word_, or an italic _phrase of text_. - -[#monospace] -== Monospace text () - -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] ----- -
-
    -
  1. a

  2. -
  3. b

  4. -
  5. c

  6. -
-
----- - -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] ----- -
      -
      -
      Optional Title
      -
      -

      This is a paragraph in a sidebar.

      -
      -
      -
      ----- 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 -File  Save ----- - -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}} - diff --git a/doc/doc-ui/src/partials/edit-this-page.hbs b/doc/doc-ui/src/partials/edit-this-page.hbs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/doc/doc-ui/src/partials/edit-this-page.hbs @@ -0,0 +1 @@ + diff --git a/doc/doc-ui/src/partials/footer-content.hbs b/doc/doc-ui/src/partials/footer-content.hbs index cdeeb47..194a0fc 100644 --- a/doc/doc-ui/src/partials/footer-content.hbs +++ b/doc/doc-ui/src/partials/footer-content.hbs @@ -1,4 +1,27 @@
      -

      This page was built using the Antora default UI.

      -

      The source code for this UI is licensed under the terms of the MPL-2.0 license.

      -
      + + + + + + \ No newline at end of file diff --git a/doc/doc-ui/src/partials/head-scripts.hbs b/doc/doc-ui/src/partials/head-scripts.hbs index f4725d2..8dbc7d0 100644 --- a/doc/doc-ui/src/partials/head-scripts.hbs +++ b/doc/doc-ui/src/partials/head-scripts.hbs @@ -1,2 +1,7 @@ - - + {{#with site.keys.googleAnalytics}} + + + {{/with}} + {{!-- + + --}} diff --git a/doc/doc-ui/src/partials/head-styles.hbs b/doc/doc-ui/src/partials/head-styles.hbs index dae4bb1..d6839e5 100644 --- a/doc/doc-ui/src/partials/head-styles.hbs +++ b/doc/doc-ui/src/partials/head-styles.hbs @@ -1,2 +1 @@ - diff --git a/doc/doc-ui/src/partials/header-content.hbs b/doc/doc-ui/src/partials/header-content.hbs index 3362887..9d43311 100644 --- a/doc/doc-ui/src/partials/header-content.hbs +++ b/doc/doc-ui/src/partials/header-content.hbs @@ -1,8 +1,11 @@
      diff --git a/doc/doc-ui/src/partials/header-scripts.hbs b/doc/doc-ui/src/partials/header-scripts.hbs index b7d34d0..b9e907c 100644 --- a/doc/doc-ui/src/partials/header-scripts.hbs +++ b/doc/doc-ui/src/partials/header-scripts.hbs @@ -1,8 +1 @@ {{!-- Add header scripts here --}} - - - - - - - diff --git a/doc/doc-ui/src/partials/main.hbs b/doc/doc-ui/src/partials/main.hbs index 25835d5..0878f03 100644 --- a/doc/doc-ui/src/partials/main.hbs +++ b/doc/doc-ui/src/partials/main.hbs @@ -4,9 +4,9 @@ {{#if (eq page.layout '404')}} {{> article-404}} {{else}} -{{> sidebar}} +{{> toc}}
      {{> article}} {{/if}} - \ No newline at end of file + diff --git a/doc/doc-ui/src/partials/nav-explore.hbs b/doc/doc-ui/src/partials/nav-explore.hbs index 730b5f2..1b14168 100644 --- a/doc/doc-ui/src/partials/nav-explore.hbs +++ b/doc/doc-ui/src/partials/nav-explore.hbs @@ -2,13 +2,14 @@ {{#if page.component}}
      {{page.component.title}} - {{page.componentVersion.displayVersion}} + {{#if (or page.componentVersion.version (ne page.componentVersion.displayVersion 'default'))}}{{page.componentVersion.displayVersion}}{{/if}}
      {{/if}}
        {{#each site.components}}
      • - {{{./title}}} + + {{#if (or ./versions.[1] ./versions.[0].version (ne ./versions.[0].displayVersion 'default'))}}
          {{#each ./versions}}