From 33c5cb500ab3e80836852d25485061e800914818 Mon Sep 17 00:00:00 2001 From: sebastianjnuwu Date: Sat, 28 Dec 2024 18:50:29 -0300 Subject: [PATCH] update --- www/index.html | 36 +++++++++++++++- www/src/js/cookie/game.js | 37 ++++++++++++++++ www/src/js/main.js | 5 +-- www/src/styles/css/ui.css | 88 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+), 5 deletions(-) create mode 100644 www/src/js/cookie/game.js diff --git a/www/index.html b/www/index.html index ec6b20e..f758805 100644 --- a/www/index.html +++ b/www/index.html @@ -15,13 +15,45 @@ - + + + + + + diff --git a/www/src/js/cookie/game.js b/www/src/js/cookie/game.js new file mode 100644 index 0000000..c64ce71 --- /dev/null +++ b/www/src/js/cookie/game.js @@ -0,0 +1,37 @@ +$('.cookie').on('click', function (e) { + + const a = 1; + + const $effect = $(`
+${a}
`); + + const offset = $(this).offset(); + const X = e.pageX - offset.left; + const Y = e.pageY - offset.top; + + $effect.css({ + left: X + 'px', + top: Y + 'px', + position: 'absolute', + }); + + $(this).append($effect); + + $effect + .animate( + { + top: '-=2.5rem', + opacity: 1, + fontSize: '1.5rem', + }, + 300 + ) + .animate( + { + opacity: 0, + }, + 200, + function () { + $(this).remove(); + } + ); +}); \ No newline at end of file diff --git a/www/src/js/main.js b/www/src/js/main.js index ac9f230..ff15aa7 100644 --- a/www/src/js/main.js +++ b/www/src/js/main.js @@ -1,10 +1,9 @@ $(() => { - // Splash screen animation $("splash-screen").on("click", () => { $("#splash")[0].play(); - setTimeout(() => { $("splash-screen").remove(); + $("ui").show(); }, 1000); }); -}); +}); \ No newline at end of file diff --git a/www/src/styles/css/ui.css b/www/src/styles/css/ui.css index d9038c6..308ec1d 100644 --- a/www/src/styles/css/ui.css +++ b/www/src/styles/css/ui.css @@ -68,3 +68,91 @@ body { opacity: 0.8; } } + +.cookie img { + width: 15rem; + transition: transform 0.02s ease-in-out; + will-change: transform; + position: relative; +} + +.cookie img:active { + transform: scale(0.8); +} + +.click-effect { + position: absolute; + color: white; + font-size: 2rem; + font-weight: bold; + text-shadow: 0 0 8px rgba(255, 255, 255, 0.8); + pointer-events: none; +} + +/* Font Awesome for icons */ +@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"); + +/* Estilos para a tabela */ +.stats-container { + display: flex; + justify-content: center; + margin-top: 20px; + padding: 0 10px; +} + +.stats-table { + width: 100%; + max-width: 400px; + border-collapse: collapse; + text-align: left; + font-family: "Press Start 2P", cursive; + color: var(--text-color); + background-color: var(--table-row-bg); + border: 2px solid var(--table-border); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +} + +.stats-table th, .stats-table td { + border: 2px solid var(--table-border); + padding: 10px; + text-align: center; +} + +.stats-table th { + background-color: var(--table-header-bg); + font-size: 1em; +} + +.stats-table td { + background-color: var(--table-row-bg); + position: relative; + font-size: 1.2em; +} + +.stats-table td .label { + font-weight: bold; +} + +.stats-table td .value { + display: block; + margin-top: 5px; +} + +.stats-table td .animated-number { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + animation: rise 1s ease-out; +} + +@keyframes rise { + 0% { + opacity: 0; + transform: translate(-50%, 50%); + } + 100% { + opacity: 1; + transform: translate(-50%, -50%); + } +} \ No newline at end of file