betty.project.extension.cotton_candy.config module - 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.config module

Provide configuration for the Cotton Candy extension.

class betty.project.extension.cotton_candy.config.CottonCandyConfiguration

  Bases: `Configuration`

  Provide configuration for the `betty.project.extension.cotton_candy.CottonCandy` extension.

  DEFAULT_LINK_ACTIVE_COLOR = '#2a615a'
  DEFAULT_LINK_INACTIVE_COLOR = '#149988'
  DEFAULT_PRIMARY_ACTIVE_COLOR = '#ff69b4'
  DEFAULT_PRIMARY_INACTIVE_COLOR = '#ffc0cb'
  __init__(*, featured_entities: Sequence[EntityReference[UserFacingEntity & Entity]] | None = None, primary_inactive_color: str = '#ffc0cb', primary_active_color: str = '#ff69b4', link_inactive_color: str = '#149988', link_active_color: str = '#2a615a')
  dump() → DumpMapping[Dump]

    Produce a serialized data dump of `self`.

  property featured_entities: EntityReferenceSequence[UserFacingEntity & Entity]

    The entities featured on the front page.

  property link_active_color: ColorConfiguration

    The color for active hyperlinks.

  property link_inactive_color: ColorConfiguration

    The color for inactive hyperlinks.

  load(dump: Dump) → None

    Load a serialized data dump into `self`.

    Raises:

      betty.assertion.error.AssertionFailed – Raised if the dump is invalid.

  property primary_active_color: ColorConfiguration

    The color for active primary/CTA elements.

  property primary_inactive_color: ColorConfiguration

    The color for inactive primary/CTA elements.