betty.extension.cotton_candy package - Betty 0.4.0a4 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.extension.cotton_candy package

## Submodules

- betty.extension.cotton_candy.config module
  - `ColorConfiguration`
    - `ColorConfiguration.__init__()`
    - `ColorConfiguration.dump()`
    - `ColorConfiguration.hex`
    - `ColorConfiguration.load()`
    - `ColorConfiguration.update()`
  - `CottonCandyConfiguration`
    - `CottonCandyConfiguration.DEFAULT_LINK_ACTIVE_COLOR`
    - `CottonCandyConfiguration.DEFAULT_LINK_INACTIVE_COLOR`
    - `CottonCandyConfiguration.DEFAULT_PRIMARY_ACTIVE_COLOR`
    - `CottonCandyConfiguration.DEFAULT_PRIMARY_INACTIVE_COLOR`
    - `CottonCandyConfiguration.__init__()`
    - `CottonCandyConfiguration.dump()`
    - `CottonCandyConfiguration.featured_entities`
    - `CottonCandyConfiguration.link_active_color`
    - `CottonCandyConfiguration.link_inactive_color`
    - `CottonCandyConfiguration.load()`
    - `CottonCandyConfiguration.logo`
    - `CottonCandyConfiguration.primary_active_color`
    - `CottonCandyConfiguration.primary_inactive_color`
    - `CottonCandyConfiguration.update()`
- betty.extension.cotton_candy.search module
  - `Index`
    - `Index.__init__()`
    - `Index.build()`

## Module contents

Provide Betty’s default theme.

final class betty.extension.cotton_candy.CottonCandy

  Bases: `Theme`, `CssProvider`, `ConfigurableExtension`[`CottonCandyConfiguration`], `Jinja2Provider`, `WebpackEntryPointProvider`

  Provide Betty’s default front-end theme.

  classmethod assets_directory_path() → Path

    Return the path on disk where the extension’s assets are located.

    This may be anywhere in your Python package.

  classmethod comes_after() → set[PluginId]

    The extensions that this one comes after.

    The other extensions may or may not be enabled.

  classmethod default_configuration() → CottonCandyConfiguration

    Get this extension’s default configuration.

  classmethod depends_on() → set[PluginId]

    The extensions this one depends on, and comes after.

  property filters: dict[str, Callable[[...], Any]]

    Jinja2 filters provided by this extension.

    Keys are filter names, and values are the filters themselves.

  property globals: dict[str, Any]

    Jinja2 globals provided by this extension.

    Keys are the globals’ names, and values are the globals’ values.

  property logo: Path

    The path to the logo file.

  classmethod plugin_description() → Localizable

    Get the human-readable long plugin description.

  classmethod plugin_id() → PluginId

    Get the plugin ID.

    IDs are unique per plugin type: - A plugin repository MUST at most have a single plugin for any ID. - Different plugin repositories MAY each have a plugin with the same ID.

  classmethod plugin_label() → Localizable

    Get the human-readable short plugin label.

  property public_css_paths: list[str]

    The public URL paths to the CSS files to include in each HTML page.

  register_event_handlers(registry: EventHandlerRegistry) → None

    Register event handlers with the project.

  webpack_entry_point_cache_keys() → Sequence[str]

    Get the keys that make a Webpack build for this provider unique.

    Providers that can be cached regardless may `return ()`.

  classmethod webpack_entry_point_directory_path() → Path

    Get the path to the directory with the entry point assets.

    The directory must include at least a `package.json` and `main.ts`.

betty.extension.cotton_candy.associated_file_references(has_file_references: HasFileReferences) → Iterable[FileReference]

  Get the associated file references for an entity that has file references.

betty.extension.cotton_candy.person_descendant_families(person: Person) → Iterable[tuple[Sequence[Person], Sequence[Person]]]

  Gather a person’s families they are a parent in.

betty.extension.cotton_candy.person_timeline_events(person: Person, lifetime_threshold: int) → Iterable[Event]

  Gather all events for a person’s timeline.