Adding an action menu to Section Headers
The Section Action Menu allows users to take actions based on the section header they clicked on.
Main Functionality
Initially, this supports three kinds of actions:
- Copy the HTML Anchor to the clipboard (similar to the previous anchor behavior)
- Copy the Antora XRef to the clipboard, used by content creators to create references to a section in another document
- Open a Change Request via a GitLab issue for this page / section
If the editUrl
is not set for the project, then the "Open a GitLab Issue" isn't shown. This will allow us to use the same UI for public facing documents, but not have a direct link back to our internal GitLab servers.
Extras
Toast UI Element
This MR introduces a "Toast" status, which can be used with window.showToast("Message")
.
This causes a small box to pop up from the bottom and show for 2 seconds, then return.
It is used to give feedback when text is copied to the clipboard, but it can be used generally if we have reason to in the future.
Removed Create Issue Data Key
The createIssueUrl
is no longer used.
This avoids needing a custom site generator.
Instead, we compute the elements from page.origin.webUrl
.
Supplemental Head Content
The head-supplemental.hbs
file gives an easy way for projects to inject extra content into the <HEAD>
elements, without having to copy-paste a large partial.
Organized First Party Content
I updated some of the gulpfile.js
content to organize our own code into a special directory, separate from third-party (aka "vendor") code.
FontAwesome
This brings in Font Awesome icons for use in the menu. They may be useful elsewhere, or could be replace with custom imagery if desired.