From bc57f5947c68c4a997454a235bd51c1f09241510 Mon Sep 17 00:00:00 2001 From: giteaadmin Date: Mon, 25 Aug 2025 19:25:55 -0400 Subject: [PATCH] Revert "fix: update root in launch.json" This reverts commit 0b8628a7074c7934017a9e058e91eec1731944a6. --- .vscode/launch.json | 2 +- src/css/style.css | 13 +------------ src/js/like-button.js | 13 ------------- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ae1b5dc..f30fde9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,7 @@ "port": 9229, "address": "localhost", "localRoot": "${workspaceFolder}", - "remoteRoot": "/app", + "remoteRoot": "/usr/src/app", "restart": false, "preLaunchTask": "docker-compose-up", "postDebugTask": "docker-compose-down" diff --git a/src/css/style.css b/src/css/style.css index 9da2bc3..332c3db 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -184,7 +184,7 @@ article li { } .like-icon { cursor: pointer; - transition: color 0.2s ease-in-out, transform 0.2s ease-in-out; + transition: color 0.2s ease-in-out; } .like-icon:hover { color: #fff; @@ -197,14 +197,3 @@ article li { .like-icon.liked:hover { transform: scale(1.15); } -.hint-animation { - animation: wobble 1s ease-in-out 2; -} -@keyframes wobble { - 0%, 100% { transform: translateX(0) rotate(0deg) scale(1); } - 15% { transform: translateX(-3px) rotate(-7deg) scale(1.1); } - 30% { transform: translateX(2px) rotate(5deg) scale(1.2); } - 45% { transform: translateX(-1px) rotate(-5deg) scale(1.2); } - 60% { transform: translateX(1px) rotate(3deg) scale(1.1); } - 75% { transform: translateX(0) rotate(-1deg) scale(1); } -} \ No newline at end of file diff --git a/src/js/like-button.js b/src/js/like-button.js index d5a7d10..1864e11 100644 --- a/src/js/like-button.js +++ b/src/js/like-button.js @@ -26,16 +26,6 @@ document.addEventListener('DOMContentLoaded', () => { const data = await response.json(); const isLiked = localStorage.getItem(storageKey) === 'true'; updateUI(isLiked, data.count || 0); - - // Check if the user has ever interacted with this button before - if (localStorage.getItem(storageKey) === null) { - // If not, add the animation class - likeIcon.classList.add('hint-animation'); - // Remove the animation after it runs to prevent it from looping - setTimeout(() => { - likeIcon.classList.remove('hint-animation'); - }, 2000); // Animation duration is 2s - } } catch (error) { console.error('Error fetching likes:', error); } @@ -43,9 +33,6 @@ document.addEventListener('DOMContentLoaded', () => { // Add click event listener to the icon likeIcon.addEventListener('click', async () => { - // Stop the hint animation if it's running - likeIcon.classList.remove('hint-animation'); - const isCurrentlyLiked = likeIcon.classList.contains('liked'); const method = isCurrentlyLiked ? 'DELETE' : 'POST';