The Cotton Candy extension - Betty documentation

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

# The Cotton Candy extension

The `cotton-candy` extension provides Betty’s default theme.

Important

This extension requires npm.

Enable this extension in your project’s configuration file as follows:

YAML

    extensions:
      cotton-candy: {}

JSON

    {
      "extensions": {
        "cotton-candy": {}
      }
    }

## Configuration

This extension is configurable:

YAML

    extensions:
      cotton-candy:
        configuration:
          primary_inactive_color: '#ffc0cb'
          primary_active_color: '#ff69b4'
          link_inactive_color: '#149988'
          link_active_color: '#2a615a'
          featured_entities:
            - entity_type: person
              entity: P123
            - entity_type: place
              entity: Amsterdam

JSON

    {
      "extensions": {
        "cotton-candy": {
          "configuration" : {
            "primary_inactive_color": "#ffc0cb",
            "primary_active_color": "#ff69b4",
            "link_inactive_color": "#149988",
            "link_active_color": "#2a615a",
            "featured_entities": [
              {
                "entity_type": "person",
                "entity": "P123"
              },
              {
                "entity_type": "place",
                "entity": "Amsterdam"
              }
            ],
          }
        }
      }
    }

### `primary_inactive_color`

optional

The case-insensitive hexadecimal code for the primary color. Defaults to `#ffc0cb`.

### `primary_active_color`

optional

The case-insensitive hexadecimal code for the primary color for actively engaged elements. Defaults to `#ff69b4`.

### `link_inactive_color`

optional

The case-insensitive hexadecimal code for the link color. Defaults to `#149988`.

### `link_active_color`

optional

The case-insensitive hexadecimal code for the color of actively engaged links. Defaults to `#2a615a`.

### `featured_entities`

optional

A list of entities to feature on the front page. Each item has the following configuration:

#### `featured_entities[].entity_type`

required

The entity type ID of the entity (type) to feature, e.g. `person`.

#### `featured_entities[].entity`

required

The entity ID of the entity to feature, e.g. `P123`.

## Templating

### Filters

- `associated_file_references`

- `person_descendant_families`

- `person_timeline_events`