betty.project.extension.cotton_candy package - Betty documentation

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

# betty.project.extension.cotton_candy package

## Submodules

- betty.project.extension.cotton_candy.config module
  - `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.primary_active_color`
    - `CottonCandyConfiguration.primary_inactive_color`

## Module contents

Provide the Cotton Candy theme.

final class betty.project.extension.cotton_candy.CottonCandy

  Bases: `ShorthandPluginBase`, `Theme`, `CssProvider`, `ConfigurableExtension`[`CottonCandyConfiguration`], `Jinja2Provider`, `EntryPointProvider`

  The Cotton Candy theme.

  __init__(project: Project, public_css_paths: Sequence[str], *, configuration: CottonCandyConfiguration)

    This is private. It MUST NOT be used anywhere outside its containing scope.

  static __new__(*args, **kwargs)
  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.

  async bootstrap() → None

    Bootstrap the component.

  classmethod comes_after() → set[PluginIdentifier[Extension]]

    Get the plugins that this plugin comes after.

    The returned plugins come before this plugin.

  classmethod depends_on() → set[PluginIdentifier[Extension]]

    The plugins this one depends on.

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

    Jinja2 filters provided by this extension.

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

  classmethod new_default_configuration() → CottonCandyConfiguration

    Create this extension’s default configuration.

  async classmethod new_for_project(project: Project) → Self

    Create a new instance using the given project.

  property public_css_paths: Sequence[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`.