-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
16,652 additions
and
154 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
html, | ||
body, | ||
.App { | ||
height: 100%; | ||
} | ||
|
||
.App { | ||
text-align: center; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,42 @@ | ||
import React, { FC } from 'react'; | ||
import Filters from '../components/Filters'; | ||
import Menu from '../components/Menu'; | ||
import MoviesList from '../components/MovieList'; | ||
import Sort from '../components/Menu'; | ||
import MoviesList, { MovieInterface } from '../components/MovieList'; | ||
import styled from "styled-components"; | ||
|
||
export const ContentStyled = styled.div` | ||
padding: 30px; | ||
This comment has been minimized.
Sorry, something went wrong. |
||
display: flex; | ||
flex-direction: column; | ||
background: #484848; | ||
flex-grow: 1; | ||
`; | ||
|
||
const ContentLayout: FC = () => { | ||
export const ContentHeaderStyled = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
width: 100%; | ||
border-bottom: 1px solid; | ||
align-items: flex-end; | ||
`; | ||
|
||
|
||
interface Content { | ||
moviesList: MovieInterface[]; | ||
} | ||
|
||
const ContentLayout: FC<Content> = ({ moviesList }) => { | ||
|
||
return ( | ||
<> | ||
<div> | ||
<Menu /> | ||
<ContentStyled> | ||
<ContentHeaderStyled> | ||
<Filters /> | ||
</div> | ||
<MoviesList /> | ||
</>); | ||
<Sort /> | ||
</ContentHeaderStyled> | ||
<MoviesList sortedMovies={moviesList} /> | ||
</ContentStyled>); | ||
} | ||
|
||
export default ContentLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
import { Button, TextField } from '@material-ui/core'; | ||
import React, { FC } from 'react'; | ||
import { HeaderStyled, SearchContainerStyled, HeaderTopStyled, TextFieldStyled } from './styles'; | ||
|
||
const Header: FC = () => { | ||
|
||
return (<>header</>); | ||
return ( | ||
<HeaderStyled> | ||
<HeaderTopStyled> | ||
<img width="180" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Netflix_2014_logo.svg/1200px-Netflix_2014_logo.svg.png" /> | ||
<Button color="primary" variant="contained">Add movie</Button> | ||
</HeaderTopStyled> | ||
<SearchContainerStyled> | ||
<TextFieldStyled id="standard-basic" variant="filled" color="secondary" /> | ||
<Button color="secondary" variant="contained">Search</Button> | ||
</SearchContainerStyled> | ||
</HeaderStyled> | ||
); | ||
} | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import styled from "styled-components"; | ||
import { TextField } from "@material-ui/core"; | ||
export const HeaderStyled = styled.div` | ||
padding: 30px; | ||
min-height: 200px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
background-image: url("https://bramptonist.com/wp-content/uploads/2018/06/netflix-image.jpg"); | ||
`; | ||
|
||
export const SearchContainerStyled = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
width: 80%; | ||
align-self: center; | ||
`; | ||
|
||
export const HeaderTopStyled = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
`; | ||
|
||
export const TextFieldStyled = styled(TextField)` | ||
background: #655757a3; | ||
flex-grow: 1; | ||
margin-right: 15px !important; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
import React, { FC } from 'react'; | ||
import { MovieInterface } from '../components/MovieList'; | ||
|
||
const MovieCard: FC<MovieCardInterface> = ({ title, description }) => { | ||
const MovieCard: FC<{ movie: MovieInterface }> = ({ movie }) => { | ||
|
||
return ( | ||
<div className="MovieCard"> | ||
<h3>{title}</h3> | ||
<h3>{description}</h3> | ||
<h3>{movie.title}</h3> | ||
<img width="200px" height="350px" src={movie.posterUrl} /> | ||
</div> | ||
); | ||
} | ||
|
||
interface MovieCardInterface { | ||
title: string, | ||
description: string, | ||
coverUrl: string, | ||
} | ||
|
||
|
||
export default MovieCard; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
import React, { FC } from 'react'; | ||
|
||
import { FormControl, InputLabel, Link, MenuItem, Select } from '@material-ui/core'; | ||
import React, { FC } from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
import './App.css'; | ||
const StyledSelect = styled(Select)` | ||
min-width: 180px; | ||
align-items: flex-end; | ||
border-bottom: 1px solid; | ||
`; | ||
|
||
const Sort: FC = () => { | ||
|
||
const sortOptions = [{ | ||
key: 'byDate', | ||
title: 'Release date' | ||
}] | ||
|
||
return ( | ||
<div> | ||
<FormControl> | ||
<InputLabel id="demo-simple-select-label">Sort By</InputLabel> | ||
<StyledSelect color="secondary" | ||
|
||
const Menu: FC = () => { | ||
id="demo-simple-select" | ||
|
||
return ( | ||
<> | ||
> | ||
{sortOptions.map(menu => (<MenuItem value={menu.key} key={menu.key}>{menu.title}</MenuItem>))} | ||
|
||
</> | ||
</StyledSelect> | ||
</FormControl> | ||
</div> | ||
); | ||
} | ||
|
||
export default Menu; | ||
export default Sort; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,43 @@ | ||
import React, { FC } from 'react'; | ||
import styled from 'styled-components'; | ||
import MovieCard from '../../MovieCard'; | ||
|
||
|
||
const MoviesList: FC = () => { | ||
|
||
|
||
const StyledMoviesList = styled.div` | ||
display: flex; | ||
flex-wrap: wrap; | ||
`; | ||
|
||
|
||
const MovieCardContainerStyled = styled.div` | ||
padding: 15px; | ||
`; | ||
export interface MovieInterface { | ||
This comment has been minimized.
Sorry, something went wrong.
i9or
|
||
title: string, | ||
description: string, | ||
posterUrl: string, | ||
id: string, | ||
genres?: ["Action", "Comedy", "Crime"] | ||
releaseDate?: "2018-02-28", | ||
} | ||
|
||
interface MoviesListInterface { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
sortedMovies: MovieInterface[]; | ||
} | ||
|
||
const MoviesList: FC<MoviesListInterface> = ({ sortedMovies }) => { | ||
|
||
return ( | ||
<> | ||
<StyledMoviesList> | ||
|
||
{sortedMovies.map(movie => ( | ||
<MovieCardContainerStyled> | ||
<MovieCard movie={movie}></MovieCard> | ||
</MovieCardContainerStyled>))} | ||
|
||
</> | ||
</StyledMoviesList> | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
body { | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', | ||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", | ||
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", | ||
sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
code { | ||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', | ||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", | ||
monospace; | ||
} | ||
|
||
html, | ||
body, | ||
#root { | ||
height: 100%; | ||
} | ||
|
||
.App { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
height: 100%; | ||
} |
Oops, something went wrong.
Consider adding
prettier
to the project. Code formatting is off in some places.