page_tours.parts#

The parts of a tour, hints or checklist a site can style, and their classes.

Module Contents#

Classes#

TourParts

The parts a site can style and the classes each one carries.

API#

class TourParts[source]#

The parts a site can style and the classes each one carries.

The nine parts of a shown tour step, which a hint’s popover and a checklist’s panel also use, the beacon of a hint, and the launcher and an item of a checklist.

Variables:

parts – Every part: the step’s, in the order it shows them, then the beacon, the launcher and the item.

classmethod name(part)[source]#

Return the documented class name of a part.

Parameters:

part – One of parts.

Returns:

The name, such as page-tour-box.

classmethod sources()[source]#

Yield where configured classes come from, most important first.

The project’s setting comes first, then each installed app that declares page_tour_classes, in the order the apps are installed. Computed on every call, so a changed setting applies at once.

Yields:

A (source, mapping) pair – a description of where the mapping came from, and the mapping as found, which may be wrong.

classmethod classes()[source]#

Return the class tokens every part carries.

A part carries its documented name, then the classes of the first source holding a valid entry for it. A valid entry is a known part with a string value; an empty string is valid and adds no classes. Anything else is skipped, never raised, and is reported by the system checks.

Returns:

A dict from every part to its list of class tokens.