Support for .navigation.turf file.

Description

A simple .navigation.lst file introduced in allows a subset of artifact menu links in an arbitrary order, but it doesn't allow more complex navigation such as to arbitrary, external URLs, custom labels, custom icons, and submenus.

Add support for a .navigation.turf file. The root element is expected to be an URF list. Each item can be one of the following:

  • A string, in which case the value is interpreted as a relative (to the list file) link to an artifact, identical to those of GUISE-134. (Note that fragments must be supported, e.g. "example.xhtml#foo" and "example.xhtml#bar".

  • A description which supports, in addition to href, the same descriptive properties an artifact would, including:

    • href: Either a string path to an artifact as in GUISE-134, or a URL link to an external page.

    • label: The label for the navigation item, overriding any of the artifact.

    • icon: The icon of the navigation item, overriding any of the artifact.

    • navigation: A property containing a nested navigation list.

In the future we might allow a URL, in which case we'll need to decide how to determine the label.

Here's an example:

Environment

None

Activity

Show:
Garret Wilson
May 19, 2020, 1:46 PM

I was indecisive for a bit trying to decide whether I should have different things such as NavItem, NavLabel, NavGroup, and eventually e.g. NavDivider, but I glanced back at the EPUB specifications and realized that we're only defining navigation, which is more of a logical rather than a presentational thing.

For now navigation representation should be as simple as possible. In the future if we want to have arbitrary things on the menu like dividers, we can either patch in new HTML or create a higher-level semantic "menu" construct.

Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Garret Wilson

Reporter

Garret Wilson