From 03f43d525e8b8fb1febbb9bdab3ca2a5d7cdfb30 Mon Sep 17 00:00:00 2001 From: keyboardreamer Date: Wed, 3 Jan 2024 21:21:27 +0800 Subject: [PATCH] feat: add more hover effects for better UX --- src/App.vue | 14 +++++++++----- src/components/FooterComponent.vue | 12 ++++++------ src/components/NavBar.vue | 30 +++++++++++++++++++++++------- src/components/VideoItem.vue | 14 +++++++++++--- 4 files changed, 49 insertions(+), 21 deletions(-) diff --git a/src/App.vue b/src/App.vue index c157314b..e3319c1d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -206,7 +206,7 @@ b { } .btn { - @apply py-2 lt-md:px-2 md:px-4 rounded cursor-pointer inline-block; + @apply py-2 lt-md:px-2 md:px-4 rounded cursor-pointer inline-block hover:bg-gray-500 hover:text-white; } .reset { @@ -238,8 +238,12 @@ b { @apply text-gray-400 bg-dark-400; } +.dark .btn { + @apply hover:bg-dark-300; +} + .input { - @apply px-2.5; + @apply px-2.5 rounded-md; } .input:focus { @@ -275,15 +279,15 @@ h2 { } .link { - @apply hover:(text-dark-300 underline underline-dark-300); + @apply focus:text-red-500 hover:text-red-500; } .link-secondary { - @apply hover:(text-dark-400 underline underline-dark-400); + @apply hover:text-dark-400 focus:text-dark-400 underline underline-dark-400; } .dark .link { - @apply hover:(text-gray-300 underline underline-gray-300); + @apply focus:text-red-400 hover:text-red-400; } .dark .link-secondary { diff --git a/src/components/FooterComponent.vue b/src/components/FooterComponent.vue index 7f9f711e..5701a06d 100644 --- a/src/components/FooterComponent.vue +++ b/src/components/FooterComponent.vue @@ -2,27 +2,27 @@ diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 0e7fc6ec..3802944a 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -39,25 +39,25 @@ @@ -233,6 +233,22 @@ export default { @apply mx-1; } +#search-btn:hover { + @apply bg-red-400; +} + +.dark #search-btn:hover { + @apply bg-dark-100; +} + +.nav-link { + @apply hover:text-red-500; +} + +.dark .nav-link { + @apply hover:text-red-400; +} + @media screen and (max-width: 848px) { #search-btn { display: none; diff --git a/src/components/VideoItem.vue b/src/components/VideoItem.vue index 49f73d80..816376d2 100644 --- a/src/components/VideoItem.vue +++ b/src/components/VideoItem.vue @@ -1,7 +1,7 @@