Skip to content

Commit

Permalink
Fix scripts load order
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinEtchells committed Jul 2, 2024
1 parent 48b6986 commit 9d94631
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
1 change: 1 addition & 0 deletions django_app/frontend/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions django_app/redbox_app/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% from "macros/iai-top-nav.html" import iaiTopNav %}
{% from "macros/use-trusted-types.html" import use_trusted_types %}

<!DOCTYPE html>
<html lang="en" class="govuk-template">
Expand All @@ -22,6 +21,14 @@
<link rel="stylesheet" type="text/css" href="{{static('style.css')}}" />
{% endif %}

<script src="{{ static('js/libs/dompurify.js') }}"></script>
{% if COMPRESSION_ENABLED %}
{% compress js %}
<script src="{{ static('js/trusted-types.js') }}"></script>
{% endcompress %}
{% else %}
<script src="{{ static('js/trusted-types.js') }}"></script>
{% endif %}

{% if environment | lower in ["dev", "preprod"] %}
<script defer
Expand Down Expand Up @@ -113,7 +120,6 @@
</div>
</footer>

{{ use_trusted_types() }}
<script type="module" src="{{static('js/libs/govuk-frontend.min.js')}}"></script>
<script type="module" src="{{static('js/libs/iai-design-system.js')}}"></script>

Expand Down
13 changes: 0 additions & 13 deletions django_app/redbox_app/templates/macros/use-trusted-types.html

This file was deleted.

0 comments on commit 9d94631

Please sign in to comment.