[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 %}
{% else %}
{% for x in theme.js %}
{% if x.js_type %}
<script type="{{ x.js_type }}" src="{{ x.url }}" integrity="{{ x.integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
{% else %}
<script src="{{ x.url }}" integrity="{{ x.integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
{% endif %}
<script
{% if x.js_type %}type="{{ x.js_type }}"{% endif %}
src="{{ x.url }}"
integrity="{{ x.integrity }}"
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
{% endfor %}
{% endif %}
<!-- allianceauth.theme.{{ theme.name }} JS Ends-->