{% extends 'base.html.j2' %}
{% set page_title %}
    {% trans project_title=app.project.configuration.title %}
        Welcome to {{ project_title }}
    {% endtrans %}
{% endset %}
{% block page_content %}
    {% if 'betty.extension.Demo' in app.extensions %}
        <p>
            {% trans %}
                Betty is an application that takes a family tree and builds a website out of it, much like the one you
                are viewing right now. The more information your genealogical research contains, the more interactivity
                Betty can add to your site, such as media galleries, maps, and browsable family trees.
            {% endtrans %}
        </p>
        <p>
            {% set liberta_lankester_label -%}
                <a href="{{ app.project.ancestry['Person']['betty-demo-liberta-lankester'] | url }}">Liberta 'Betty' Lankester</a>
            {%- endset %}
            {% trans liberta_lankester_label = liberta_lankester_label %}
                Betty was named after {{ liberta_lankester_label }}, and this website shows a small sample of her family
                history. You can browse the pages about her and some of her family to get an idea of what a Betty site
                looks like.
            {% endtrans %}
        </p>
    {% endif %}
    {% if app.extensions['betty.extension.CottonCandy'].configuration.featured_entities %}
        <div class="featured">
            <div class="featured-entities">
                {% for entity_reference in app.extensions['betty.extension.CottonCandy'].configuration.featured_entities %}
                    <div class="featured-entity">
                        {% with entity = app.project.ancestry[entity_reference.entity_type][entity_reference.entity_id] %}
                            {% include [
                                'entity/featured--' + (entity | entity_type_name | camel_case_to_kebab_case) + '.html.j2',
                                'entity/featured.html.j2',
                            ] %}
                        {% endwith %}
                    </div>
                {% endfor %}
            </div>
        </div>
    {% endif %}
{% endblock %}
