Skip to content
Open
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
Binary file modified .DS_Store
Binary file not shown.
57 changes: 42 additions & 15 deletions database/router/all_movies.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,49 @@ async function getAllMovies ( req,res ){
}
}

async function searchSingleMovie ( req,res ){
let { q } = req.query
console.log(q)
let id=q
// q=q.toLowerCase()
try {
let data = await allmoviesModel.findOne({id})

return res.status(200).send({
data,
})
} catch (error) {
return res.status(404).send({
error:"error in fetching data"
})
}
}


// async function get_Top_pics ( req,res ){
// try {
// let data = await TopMoviesModel.find()
// console.log(data)
// return res.status(200).send({
// data,
// })
// } catch (error) {
// return res.status(404).send({
// error:"error in fetching data"
// })
// }
// }
// route.get('/movies/Top_pics',get_Top_pics)
async function searchmovie ( req,res ){
let { q } = req.query
q=q.toLowerCase()
if(q.length==0){
return res.send({
data:[]
})
}
try {
let data = await allmoviesModel.find()
data = data.filter((ele)=>{
let check = ele.fullTitle.toLowerCase()
return check.includes(q)
})
return res.status(200).send({
data,
})
} catch (error) {
return res.status(404).send({
error:"error in fetching data"
})
}
}
route.get('/searchSingleMovie',searchSingleMovie)
route.get('/allmovies',getAllMovies)
route.get('/searchmovie',searchmovie)

