From b577a7927875b4e287eb92b98085cd5f2948eb4b Mon Sep 17 00:00:00 2001 From: Norbert Maciaszek Date: Sun, 17 Aug 2025 18:53:15 +0200 Subject: [PATCH] Enhance UI components with gradient backgrounds and improved interactions: update Button, Dropdown, MovieCard layouts (Aurora, Minimal, Zeus), Pagination, Navbar, and Search components to utilize gradient styles for a more visually appealing design. Refactor Pagination to use the new Button component for consistency. --- src/components/atoms/Button/index.tsx | 2 +- src/components/atoms/Dropdown/index.tsx | 1 + .../atoms/MovieCard/layouts/AuroraLayout.tsx | 35 +++++++++++++------ .../atoms/MovieCard/layouts/MinimalLayout.tsx | 6 ++-- .../atoms/MovieCard/layouts/ZeusLayout.tsx | 2 +- src/components/atoms/Pagination/index.tsx | 15 ++++---- .../molecules/SearchMovies/index.tsx | 2 +- .../Navbar/components/Search/index.tsx | 11 +++--- src/components/organisms/Navbar/index.tsx | 14 ++++---- 9 files changed, 54 insertions(+), 34 deletions(-) diff --git a/src/components/atoms/Button/index.tsx b/src/components/atoms/Button/index.tsx index 66362a6..ffccd33 100644 --- a/src/components/atoms/Button/index.tsx +++ b/src/components/atoms/Button/index.tsx @@ -33,5 +33,5 @@ const styles = { primary: "block relative bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-500 hover:to-pink-500 text-white px-8 py-4 rounded-xl font-semibold text-lg shadow-2xl transition-all duration-300 hover:scale-105", glass: - "p-3 rounded-xl bg-white/10 backdrop-blur-sm border border-white/20 transition-all duration-300 hover:bg-white/20 hover:scale-105", + "p-3 rounded-xl bg-gradient-to-br from-white/15 via-white/8 to-white/12 border border-white/20 transition-all duration-300 hover:bg-gradient-to-br hover:from-white/25 hover:to-white/15 hover:scale-105 shadow-lg shadow-black/20", }; diff --git a/src/components/atoms/Dropdown/index.tsx b/src/components/atoms/Dropdown/index.tsx index 66fd7b4..9676320 100644 --- a/src/components/atoms/Dropdown/index.tsx +++ b/src/components/atoms/Dropdown/index.tsx @@ -36,6 +36,7 @@ export const Dropdown: FC = ({ items, defaultValue, callback }) => { className="absolute left-0 z-20 w-48 py-2 mt-2 origin-top-right bg-white rounded-md shadow-xl dark:bg-gray-800" style={{ opacity: isOpen ? 1 : 0, + pointerEvents: isOpen ? "auto" : "none", }} > {items.map((item) => ( diff --git a/src/components/atoms/MovieCard/layouts/AuroraLayout.tsx b/src/components/atoms/MovieCard/layouts/AuroraLayout.tsx index f0bbcae..5dee02a 100644 --- a/src/components/atoms/MovieCard/layouts/AuroraLayout.tsx +++ b/src/components/atoms/MovieCard/layouts/AuroraLayout.tsx @@ -57,7 +57,8 @@ export const AuroraLayout: FC = ({
{/* Main card container */} -
+
+
{/* Image section with sophisticated overlay */}
= ({ {!!vote_average && (
@@ -90,7 +91,7 @@ export const AuroraLayout: FC = ({ )} {/* Popularity indicator */} -
+
@@ -102,7 +103,7 @@ export const AuroraLayout: FC = ({ {/* Days left to release */} {(!isReleased || daysSinceRelease < 35) && (
-

+

{isReleased && daysSinceRelease < 35 && `od ${daysSinceRelease} dni`} @@ -118,16 +119,20 @@ export const AuroraLayout: FC = ({ <>

@@ -135,7 +140,7 @@ export const AuroraLayout: FC = ({ )}
@@ -222,10 +227,20 @@ export const AuroraLayout: FC = ({ {isExpanded && (
setIsExpanded(false)} >

{overview}

+
)} diff --git a/src/components/atoms/MovieCard/layouts/MinimalLayout.tsx b/src/components/atoms/MovieCard/layouts/MinimalLayout.tsx index 1a6d573..e2990d5 100644 --- a/src/components/atoms/MovieCard/layouts/MinimalLayout.tsx +++ b/src/components/atoms/MovieCard/layouts/MinimalLayout.tsx @@ -34,7 +34,7 @@ export const MinimalLayout: FC = ({ releaseDate, }) => { return ( -
+
= ({ {/* Rating badge */} {!!vote_average && ( -
+
★ {vote_average.toFixed(1)} @@ -52,7 +52,7 @@ export const MinimalLayout: FC = ({ )} {/* Action overlay */} -
+
{!alreadyInStore ? ( + )} -
  • +
  • {currentPage}/{totalPages}
  • {currentPage < totalPages && (
  • - +
  • )} diff --git a/src/components/molecules/SearchMovies/index.tsx b/src/components/molecules/SearchMovies/index.tsx index a1b1cbb..8bd8933 100644 --- a/src/components/molecules/SearchMovies/index.tsx +++ b/src/components/molecules/SearchMovies/index.tsx @@ -53,7 +53,7 @@ export const SearchList: FC = ({ query }) => {
    {isLoading && ( -
    +
    )} diff --git a/src/components/organisms/Navbar/components/Search/index.tsx b/src/components/organisms/Navbar/components/Search/index.tsx index fd031f1..93c94c1 100644 --- a/src/components/organisms/Navbar/components/Search/index.tsx +++ b/src/components/organisms/Navbar/components/Search/index.tsx @@ -57,8 +57,9 @@ export const Search = () => { {isSearchOpen && (
    {/* Aurora Background */} -
    -
    +
    +
    +
    {/* Close button */}