{% extends "base.html" %}

{% load static %}
{% load oxyan %}
{% load ocyanjson %}
{% load wagtailcore_tags wagtailimages_tags %}
{% load compress %}
{% load i18n %}
{% load wagtailuserbar ocyan_main %}

{% block layout %}
{% if show_basket_popup_setting %}
    {% esi_fragment "partials/added_success.html" with sessionid=True oscar_open_basket=True request=request csrf_token=csrf_token only %}
{% endif %}

{% block navbar %}
    {% include_header 'oxyan/headers/header.html' %}
{% endblock %}

{% block content_wrapper %}
<div id="main_content" tabindex="-1">
    {% block content %}{% endblock %}
</div>
{% endblock %}

{% block footer %}
    {% include "oxyan/partials/footer.html" %}
{% endblock %}

{% ocyanjson "themes" "theme-switcher" as theme_switcher %}
{% if theme_switcher %}
    {% include "oxyan/partials/theme_switcher.html" %}
{% endif %}
{% endblock %}

{% block extrascripts %}
{% include "oscar/partials/extrascripts.html" %}
{{ block.super }}
{% endblock %}

{% block onbodyload %}
{{ block.super }}
oxyan.layout()
oxyan.initModalPopup()
oxyan.initializePriceUpdate()
oxyan.IconHoverFix()
oxyan.lazyIconDropdown()
oxyan.toasts()
oxyan.commerseHeader()
oxyan.initWCAG()
{% ocyanjson "themes" "image_zoom" as image_zoom %}
{% if image_zoom %}
oxyan.initImageZoom()
{% endif %}
{% endblock %}

{% block cdn_scripts %}
    {{ block.super }}
    {% ocyanjson "wagtail" "wagtailuserbar_position" as position %}
    {% if position %}
        {% wagtailuserbar position %}
    {% endif %}
{% endblock %}
