{# TODO: figure out nested macro calls #} {% import 'components/navigation/global.html' as global %} {% from 'components/navigation/sidebar.html' import nav_list, nav_item, nav_header, nav_entry %} {% from 'components/loading_icon.html' import loading_icon %} {% from 'components/timestamp.html' import timestamp %} {% from 'components/tooltip.html' import tooltip %} {% from 'components/links.html' import fancy_link, kemono_link, link_button %} {% from 'components/tooltip.html' import register_message %} {% from 'components/buttons.html' import button %} {% macro header_link(url, text, class_name=none) %} {{ text }} {% endmacro %} {% if g.matomo_enabled and g.matomo_plain_code %} {{ g.matomo_plain_code|safe }} {% elif g.matomo_enabled %} {% endif %} {% block title %} {{ (props.name ~ " | " ~ g.site_name) if props.name else g.site_name }} {% endblock title %} {% block meta %} {% if props.service %} {% endif %} {% if props.id %} {% endif %} {% if props.importId %} {% endif %} {% if props.count %} {% endif %} {% if props.posts|length %} {% if props.posts[0].published %} {% endif %} {% endif %} {% endblock meta %} {% block opengraph %} {% endblock opengraph %} {% block styles %} {% endblock styles %} {% block scripts %} {% if request.args.logged_in %} {% endif %} {% if request.args.role %} {% endif %} {# TODO remove this shit #} {% endblock scripts %} {% block bundler_output %} {# quick hack until writing proper loader #} <% for (const css in htmlWebpackPlugin.files.css) { %> <% if (htmlWebpackPlugin.files.css[css].startsWith("/static/bundle/css/global")) { %> <% } %> <% } %> <% for (const chunk in htmlWebpackPlugin.files.chunks) { %> <% } %> <% for (const scriptPath in htmlWebpackPlugin.files.js) { %> <% if (htmlWebpackPlugin.files.js[scriptPath].startsWith("/static/bundle/js/global") || htmlWebpackPlugin.files.js[scriptPath].startsWith("/static/bundle/js/runtime") || htmlWebpackPlugin.files.js[scriptPath].startsWith("/static/bundle/js/vendors")) { %> <% } %> <% } %> {% endblock bundler_output %} {% block scripts_extra %} {% endblock scripts_extra %}
{{ header_link('/', 'Home', 'home') }} {{ header_link('/artists', g.artists_or_creators) }} {{ header_link('/posts', 'Posts') }} {{ header_link('/importer', 'Import', 'import') }} {{ header_link('/account/register?location=' + request.args.get("location", request.path), 'Register', 'register') }} {{ header_link('/account/login?location=' + request.args.get("location", request.path), 'Login', 'login') }}
{% include 'components/flash_messages.html' %} {% if g.banner_global %} {{ g.banner_global|safe }} {% endif %}
{% block content %} {% endblock content %}
{#
#} {% call tooltip() %}

{% endcall %}