diff --git a/.gitignore b/.gitignore index dfa9f34..2c7bc6b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ /.pnp .pnp.js node_modules/ +uploads/ +images/ # testing diff --git a/frontend/public/css/custom.css b/frontend/public/css/custom.css index 220890f..a7b0366 100644 --- a/frontend/public/css/custom.css +++ b/frontend/public/css/custom.css @@ -1,4 +1,4 @@ -.row { +/* .row { display: flex; flex-wrap: wrap; padding: 5em; @@ -13,7 +13,7 @@ width: 100%; display: none; border: 2px solid #e5e6e6; - } + } */ .avatar{ max-width: 80px; @@ -31,7 +31,8 @@ background-image: url("https://images.unsplash.com/photo-1469212044023-0e55b4b9745a?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1510&q=8"); background-repeat: no-repeat; background-size:cover; - background-position: center center; + background-position: center center; + height: 100vh; } .bg-image-login{ @@ -40,6 +41,7 @@ background-size:cover; background-position: center center; height: 100vh; + } \ No newline at end of file diff --git a/frontend/public/index.html b/frontend/public/index.html index 19c52e6..fa9b761 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -1,52 +1,49 @@ - - - - - - Vision - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - + + + + + + Vision + + + + + + + + + + + + + + + + +
+
+ + + + + + + \ No newline at end of file diff --git a/frontend/src/components/ImageTable/ImageCard/CardFront/index.js b/frontend/src/components/ImageTable/ImageCard/CardFront/index.js deleted file mode 100644 index 74bcc57..0000000 --- a/frontend/src/components/ImageTable/ImageCard/CardFront/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from "react"; -import "./style.css"; -const CardFront = ({ - coverImage, - description, -}) => { - - return ( -
- {"cover"}/ - - {/*
-

- {description} -

-
*/} -
- ); -}; -export default CardFront; - diff --git a/frontend/src/components/ImageTable/ImageCard/CardFront/style.css b/frontend/src/components/ImageTable/ImageCard/CardFront/style.css deleted file mode 100644 index 7a1f65c..0000000 --- a/frontend/src/components/ImageTable/ImageCard/CardFront/style.css +++ /dev/null @@ -1,97 +0,0 @@ -.front { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 87%; - backface-visibility: hidden; - } - - .front > img { - width: 100%; - height: 56%; - /* border-radius: 25px; */ - } - - .front > span { - position: absolute; - display: block; - color: white; - background: rgb(230, 158, 24); - width: 50px; - height: 50px; - padding: 13px; - border-radius: 50%; - text-align: center; - right: -10px; - top: -10px; - backface-visibility: hidden; - font-weight: 700; - } - - .card-footer { - padding: 15px; - position: absolute; - border-radius: 5px; - bottom: 0; - left: 0; - right: 0; - height: 134px; - background: #1e1b26; - } - - /* .card-footer > .trailer-btn, - i { - color: rgb(240, 98, 73); - border-color: rgb(240, 98, 73); - transition: 0.15s ease-in-out; - } - - .card-footer > i { - position: absolute; - bottom: 20px; - right: 15px; - } - - .card-footer > .trailer-btn { - border: 1px solid; - position: absolute; - padding: 3px 7px; - background: transparent; - border-radius: 5px; - bottom: 20px; - left: 15px; - } - - .card-footer > .trailer-btn:hover { - text-decoration: none; - cursor: pointer; - background: rgb(240, 98, 73); - border-color: rgb(240, 98, 73); - color: white; - } - - .card-footer > h4 { - margin: 2px 0; - text-align: left; - font-size: 13px; - font-weight: bold; - color: white; - } - - .card-footer > h5 { - margin: 2px 0; - text-align: left; - font-size: 13px; - font-weight: bold; - color: white; - } */ - - .card-footer > p { - text-align: left; - font-weight: 100; - font-size: 11px; - color: rgb(255, 255, 255); - } - - \ No newline at end of file diff --git a/frontend/src/components/ImageTable/ImageCard/index.js b/frontend/src/components/ImageTable/ImageCard/index.js deleted file mode 100644 index b276bde..0000000 --- a/frontend/src/components/ImageTable/ImageCard/index.js +++ /dev/null @@ -1,33 +0,0 @@ -import React from "react"; - -import FlippingCardFront from "./CardFront"; -import "./style.css"; - -export default function ImageCard({ image }) { -// const { -// image, -// // description, -// } = image; -// console.log("tableimage"); -// console.log(image) - - -const encodedImage = new Buffer(image.img_buffer, "binary").toString("base64"); -const coverImage = "data:image/jpeg;base64," + encodedImage; - -// function flipCard(cardID) { -// const card = document.getElementById(`${cardID}`); -// card.classList.toggle("flipped"); -// } - - return ( -
- {/*
flipCard(_id)}> */} - -
- ); -} - diff --git a/frontend/src/components/ImageTable/ImageCard/style.css b/frontend/src/components/ImageTable/ImageCard/style.css deleted file mode 100644 index 6c99e12..0000000 --- a/frontend/src/components/ImageTable/ImageCard/style.css +++ /dev/null @@ -1,24 +0,0 @@ -.card-container { - position: relative; - width: 250px; - height: 350px; - perspective: 1000px; - cursor: pointer; - } - - /* .card-wrapper { - perspective: 1000px; - position: relative; - top: 0; - left: 0; - width: 100%; - height: 100%; - transform-style: preserve-3d; - transition: all 0.6s ease; - } - - .flipped { - transform: rotateY(180deg); - } */ - - \ No newline at end of file diff --git a/frontend/src/components/ImageTable/index.js b/frontend/src/components/ImageTable/index.js index 4e84f52..4198aca 100644 --- a/frontend/src/components/ImageTable/index.js +++ b/frontend/src/components/ImageTable/index.js @@ -1,27 +1,35 @@ import React from "react"; -import ImageCard from "./ImageCard"; + import "./style.css"; -export default function ImageTable({ images, currentPage, pageSize ,genre}) { +export default function ImageTable({ images, currentPage, pageSize, genre }) { // console.log("genreimages"); // console.log(images); const currentImages = images.slice( (currentPage - 1) * pageSize, pageSize * currentPage ); - // console.log("images present in image table "); // console.log(currentImages); - return ( -
+ return ( +
{!!images && - currentImages.map((image) => ( - - ))} + currentImages.map((image) => { + const encodedImage = new Buffer(image.img_buffer, "binary").toString( + "base64" + ); + const coverImage = "data:image/jpeg;base64," + encodedImage; + return(
+ {"cover"} +
+ + + + ) + })}  
); } - diff --git a/frontend/src/components/ImageTable/style.css b/frontend/src/components/ImageTable/style.css index 0d321aa..570ada3 100644 --- a/frontend/src/components/ImageTable/style.css +++ b/frontend/src/components/ImageTable/style.css @@ -1,11 +1,27 @@ -.movies-grid { +.img-grid { display: grid; grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); /* grid-row-gap: 20px; */ - grid-column-gap: 25px; + grid-column-gap: 16px; justify-items: center; } + + .gallery-img { + max-width:100%; + height:auto; + object-fit: contain; + margin:8px; + box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12); + } + +.card-container { + position: relative; + width: 250px; + height: 250px; + perspective: 1000px; + cursor: pointer; +} @media only screen and (max-width: 1400px) { .movies-grid { @@ -25,4 +41,100 @@ } } + .front { + position: absolute; + top: 0; + left: 0; + width: 100%; + backface-visibility: hidden; + } + + .front > img { + width: 100%; + height: 56%; + /* border-radius: 25px; */ + } + + .front > span { + position: absolute; + display: block; + color: white; + background: rgb(230, 158, 24); + width: 50px; + height: 50px; + padding: 13px; + border-radius: 50%; + text-align: center; + right: -10px; + top: -10px; + backface-visibility: hidden; + font-weight: 700; + } + + .card-footer { + padding: 15px; + position: absolute; + border-radius: 5px; + bottom: 0; + left: 0; + right: 0; + height: 134px; + background: #1e1b26; + } + + /* .card-footer > .trailer-btn, + i { + color: rgb(240, 98, 73); + border-color: rgb(240, 98, 73); + transition: 0.15s ease-in-out; + } + + .card-footer > i { + position: absolute; + bottom: 20px; + right: 15px; + } + + .card-footer > .trailer-btn { + border: 1px solid; + position: absolute; + padding: 3px 7px; + background: transparent; + border-radius: 5px; + bottom: 20px; + left: 15px; + } + + .card-footer > .trailer-btn:hover { + text-decoration: none; + cursor: pointer; + background: rgb(240, 98, 73); + border-color: rgb(240, 98, 73); + color: white; + } + + .card-footer > h4 { + margin: 2px 0; + text-align: left; + font-size: 13px; + font-weight: bold; + color: white; + } + + .card-footer > h5 { + margin: 2px 0; + text-align: left; + font-size: 13px; + font-weight: bold; + color: white; + } */ + + .card-footer > p { + text-align: left; + font-weight: 100; + font-size: 11px; + color: rgb(255, 255, 255); + } + + \ No newline at end of file diff --git a/frontend/src/components/common/ListGroup/index.js b/frontend/src/components/common/ListGroup/index.js index 52bd917..47486f4 100644 --- a/frontend/src/components/common/ListGroup/index.js +++ b/frontend/src/components/common/ListGroup/index.js @@ -6,7 +6,7 @@ function resolveAll(options,onChange){ return(
{/* */} -
@@ -19,7 +19,7 @@ const ListGroup = props => { let { onChange, options } = props; // console.log(options); return ( -
+
{resolveAll(options,onChange)} @@ -30,7 +30,7 @@ const ListGroup = props => { if(ele.name !== "All"){ return( -
); diff --git a/frontend/src/pages/MainPage/header-index.js b/frontend/src/pages/MainPage/header-index.js index 47ee1d3..f50d033 100644 --- a/frontend/src/pages/MainPage/header-index.js +++ b/frontend/src/pages/MainPage/header-index.js @@ -7,144 +7,157 @@ import "../assets/css/mdb.lite.css"; import "../assets/css/mdb.lite.min.css"; import "../assets/css/mdb.min.css"; import "../assets/css/style.min.css"; -import FileUpload from "./file_upload" -import { Redirect } from 'react-router-dom'; +import FileUpload from "./file_upload"; +import { Redirect } from "react-router-dom"; import { connect } from "react-redux"; // import {Helmet} from 'react-helmet'; -import { userDetail,signOut} from "../../actions/authAction"; +import { userDetail, signOut } from "../../actions/authAction"; // import {appendScript} from "../appendScript"; import MultiDropDown from "./MultiDropDown"; // import "../assets/js/mdb.js"; -class Header extends React.Component{ - state = { - logout_status : localStorage.getItem('loggedIn'), - }; +class Header extends React.Component { + state = { + logout_status: localStorage.getItem("loggedIn"), + }; - componentDidMount(){ - // const fpath = "/assets/"; - // let scripts = [ - // "js/jquery-3.4.1.min.js" - // // "js/popper.min.js", - // // "js/bootstrap.min.js", - // // "js/mdb.min.js", - // // "js/dropdown_label_select.js", - // ]; - // for(let i = 0;i { - this.setState({logout_status : false}); - localStorage.setItem('loggedIn', false); - this.props.signOut(); - } + LogOut = () => { + this.setState({ logout_status: false }); + localStorage.setItem("loggedIn", false); + this.props.signOut(); + }; - render(){ - const { authMessage,userData} = this.props; + render() { + const { authMessage, userData } = this.props; - let coverImage = img; + let coverImage = img; - if(userData.user_image !== undefined){ - const encodedImage = new Buffer(userData.user_image, "binary").toString("base64"); - coverImage = "data:image/jpeg;base64," + encodedImage; - } - if(coverImage === "data:image/jpeg;base64,"){coverImage = img;} - - - if(!this.state.logout_status){ - return - } + if (userData.user_image !== undefined) { + const encodedImage = new Buffer(userData.user_image, "binary").toString( + "base64" + ); + coverImage = "data:image/jpeg;base64," + encodedImage; + } + if (coverImage === "data:image/jpeg;base64,") { + coverImage = img; + } - return( -
+ if (!this.state.logout_status) { + return ; + } -