{#- The application shell, the template shell('app') names. It draws the menus from the framework's menu registry, menu_sections() in the sidebar and user_menu_sections() in the account menu, the entries features register in their init_feature, and opens the widget slots every application shell provides (layout.head.css, layout.header.menu, layout.navbar.items, layout.navbar.user, layout.footer, layout.scripts). A shell draws the registry or the menu slots, never both, or every entry of a feature that still fills its slot shows twice: the slots features filled before the registry are drawn only while the registry has nothing for the account, the menu of a product whose features do not register yet. -#} {%- macro slot(name) -%} {% for hook in get_template_hooks(name) %}{{ hook() | safe }} {% endfor %} {%- endmacro -%} {%- macro sidebar_section(section) -%} {% if section.label %}{% endif %} {% for entry in section.entries %} {% endfor %} {%- endmacro -%} {%- set sections = menu_sections() if menu_sections is defined else [] -%} {%- set user_sections = user_menu_sections() if user_menu_sections is defined else [] -%} {%- set signed_in = current_user is defined and current_user.is_authenticated -%} {#- A page names itself in the title block, or sets the variable title, and the site's name follows it. -#} {% set page_title %}{% block title %}{{ title if title is defined else '' }}{% endblock %}{% endset %} {% set page_title = page_title | trim %} {{ (page_title ~ ' · ' if page_title else '') ~ (config.SITE_NAME or SPLENT_APP) }} {# No web fonts from a third party: every visit told Google who came, and the content security policy had to let it in. Inter is used where the machine has it and the system's sans-serif elsewhere; a product that wants it everywhere ships the font files with its static assets. #} {% block head_extra %}{% endblock %} {% block head %}{% endblock %} {{ slot("layout.head.css") }}
{% block breadcrumb %}{% endblock %}
{% block content %}{% endblock %}
{{ slot("layout.scripts") }} {% block scripts %}{% endblock %}