From a259226273193a1f6636cd7c6d0f28e33b4514d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Delattre?= Date: Tue, 28 May 2019 22:30:36 +0200 Subject: [PATCH] Add the show fanart in the show detail view --- frontend/js/components/shows/details.js | 58 ++++++++++++++++--------- frontend/scss/app.scss | 12 +++++ 2 files changed, 50 insertions(+), 20 deletions(-) diff --git a/frontend/js/components/shows/details.js b/frontend/js/components/shows/details.js index a43027a..67c011a 100644 --- a/frontend/js/components/shows/details.js +++ b/frontend/js/components/shows/details.js @@ -38,20 +38,23 @@ const ShowDetails = (props) => { } return ( -
-
- -
+ + +
+
+ +
+
); } ShowDetails.propTypes = { @@ -65,18 +68,33 @@ ShowDetails.propTypes = { }; export default connect(mapStateToProps, mapDispatchToProps)(ShowDetails); +const Fanart = (props) => ( +
+ +
+) +Fanart.propTypes = { + url: PropTypes.string, +} + const Header = (props) => ( -
-
-
- +
+
+
+
-
+
{props.data.get("title")}

{props.data.get("year")}

{props.data.get("rating")}

-

{props.data.get("plot")}

+

{props.data.get("plot")}

diff --git a/frontend/scss/app.scss b/frontend/scss/app.scss index 66227c5..d097c4a 100644 --- a/frontend/scss/app.scss +++ b/frontend/scss/app.scss @@ -19,6 +19,18 @@ body { padding-top: $body-padding-top; } +.object-fit-cover { + object-fit: cover; +} + +.object-position-top { + object-position: top; +} + +.mh-40vh { + max-height: 40vh; +} + // Remove borders from the navbar .navbar-toggler, div.show.dropdown.nav-item > div {