feat: add contained, persistent calculator

This commit is contained in:
Herculino Trotta
2024-12-14 18:22:21 -03:00
parent 2993ead631
commit 86443ba197
7 changed files with 242 additions and 4 deletions

View File

@@ -2,14 +2,18 @@ import _hyperscript from 'hyperscript.org/dist/_hyperscript.min';
import './_htmx.js';
import Alpine from "alpinejs";
import mask from '@alpinejs/mask';
import { create, all } from 'mathjs';
window.Alpine = Alpine;
window._hyperscript = _hyperscript;
window.math = create(all, { });
Alpine.plugin(mask);
Alpine.start();
_hyperscript.browserInit();
const successAudio = new Audio("/static/sounds/success.mp3");
const popAudio = new Audio("/static/sounds/pop.mp3");
window.paidSound = successAudio;

View File

@@ -101,3 +101,32 @@
z-index: 101;
}
}
.swing-out-top-bck {
animation: swing-out-top-bck 0.45s cubic-bezier(0.600, -0.280, 0.735, 0.045) both;
}
/* ----------------------------------------------
* Generated by Animista on 2024-12-14 15:59:19
* Licensed under FreeBSD License.
* See http://animista.net/license for more info.
* w: http://animista.net, t: @cssanimista
* ---------------------------------------------- */
/**
* ----------------------------------------
* animation swing-out-top-bck
* ----------------------------------------
*/
@keyframes swing-out-top-bck {
0% {
transform: rotateX(0deg);
transform-origin: top;
opacity: 1;
}
100% {
transform: rotateX(-100deg);
transform-origin: top;
opacity: 0;
}
}