mirror of
https://github.com/kristoferssolo/kristofersxyz.git
synced 2025-10-21 18:30:34 +00:00
Added audio on lightmode
This commit is contained in:
parent
4994e193b4
commit
cf4c205c5e
BIN
static/main/audio/csgo-throwing-flashbang-sound-effect.m4a
Normal file
BIN
static/main/audio/csgo-throwing-flashbang-sound-effect.m4a
Normal file
Binary file not shown.
@ -1,10 +1,11 @@
|
||||
let lightmode = localStorage.getItem("lightmode")
|
||||
const HTML = document.documentElement
|
||||
console.log(HTML)
|
||||
|
||||
const ENABLE_LIGHT_MODE = () => {
|
||||
const AUDIO = document.getElementById("flashbang")
|
||||
HTML.setAttribute("data-color-mode", "light")
|
||||
localStorage.setItem("lightmode", "enabled")
|
||||
AUDIO.play()
|
||||
}
|
||||
|
||||
const DISABLE_LIGHT_MODE = () => {
|
||||
|
||||
@ -48,6 +48,9 @@
|
||||
<button id="color-mode-toggle"
|
||||
class="color-mode-toggle"
|
||||
aria-label="toggle dark mode ">
|
||||
<audio id="flashbang"
|
||||
src="{% static 'main/audio/csgo-throwing-flashbang-sound-effect.m4a' %}">
|
||||
</audio>
|
||||
<svg width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 496">
|
||||
<path fill="currentColor" d="M8,256C8,393,119,504,256,504S504,393,504,256,393,8,256,8,8,119,8,256ZM256,440V72a184,184,0,0,1,0,368Z" transform="translate(-8 -8)"/>
|
||||
</svg>
|
||||
|
||||
@ -14,8 +14,10 @@
|
||||
{% block content %}
|
||||
<div id="landing">
|
||||
<div class="landing-title">
|
||||
<video autoplay loop>
|
||||
<source src="{% static 'main/img/hello-there.webm' %}" type="video/webm">
|
||||
<video autoplay
|
||||
loop
|
||||
src="{% static 'main/img/hello-there.webm' %}"
|
||||
type="video/webm">
|
||||
</video>
|
||||
<h1 class="text">
|
||||
I'm <span id="swap-text">Kristofers Solo</span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user