<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>{% block title %}{% endblock %}</title>
    {% if c.core.icon %}
    <link rel="shortcut icon" href="{{ c.core.icon }}">
    {% endif %}
    <link rel="stylesheet" href="{{ url_for('infimum.static', path='common.css') }}">
    {% block head %}{% endblock %}
    {% block custom_head %}
        {{ e('infimum:custom_head', {'page': request.url_rule.endpoint}).get('html', '') }}
    {% endblock %}
</head>
<body>
    <header>
        {% block header %}
            <p>{% block heading %}<a href="{{ url_for('core.index') }}">{{ c.core.title }}</a>{% endblock %}</p>
            {% block navbar %}
                {% for nav in c.infimum.navs %}
                <a href="{{ nav.href }}" {{ nav.attr }}>{{ nav.name }}</a>
                {% endfor %}
            {% endblock %}
        {% endblock %}
    </header>
    <hr>
    <main>
        {% block content %}
        {% endblock content %}
        <aside>
            {% block widgets %}
                {% for widget in c.infimum.widgets %}
                <h3>{{ widget.title }}</h3>
                <hr>
                <div>{{ widget.html }}</div>
                {% endfor %}
            {% endblock widgets %}
            {% block custom_widget %}
                {{ e('infimum:custom_widget', {'page': request.url_rule.endpoint}).get('html', '') }}
            {% endblock %}
        </aside>
    </main>
    <footer>
        {% block footer %}
            {{ c.infimum.footer }}
        {% endblock %}
    </footer>
    {% block foot %}{% endblock %}
    {% block custom_foot %}
        {{ e('infimum:custom_foot', {'page': request.url_rule.endpoint}).get('html', '') }}
    {% endblock %}
</body>
</html>
