From 88084fd9828de179ecb3c3113226ca3e7be3b353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CHenry-Hiles=E2=80=9D?= <“henry@henryhiles.com”> Date: Thu, 10 Nov 2022 11:21:54 -0500 Subject: [PATCH] Some final polishing touches --- src/pages/Actor.jsx | 4 +++- src/pages/Home.jsx | 14 +++++++++----- src/pages/Movie.jsx | 4 +++- src/pages/Ratings.jsx | 24 ++++++++++++++---------- src/styles/Actor.module.css | 13 +++++++++++++ src/styles/Home.module.css | 5 +++++ src/styles/Movie.module.css | 28 +++++++++++++++++++++------- src/styles/Ratings.module.css | 10 ++++++++++ src/styles/TopBar.module.css | 1 - 9 files changed, 78 insertions(+), 25 deletions(-) diff --git a/src/pages/Actor.jsx b/src/pages/Actor.jsx index c4be82f..7fb3234 100644 --- a/src/pages/Actor.jsx +++ b/src/pages/Actor.jsx @@ -122,7 +122,9 @@ const Actor = () => { className={styles.Movie} > -

{movie.title}

+

+ {movie.title} +

))} diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index f96aefe..ed03258 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -40,11 +40,15 @@ const Home = () => { return (
-
- {movies?.map((movie) => ( - - ))} -
+ {movies?.length ? ( +
+ {movies?.map((movie) => ( + + ))} +
+ ) : ( +

No results found

+ )}
) } diff --git a/src/pages/Movie.jsx b/src/pages/Movie.jsx index c4be4eb..73777cd 100644 --- a/src/pages/Movie.jsx +++ b/src/pages/Movie.jsx @@ -71,7 +71,9 @@ const Movie = () => {

{movie?.title} - {movie?.year}

-

{movie?.tagline}

+ {movie?.tagline && ( +

{movie?.tagline}

+ )}

More info

{ <>
-
-
- {ratings?.map((movie) => ( - setRating(rating, movie)} - /> - ))} -
+

Your rated movies

+ {ratings?.length ? ( +
+ {ratings?.map((movie) => ( + setRating(rating, movie)} + /> + ))} +
+ ) : ( +

No rated movies.

+ )}
) diff --git a/src/styles/Actor.module.css b/src/styles/Actor.module.css index 82d21f5..ab8c63a 100644 --- a/src/styles/Actor.module.css +++ b/src/styles/Actor.module.css @@ -8,6 +8,7 @@ .Top { display: flex; gap: 20px; + margin-bottom: 30px; } .Thumb { @@ -45,6 +46,14 @@ gap: 10px; } +.MovieTitle { + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; +} + .Collapsed { -webkit-line-clamp: 5; } @@ -81,3 +90,7 @@ .Movie img { height: 300px; } + +.Section h1 { + margin-top: 0; +} diff --git a/src/styles/Home.module.css b/src/styles/Home.module.css index a2b594a..305d3dc 100644 --- a/src/styles/Home.module.css +++ b/src/styles/Home.module.css @@ -14,3 +14,8 @@ gap: 20px; text-align: center; } + +.NoMovies { + color: white; + font-size: 2.5em; +} diff --git a/src/styles/Movie.module.css b/src/styles/Movie.module.css index af09998..4c384c3 100644 --- a/src/styles/Movie.module.css +++ b/src/styles/Movie.module.css @@ -14,17 +14,21 @@ .Thumb { position: absolute; - left: 40px; + left: 25px; bottom: 50px; box-shadow: 5px 5px 50px #00000030; } .Summary { - background: linear-gradient(#00000035, black); - height: 30%; + background: linear-gradient(#00000050, black); font-size: 20px; overflow: scroll; + padding: 10px; text-align: center; + display: flex; + flex-direction: column; + align-items: center; + gap: 20px; } .Overview { @@ -35,6 +39,14 @@ color: white; font-size: 1.3em; font-weight: bold; + display: flex; + gap: 5px; + flex-direction: column; + align-items: center; +} + +.More p { + margin: 0; } .More:not(:hover) { @@ -42,13 +54,15 @@ } .Title { - margin-top: 10px; - margin-bottom: 15px; - font-size: 70px; + font-size: 2.75em; + width: 40%; + margin: 0; } .Tagline { - font-size: 30px; + font-size: 1.65em; + width: 40%; + margin: 0; font-weight: bold; } diff --git a/src/styles/Ratings.module.css b/src/styles/Ratings.module.css index 0fabf03..a825f61 100644 --- a/src/styles/Ratings.module.css +++ b/src/styles/Ratings.module.css @@ -16,3 +16,13 @@ gap: 20px; text-align: center; } + +.Header { + font-size: 3em; + margin: 10px; +} + +.NoMovies { + width: 100%; + text-align: center; +} diff --git a/src/styles/TopBar.module.css b/src/styles/TopBar.module.css index 5dadc67..9f477de 100644 --- a/src/styles/TopBar.module.css +++ b/src/styles/TopBar.module.css @@ -52,7 +52,6 @@ font: inherit; width: 100%; height: 3em; - margin-top: 10px; border-radius: 10px; background-color: var(--secondary); }