From 31809d952c8bafde3f63e2c1d952cc013149940e Mon Sep 17 00:00:00 2001 From: sct Date: Thu, 17 Sep 2020 00:19:01 +0000 Subject: [PATCH] feat(frontend): design updates for responsive titlecards --- src/components/Discover/index.tsx | 67 +++++++++++++++++++++---- src/components/Layout/Sidebar/index.tsx | 48 ++++++++++++++++++ src/components/MovieDetails/index.tsx | 10 ++-- src/components/Search/index.tsx | 2 +- src/components/Slider/index.tsx | 5 +- src/components/TitleCard/index.tsx | 7 +-- 6 files changed, 114 insertions(+), 25 deletions(-) diff --git a/src/components/Discover/index.tsx b/src/components/Discover/index.tsx index da81d8b60..eebe5d491 100644 --- a/src/components/Discover/index.tsx +++ b/src/components/Discover/index.tsx @@ -5,6 +5,7 @@ import TitleCard from '../TitleCard'; import { MediaRequest } from '../../../server/entity/MediaRequest'; import RequestCard from '../TitleCard/RequestCard'; import Slider from '../Slider'; +import Link from 'next/link'; interface MovieDiscoverResult { page: number; @@ -36,9 +37,25 @@ const Discover: React.FC = () => { <>
-

- Recent Requests -

+ + + Recent Requests + + + + +
{ />
-

- Popular Movies -

+ + + Popular Movies + + + + +
{ />
-

- Popular TV Shows -

+ + + Popular TV Shows + + + + +
+ + + ), + activeRegExp: /^\/requests/, + }, + { + href: '/settings', + name: 'Settings', + svgIcon: ( + + + + + ), + activeRegExp: /^\/settings/, + }, ]; const Sidebar: React.FC = ({ open, setClosed }) => { diff --git a/src/components/MovieDetails/index.tsx b/src/components/MovieDetails/index.tsx index c27d9e0e2..edd4f4604 100644 --- a/src/components/MovieDetails/index.tsx +++ b/src/components/MovieDetails/index.tsx @@ -235,26 +235,26 @@ const MovieDetails: React.FC = ({ movie }) => {

{data.overview}

-
-
+
+
Status {data.status}
-
+
Revenue {data.revenue}
-
+
Budget {data.budget}
-
+
Original Language {data.originalLanguage} diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 1385e7949..f9b1a2b53 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -81,7 +81,7 @@ const Search: React.FC = () => { No Results
)} -
    +
      {titles?.map((title) => { let titleCard: React.ReactNode; diff --git a/src/components/Slider/index.tsx b/src/components/Slider/index.tsx index 456ee8e8e..3cd5dba99 100644 --- a/src/components/Slider/index.tsx +++ b/src/components/Slider/index.tsx @@ -15,10 +15,7 @@ const Slider: React.FC = ({ isEmpty, }) => { return ( -
      +
      {items?.map((item, index) => (
      = ({ } return ( -
      +