Bundle page-specific JavaScript
This commit is contained in:
parent
bdb693d73d
commit
27d39ffc0c
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
{% endcss %}
|
||||
|
||||
<script>
|
||||
{%- js %}
|
||||
const hero = document.querySelector(".hero");
|
||||
const heroTopBarEl = document.querySelector(".hero__top-bar");
|
||||
const headerImgEl = document.querySelector(".hero__img");
|
||||
|
@ -43,4 +43,4 @@
|
|||
{% block eventScript %}
|
||||
{{ eventScript }}
|
||||
{% endblock %}
|
||||
</script>
|
||||
{% endjs %}
|
|
@ -133,7 +133,7 @@ https://kalechips.net/projects/snippets/burger #}
|
|||
}
|
||||
{% endcss %}
|
||||
|
||||
<script>
|
||||
{%- js %}
|
||||
const navbarBurger = document.querySelector(".navbar__burger");
|
||||
navbarBurger.addEventListener("keydown", (event) => {
|
||||
if (event.key == "Escape") {
|
||||
|
@ -142,4 +142,4 @@ https://kalechips.net/projects/snippets/burger #}
|
|||
document.querySelector(".navbar__toggle").focus();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endjs %}
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
{%- css %}#statuscafe-content { margin-bottom: 0.5em; }{% endcss %}
|
||||
|
||||
<script>
|
||||
{%- js %}
|
||||
const statusCafeContent = document.getElementById("statuscafe-content");
|
||||
statusCafeContent.innerHTML = `
|
||||
<p>Fetching data from status.cafe...</p>
|
||||
|
@ -36,4 +36,4 @@
|
|||
}
|
||||
};
|
||||
fetchStatusCafe();
|
||||
</script>
|
||||
{% endjs %}
|
Loading…
Reference in New Issue