first commit

This commit is contained in:
Auric Vente 2024-07-31 23:26:11 -06:00
commit 62d26f6482
31 changed files with 4697 additions and 0 deletions

1
LICENSE Normal file
View File

@ -0,0 +1 @@
This software has the right to remain silent.

BIN
audio/atmo.mp3 Normal file

Binary file not shown.

BIN
audio/pup.mp3 Normal file

Binary file not shown.

BIN
css/mordred.ttf Normal file

Binary file not shown.

53
css/style.css Normal file
View File

@ -0,0 +1,53 @@
@font-face {
font-family: mordred;
src: url(mordred.ttf);
}
body {
color: black;
background-color: #F0E0D6;
font-family: mordred;
font-size: 18px;
overflow: scroll;
}
#container {
display: flex;
flex-direction: column;
align-items: center;
}
#words {
display: flex;
flex-direction: column;
align-items: center;
gap: 1.6rem;
padding-top: 2rem;
padding-bottom: 2rem;
}
.word {
font-size: 3rem;
animation-name: fadein;
animation-duration: 0.8s;
animation-timing-function: linear;
opacity: 0;
}
#card {
padding-bottom: 2rem;
animation-name: fadein;
animation-duration: 1s;
animation-timing-function: linear;
opacity: 0;
}
@keyframes fadein {
0% {
opacity: 0
}
100% {
opacity: 1
}
}

BIN
deck/1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
deck/10.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
deck/11.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
deck/12.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
deck/13.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
deck/14.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
deck/15.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
deck/16.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
deck/17.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
deck/18.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
deck/19.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
deck/2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
deck/20.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
deck/21.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
deck/22.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
deck/3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
deck/4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
deck/5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
deck/6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
deck/7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
deck/8.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
deck/9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

24
index.html Normal file
View File

@ -0,0 +1,24 @@
<html>
<head>
<title>Oracle</title>
<link rel="shortcut icon" href="favicon.ico?v=1" type="image/x-icon">
<script src="js/base.js"></script>
<script src="js/words.js"></script>
<link rel="stylesheet" href="css/style.css">
<script>
window.onload = () => {
App.init()
}
</script>
</head>
<body>
<div id="container">
<div id="words"></div>
</div>
<audio preload class="sound" id="atmo" src="audio/atmo.mp3"></audio>
<audio preload class="sound" id="pup" src="audio/pup.mp3"></audio>
</body>
</html>

63
js/base.js Normal file
View File

@ -0,0 +1,63 @@
const App = {}
App.show_delay = 1441
App.init = () => {
App.set_volume()
App.play(`atmo`)
setTimeout(() => {
App.show_word()
}, App.show_delay)
setTimeout(() => {
App.show_word()
}, App.show_delay * 2)
setTimeout(() => {
App.show_word()
}, App.show_delay * 3)
setTimeout(() => {
App.show_card()
}, App.show_delay * 4)
}
App.show_word = () => {
let word = App.words[App.get_random_int(0, App.words.length - 1)]
let el = document.createElement(`div`)
el.textContent = word
el.classList.add(`word`)
App.el(`#words`).append(el)
el.style.opacity = 1
App.play(`pup`)
}
App.show_card = () => {
let n = App.get_random_int(1, 22)
let fname = `deck/${n}.gif`
let img = document.createElement(`img`)
img.id = `card`
img.src = fname
App.el(`#container`).append(img)
img.style.opacity = 1
}
App.play = (what) => {
App.el(`#${what}`).pause()
App.el(`#${what}`).currentTime = 0
App.el(`#${what}`).play()
}
App.set_volume = () => {
App.el(`#atmo`).volume = 0.45
}
App.get_random_int = (min, max) => {
return Math.floor(Math.random() * (max - min + 1)) + min
}
App.el = (query, root = document) => {
return root.querySelector(query)
}

4556
js/words.js Normal file

File diff suppressed because it is too large Load Diff