{% extends 'entity/page.html.j2' %}
{% set citation = citation | default(entity) %}
{% set page_title = citation.location %}
{% block page_content %}
    <div class="meta">
    {% include 'entity/meta--citation.html.j2' %}
    </div>
    {% with files = citation.files %}
        {% include 'media.html.j2' %}
    {% endwith %}
    {% set facts = citation.facts | select('public') | reject('has_generated_entity_id') | list %}
    {% if facts | length > 0 %}
        <section id="facts">
            <h2>
                {% trans %}Facts{% endtrans %}
                {% with url = page_resource | url ~ '#facts'%}
                    {% include 'permalink.html.j2' %}
                {% endwith %}
            </h2>
            <ul class="entities">
                {% for fact in facts %}
                    <li class="{{ loop.cycle('odd', 'even') }}">
                        {% with entity=fact, entity_contexts=entity_contexts(citation) %}
                            {% include ['entity/label--' + entity.plugin_id() + '.html.j2', 'entity/label.html.j2'] %}
                            {% include ['entity/meta--' + entity.plugin_id() + '.html.j2', 'entity/meta.html.j2'] ignore missing %}
                        {% endwith %}
                    </li>
                {% endfor %}
            </ul>
        </section>
    {% endif %}
{% endblock %}