module.exports = route;
Binary file modified imdb_frontend/.DS_Store
Binary file not shown.
8 changes: 4 additions & 4 deletions imdb_frontend/allMovies.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{"allMovies":[
{ "id":"1",
{ "_id":"1",
"title": "Spiderman1",
"fullTitle": "Spider-Man:No Way Home",
"year": "2021",
"image":"https://bit.ly/sage-adebayo",
"crew":["Tom Holland","Zendaya" ]
},
{ "id":"2",
{ "_id":"2",
"title": "Spiderman2",
"fullTitle": "Spider-Man:Far From Home",
"year": "2021",
"image":"https://bit.ly/sage-adebayo",
"crew":["Tom Holland","Zendaya"]
},
{ "id":"3",
{ "_id":"3",
"title": "Batman1",
"fullTitle": "Spider-Man:No Way Home",
"year": "2021",
"image":"https://bit.ly/sage-adebayo",
"crew":["Tom Holland","Zendaya" ]
},
{ "id":"4",
{ "_id":"4",
"title": "Superman2",
"fullTitle": "Spider-Man:Far From Home",
"year": "2021",
Expand Down
Binary file modified imdb_frontend/src/.DS_Store
Binary file not shown.
24 changes: 0 additions & 24 deletions imdb_frontend/src/App.js

This file was deleted.

44 changes: 27 additions & 17 deletions imdb_frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
import React from 'react';

import {
ChakraProvider,
Box,
Text,
Link,
VStack,
Code,
Grid,

theme,
} from '@chakra-ui/react';
import { ColorModeSwitcher } from './ColorModeSwitcher';
import { Logo } from './Logo';
import Signup_login from './components/SIgn_login';
import Createaccount from './components/Createaccount/createaccount';
// import Homepage from "./components/Homepage/homepage"
// import { Video } from './trailor&FooterComponent/video'
// import { Footer } from './trailor&FooterComponent/footer'
import { Search } from './searchBar/search';
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 (
<ChakraProvider theme={theme}>
<Box textAlign="center" fontSize="xl">

{/* {
Signup_login()
} */}
<Createaccount/>
</Box>

{/* { video()} */}
<Search />
<Routes>
{/* <Route path='/' element={<Homepage />} /> */}
{/* <Route path='/trailer/:id' element={<Video />} /> */}
{/* <Route path='/signup' element={<SignUp />} /> */}
{/* <Route path='/createaccount' element={<Createaccount />} /> */}
{/* <Route path='/login' element={<Login />} /> */}
<Route path='/:id' element={<SingleMovie />} />
</Routes>



{/* {Footer()} */}
</ChakraProvider>
);
}

export default App;
export default App;
112 changes: 56 additions & 56 deletions imdb_frontend/src/components/Login/login.jsx
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
import React from "react";
// import React from "react";

import "./login.css"
// import "./login.css"

import imdblogo from "./imdbcreatelogo.png"
// import imdblogo from "./imdbcreatelogo.png"


import {
FormControl,
FormLabel,
FormErrorMessage,
FormHelperText,
Input
} from '@chakra-ui/react'
// import {
// FormControl,
// FormLabel,
// FormErrorMessage,
// FormHelperText,
// Input
// } from '@chakra-ui/react'

function Login() {
const [input, setInput] = React.useState('')
// function Login() {
// const [input, setInput] = React.useState('')




return (
<div className="container_creareaccount_login">
<div className="fromcontainer_login">
<img src={imdblogo} alt="" />
<div className="input_container_login">
<div className="createheadder_login">
<h1 style={{"fontSize":"30px"}}>Sign-In</h1>
</div>
// return (
// <div className="container_creareaccount_login">
// <div className="fromcontainer_login">
// <img src={imdblogo} alt="" />
// <div className="input_container_login">
// <div className="createheadder_login">
// <h1 style={{"fontSize":"30px"}}>Sign-In</h1>
// </div>

<div className="inputbox_login">
<FormLabel style={{"fontWeight":"100",fontSize:"14px"}}>Email</FormLabel>
<Input placeholder='' style={{"height":"30px","border":"1px solid black","width":"139%","borderRadius":"3px","padding":"5px"}}/>
// <div className="inputbox_login">
// <FormLabel style={{"fontWeight":"100",fontSize:"14px"}}>Email</FormLabel>
// <Input placeholder='' style={{"height":"30px","border":"1px solid black","width":"139%","borderRadius":"3px","padding":"5px"}}/>

</div>
<div className="inputbox_login">
<FormLabel style={{fontWeight:"100",fontSize:"14px"}}>Password</FormLabel>
<Input style={{"height":"30px","border":"0.5px solid black","width":"139%","borderRadius":"3px","padding":"5px"}} type="password"/>
// </div>
// <div className="inputbox_login">
// <FormLabel style={{fontWeight:"100",fontSize:"14px"}}>Password</FormLabel>
// <Input style={{"height":"30px","border":"0.5px solid black","width":"139%","borderRadius":"3px","padding":"5px"}} type="password"/>


</div>
// </div>

<div className="login">
<button>Sign-in</button>
</div>
<div className="alreadyhaveaccount_login">
<input type="checkbox" name="" id="" /> <p>Already have an account? <span><a href=""> Details ►</a></span> </p>
</div>
<div className="other">
// <div className="login">
// <button>Sign-in</button>
// </div>
// <div className="alreadyhaveaccount_login">
// <input type="checkbox" name="" id="" /> <p>Already have an account? <span><a href=""> Details ►</a></span> </p>
// </div>
// <div className="other">

<p>------------------------------- New to IMDb?------------------------------- </p>
</div>
<div className="login_create">
<button>Create your IMDb account</button>
</div>
</div>
<div className="help_contaire_login">
<div className="a_tag_login">
<a href="">Help</a>
<a href="">Conditions of Use</a>
<a href="">Privacy Notice</a>
</div>
<div className="amazonname_login">
<p>© 1996-2022, Amazon.com, Inc. or its affiliates</p>
</div>
</div>
</div>
</div>
)
}
// <p>------------------------------- New to IMDb?------------------------------- </p>
// </div>
// <div className="login_create">
// <button>Create your IMDb account</button>
// </div>
// </div>
// <div className="help_contaire_login">
// <div className="a_tag_login">
// <a href="">Help</a>
// <a href="">Conditions of Use</a>
// <a href="">Privacy Notice</a>
// </div>
// <div className="amazonname_login">
// <p>© 1996-2022, Amazon.com, Inc. or its affiliates</p>
// </div>
// </div>
// </div>
// </div>
// )
// }

export default Login
// export default Login
Binary file modified imdb_frontend/src/image/.DS_Store
Binary file not shown.
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/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.
17 changes: 11 additions & 6 deletions imdb_frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ import { ColorModeScript } from '@chakra-ui/react';
import React, { StrictMode } from 'react';
import * as ReactDOM from 'react-dom/client';
import App from './App';
import {BrowserRouter as Router} from "react-router-dom";
import reportWebVitals from './reportWebVitals';
import * as serviceWorker from './serviceWorker';

// import { Provider } from 'react-redux';
// import { store } from './Redux/store';
import { BrowserRouter } from 'react-router-dom';
const container = document.getElementById('root');
const root = ReactDOM.createRoot(container);

root.render(
<StrictMode>
<ColorModeScript />
<App />
</StrictMode>
<Router>
{/* <Provider store={store}> */}
<ColorModeScript />
<App />
{/* </Provider> */}
</Router>
);

// If you want your app to work offline and load faster, you can change
Expand All @@ -23,4 +28,4 @@ serviceWorker.unregister();
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
reportWebVitals();
Loading