Skip to content
Open

ok #20

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion database/router/all_movies.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ async function searchmovie ( req,res ){
route.get('/allmovies',getAllMovies)
route.get('/searchmovie',searchmovie)

module.exports = route;
module.exports = route;
2 changes: 1 addition & 1 deletion imdb_frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>IMDB App</title>
</head>
<body style="background-color: black;">
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
2 changes: 2 additions & 0 deletions imdb_frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {Routes, Route} from "react-router-dom"
import SignUp from './Components/Signup/singup';
import Createaccount from './Components/Createaccount/createaccount';
import Login from './Components/Login/login';
import { SingleMovie } from './searchBar/SingleSearch';

function App() {
return (
Expand All @@ -27,6 +28,7 @@ function App() {
<Route path='/signup' element={<SignUp/>} ></Route>
<Route path='/createaccount' element={<Createaccount/>} ></Route>
<Route path='/login' element={<Login/>} ></Route>
{/* <Route path='/:_id' element={<SingleMovie/>} ></Route> */}
</Routes>


Expand Down
4 changes: 3 additions & 1 deletion imdb_frontend/src/Components/Homepage/homepage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import {Video} from "../../trailor&FooterComponent/video"
import css from "./homepage.css"
const Homepage =() => {
const user = useSelector((store)=>store.user)
console.log(user)
// console.log(id)
console.log( user)

function getLoggedIn(){
let token = JSON.parse(localStorage.getItem("token"));
console.log(token)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { useState } from "react";
if(!email.includes("@gmail.com")){
return alert('Please Fill Correct Email id')
}else if(password.length < 8){
return alert("Password length should be 8")
return alert("Password must be atleast 8 caracters")
}else if(password != resetpassowrd){
return alert("Password did not match")
}
Expand Down
Binary file added imdb_frontend/src/image/30days.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/Related news.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/amazonPrime.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/contribute.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/first.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/imdb copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/imdbPro copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/increasing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/meta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/netflix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/rate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/second.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/share.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/singleImdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/sponsr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/topRated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imdb_frontend/src/image/trailer.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
170 changes: 170 additions & 0 deletions imdb_frontend/src/searchBar/SingleSearch.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
// import { useParams } from "react-router-dom";
// import amazonPrime from "../image/amazonPrime.png";
// import increasing from "../image/increasing.png";
// import rate from '../image/rate.png';
// import share from '../image/share.png';
// import action from '../image/action.png';
// import singleImdb from '../image/singleImdb.png';
// import netflix from '../image/netflix.png';
// import meta from '../image/meta.png';
// import releatedNews from '../image/Related news.png';
// import first from '../image/first.png';
// import second from '../image/second.png';
// import contribute from '../image/contribute.png';
// import topRated from '../image/topRated.png';
// import days from '../image/30days.png';
// import sponsr from '../image/sponsr.png';
// import trailer from '../image/trailer.webp';
// import { Box, Image, Flex, Text, Link, Divider, Button } from '@chakra-ui/react';
// import { useState } from "react";

// export function SingleMovie() {
// let [data,setData]=useState({});
// // let {id} = useParams();
// // console.log(id)
// function getData(){
// fetch(`http//:localhost3000/allMovies/${id}`)
// .then((res)=>res)
// .then((e)=>setData(e))
// .catch((err)=>console.log(err))
// }

// // let data = {
// // fullTitle: "Spider Man:Far from home",
// // year: "2021",
// // imDbRating: "4.1",
// // image: "https://via.placeholder.com/300.png"
// // }
// return (
// <>
// <Box background={'black'}>
// <Image ml={60} w={'70%'} src={amazonPrime} padding='10px' />
// </Box>
// <Box backgroundColor='rgb(31 31 31 / 56)'>
// <Box >
// <Image w={'35%'} src={share} ml={'57%'} />
// </Box>
// <Flex ml={'7%'} backgroundColor='rgb(31 31 31 / 56)' color={'white'} gap={7}>
// <Box>
// <Text fontWeight={400} fontSize={'2rem'} fontFamily={'Roboto,Helvetica,Arial,sans-serif'}>{data.fullTitle}</Text>
// <p>{data.year}{' · '}{'PG-13 · 2h28m'}</p>

// </Box>

// <Box ml={'33%'} mt={'11px'} >
// <Text fontFamily='Roboto,Helvetica,Arial,sans-serif' fontWeight='600' fontSize='0.75rem'>
// IMDb RATING
// </Text>
// <Link fontSize={18} >⭐{data.imDbRating}</Link>
// </Box>
// <Box mt={'11px'} pl={'13px'}>
// <Text fontFamily='Roboto,Helvetica,Arial,sans-serif' fontWeight='600' fontSize='0.75rem'>
// YOUR RATING
// </Text>
// <Link ><Image pr={'25px'} w={'115px'} src={rate} /></Link>
// </Box>
// <Box mt={'11px'}>
// <Text fontFamily='Roboto,Helvetica,Arial,sans-serif' fontWeight='600' fontSize='0.75rem'>
// POPULARITY
// </Text>
// <Link><Image pr={'8px'} w={'105px'} src={increasing} /></Link>
// </Box>

// </Flex>

// <Flex ml={'7%'}>
// <Image h={'400px'} w={'300px'} src={data.image} />
// <Image h={'400px'} w={'900px'} src={trailer} />
// </Flex>
// <Flex mt={'15px'} gap={'7%'} color="white">
// <Box ml={'7%'}>
// <Link><Image w={'258px'} src={action} /></Link>
// <Text mt={'5px'} w={'700px'} textAlign='justify' color={'white'}>
// With Spider-Man's identity now revealed, Peter asks Doctor Strange for help. When a spell goes wrong, dangerous foes from other worlds start to appear, forcing Peter to discover what it truly means to be Spider-Man.
// </Text>

// <Divider mt={'10px'} orientation='horizontal' />

// <Text mt={'10px'}>
// <b>Director</b> <Link ml={'10px'} color={'skyblue'}>Jon Watts</Link>
// </Text>

// <Divider mt={'10px'} orientation='horizontal' />

// <Text mt={'10px'}>
// <b>Writers</b> <Link ml={'10px'} color={'skyblue'}>Chris McKenna · Erik Sommers · Stan Lee</Link>
// </Text>

// <Divider mt={'10px'} orientation='horizontal' />

// <Text mt={'10px'}>
// <b>Stars</b> <Link ml={'10px'} color={'skyblue'}>Tom Holland · Zendaya · Benedict Cumberbatch</Link>
// </Text>

// <Divider mt={'10px'} orientation='horizontal' />

// <Image mt={'10px'} w={'400px'} src={singleImdb} />

// </Box>
// <Box w={"400px"}>
// <Box h={'15%'} textAlign='left' backgroundColor={'#f5c518'} borderRadius='5px'>
// <Link >
// <Image mr={"60%"} w={'150px'} pt={'8px'} src={netflix} /><Text></Text>
// </Link>
// </Box>
// <Box mt={'10px'} h={'15%'} textAlign='left' backgroundColor={'#313131'} borderRadius='5px'>
// <Link >
// <Text ml={"15px"} pt={'10px'}>≡ More Watch Option</Text>
// </Link>
// </Box>
// <Box mt={'10px'} h={'15%'} textAlign='left' backgroundColor={'#313131'} borderRadius='5px'>
// <Link >
// <Text ml={"15px"} pt={'10px'}>+ Add to Watchlist</Text>
// </Link>

// </Box>
// <Link>
// <Image mt={'13px'} width={'300px'} src={meta} />
// </Link>
// </Box>
// </Flex>
// </Box>
// <Flex gap={'150px'} ml={'7%'}>
// <Box>
// <Link>
// <Image mt='5px' w={'800px'} src={days} />
// </Link>
// <Link>
// <Image mt='30px' w={'800px'} src={topRated} />
// </Link>
// </Box>
// <Box>
// <Image w={'300px'} src={sponsr} />
// </Box>
// </Flex>
// <Link >
// <Image mt={'50px'} ml={'7%'} w={'250px'} src={releatedNews} />
// </Link>
// <Flex mt={'30px'} ml={'7%'} gap={'40px'}>
// <Link>
// <Image w={'400px'} src={first} />
// </Link>
// <Link>
// <Image w={'400px'} src={second} />
// </Link>
// </Flex>
// <Box ml={'7%'} mt='30px'>
// <Image w={'350px'} src={contribute} />
// <Divider mt={'15px'} orientation="horizontal" />
// <Link>
// <Text fontSize={'20px'} mt={'15px'} ml={'10px'}><b>IMDb Answers: Help fill gaps in our data</b></Text>
// </Link>
// <Divider mt={'15px'} orientation="horizontal" />
// <Link>
// <Text fontSize={'20px'} mt={'15px'} ml={'10px'}><b>Learn more about contributing</b></Text>
// </Link>
// <Divider mt={'15px'} orientation="horizontal" />
// </Box>
// </>
// )
// }
82 changes: 57 additions & 25 deletions imdb_frontend/src/searchBar/inputContent.jsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,63 @@
import { Image,Box,Flex,Text } from '@chakra-ui/react'
// import { Image,Box,Flex,Text } from '@chakra-ui/react'
// // import abc from ''
// export function InputContent(props) {
// console.log('check',props)
// let data=props.props;
// return (
// <>

// {data.map((e)=>(
// <Box w='100%' color='white' background='black' margin='1px' padding='10px'>
// <Flex >
// <Image boxSize='80px' src={e.image} />
// <Box marginLeft='10px'>
// <Text fontWeight='bold' >
// {e.fullTitle}
// </Text>
// <Text fontSize='sm'>{e.year}</Text>
// {/* <Text>{e.crew.map((name)=>(name+' '))}</Text> */}
// {/* {e.crew.map((name,index)=>(
// (<span>{name}{index<e.crew.length-1?', ':''}</span>)

// ))} */}
// </Box>
// </Flex>
// </Box>
// ))}

// </>
// )
// }

import { Image, Box, Flex, Text, Link } from '@chakra-ui/react'
// import abc from ''
export function InputContent(props) {
// console.log(props)
let data=props.props;
console.log(props)
let data = props.props;
return (
<>

{data.map((e)=>(
<Box w='100%' color='white' background='black' margin='1px' padding='10px'>
<Flex >
<Image boxSize='80px' src={e.image} />
<Box marginLeft='10px'>
<Text fontWeight='bold' >
{e.fullTitle}
</Text>
<Text fontSize='sm'>{e.year}</Text>
{/* <Text>{e.crew.map((name)=>(name+' '))}</Text> */}
{e.crew.map((name,index)=>(
(<span>{name}{index<e.crew.length-1?', ':''}</span>)

))}
</Box>
</Flex>
</Box>
))}


{data.map((e) => (
<Link path={`/${e._id}`} key={e._id}>
<Box w='100%' color='white' background='black' margin='1px' padding='10px' >
<Flex >
<Image boxSize='80px' src={e.image} />
<Box marginLeft='10px'>
<Text fontWeight='bold' >
{e.fullTitle}
</Text>
<Text fontSize='sm'>{e.year}</Text>
{/* <Text>{e.crew.map((name)=>(name+' '))}</Text>
{e.crew.map((name, index) => (
(<span>{name}{index < e.crew.length - 1 ? ', ' : ''}</span>)

))} */}
</Box>
</Flex>
</Box>
</Link>
))}

</>
)
}

}
Loading