[CHANGE] Move the if inside the script tag

Makes the code better readable and maintainable.
This commit is contained in:
Peter Pfeufer 2024-11-23 01:55:04 +01:00
parent 2822775fb8
commit 50681b023b
No known key found for this signature in database

View File

@ -4,11 +4,13 @@
{% include theme.js_template %} {% include theme.js_template %}
{% else %} {% else %}
{% for x in theme.js %} {% for x in theme.js %}
{% if x.js_type %} <script
<script type="{{ x.js_type }}" src="{{ x.url }}" integrity="{{ x.integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer"></script> {% if x.js_type %}type="{{ x.js_type }}"{% endif %}
{% else %} src="{{ x.url }}"
<script src="{{ x.url }}" integrity="{{ x.integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer"></script> integrity="{{ x.integrity }}"
{% endif %} crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<!-- allianceauth.theme.{{ theme.name }} JS Ends--> <!-- allianceauth.theme.{{ theme.name }} JS Ends-->