only load custom-easteregg if on

Avoid loading the extra custom-easteregg script if the easteregg is not turned on.
This commit is contained in:
Joe Hand 2024-12-17 17:13:26 +00:00 committed by GitHub
parent a60660144b
commit ec176949db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,8 +46,9 @@
<main id="main" class="flow">{{ content | safe }}</main>
{% include "partials/footer.njk" %}
<script type="module" src="/assets/scripts/components/custom-easteregg.js"></script>
<custom-easteregg></custom-easteregg>
{%- if meta.easteregg -%}
<script type="module" src="/assets/scripts/components/custom-easteregg.js"></script>
<custom-easteregg></custom-easteregg>
{%- endif -%}
</body>
</html>