forked from rDrama/rDrama
consistent element id
parent
29099c8976
commit
94fbdf5918
|
@ -634,7 +634,7 @@ body::after {
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#jump-scare-img {
|
#jumpscare-img {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Jump scare function
|
// Jump scare function
|
||||||
function scare() {
|
function scare() {
|
||||||
const image = document.getElementById("jump-scare-img");
|
const image = document.getElementById("jumpscare-img");
|
||||||
image.style.display = "block";
|
image.style.display = "block";
|
||||||
|
|
||||||
const jumpscare_audio = document.getElementById('jumpscare-audio')
|
const jumpscare_audio = document.getElementById('jumpscare-audio')
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<body {% block body_attributes %}id="{% block pagetype %}{% endblock %}"{% endblock %}>
|
<body {% block body_attributes %}id="{% block pagetype %}{% endblock %}"{% endblock %}>
|
||||||
{% if IS_HOMOWEEN() and ((v and v.jumpscare) or request.path.startswith('/shop/')) %}
|
{% if IS_HOMOWEEN() and ((v and v.jumpscare) or request.path.startswith('/shop/')) %}
|
||||||
{% set image_src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/jumpscares/" ~ listdir("files/assets/events/homoween/images/jumpscares")|random() ~ "?x=45" %}
|
{% set image_src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/jumpscares/" ~ listdir("files/assets/events/homoween/images/jumpscares")|random() ~ "?x=45" %}
|
||||||
<img src="{{image_src}}" id="jump-scare-img" style="display: none">
|
<img src="{{image_src}}" id="jumpscare-img" style="display: none">
|
||||||
{% set audio_src = "/assets/events/homoween/audio/jumpscares/" ~ listdir("files/assets/events/homoween/audio/jumpscares")|random() ~ "?x=45" %}
|
{% set audio_src = "/assets/events/homoween/audio/jumpscares/" ~ listdir("files/assets/events/homoween/audio/jumpscares")|random() ~ "?x=45" %}
|
||||||
<audio id="jumpscare-audio" preload="none" src="{{audio_src}}"></audio>
|
<audio id="jumpscare-audio" preload="none" src="{{audio_src}}"></audio>
|
||||||
<script defer src="{{'events/homoween/js/jumpscare.js' | asset}}"></script>
|
<script defer src="{{'events/homoween/js/jumpscare.js' | asset}}"></script>
|
||||||
|
|
Loading…
Reference in New Issue