{% import viz.template as viz_macros %}
{% if viz.args.get("json") == "true" %}
{{ viz.get_json() }}
{% else %}
{% if viz.args.get("standalone") == "true" %}
{% extends 'panoramix/viz_standalone.html' %}
{% else %}
{% extends 'panoramix/datasource.html' %}
{% endif %}
{% block viz_html %}
{{ viz_macros.viz_html(viz) }}
{% endblock %}
{% block head_css %}
{{super()}}
{% if viz.args.get("skip_libs") != "true" %}
{% for css in viz.css_files %}
{% endfor %}
{% endif %}
{{ viz_macros.viz_css(viz) }}
{% endblock %}
{% block tail %}
{{super()}}
{% if viz.args.get("skip_libs") != "true" %}
{% for js in viz.js_files %}
{% endfor %}
{% endif %}
{{ viz_macros.viz_js(viz) }}
{% endblock %}
{% endif %}