{% load friendly_loader wagtailcore_tags wagtailsettings_tags cjkcms_tags %}
{% friendly_load webpack_loader %}

    {% if settings.cjkcms.LayoutSettings.frontend_theme == 'mdb.light' or settings.cjkcms.LayoutSettings.frontend_theme == 'mdb.dark' %}
        <script
        type="text/javascript"
        src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/6.1.0/mdb.min.js"></script>
    {% elif settings.cjkcms.LayoutSettings.frontend_theme == 'python-webpack' %}
        {% if_has_tag javascript_pack %}
            {% javascript_pack 'app' attrs='charset="UTF-8"' %} {# you may add space-separated 'app2' etc after 'app' #}
        {% endif_has_tag %}
    {% else %}
        {% if "DEBUG"|django_settings %}
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.js" 
            crossorigin="anonymous"></script>              
        {% else %}
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" 
            integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" 
            crossorigin="anonymous"></script>              
        {% endif %}
    {% endif %}