Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Movie Finder #1

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9d45d83
Remove unnecessary code and install necessary packages
jcy2704 Apr 7, 2021
77c78f5
Remove yarn.lock
jcy2704 Apr 7, 2021
c364d11
Add node version to package.json
jcy2704 Apr 7, 2021
8dbe413
Fix React error
jcy2704 Apr 7, 2021
4c67629
Divide into folders
jcy2704 Apr 7, 2021
dbe7d92
Add fonts and scss
jcy2704 Apr 7, 2021
77db71f
Start Routes
jcy2704 Apr 7, 2021
680408e
Add api calls
jcy2704 Apr 7, 2021
6ea1282
Reinstall packages
jcy2704 Apr 7, 2021
a91efb0
Add linters
jcy2704 Apr 7, 2021
623bd41
Add actions and start reducers
jcy2704 Apr 7, 2021
dc801bc
Finish reducers methods
jcy2704 Apr 7, 2021
66e76fe
Fix api issues
jcy2704 Apr 7, 2021
59b074b
Create hero component
jcy2704 Apr 7, 2021
59c3be3
Add first movie
jcy2704 Apr 7, 2021
c852e99
Finish hero section
jcy2704 Apr 8, 2021
751a166
Add random int helper
jcy2704 Apr 8, 2021
2204d98
Divide genres list from method
jcy2704 Apr 8, 2021
61eedc6
Add video api
jcy2704 Apr 8, 2021
ec5c0db
Add loading screen and start popular section
jcy2704 Apr 8, 2021
ce0f699
Create new reducer for trending only
jcy2704 Apr 8, 2021
aa19966
Finish Popular catalogue
jcy2704 Apr 8, 2021
59915e8
Finish top rated and upcoming
jcy2704 Apr 8, 2021
8752dad
Add more api calls for popular
jcy2704 Apr 8, 2021
fa1cf50
Solve environmental variables issue
jcy2704 Apr 8, 2021
26b11ca
Add Navigation and styling
jcy2704 Apr 9, 2021
9fab3cc
Start filter modal
jcy2704 Apr 9, 2021
ead435c
Finish filter modal
jcy2704 Apr 9, 2021
a088357
Add reset button to filter modal
jcy2704 Apr 9, 2021
522a3b4
Add modals for movies
jcy2704 Apr 9, 2021
72b0d34
Add close icon for movie modals
jcy2704 Apr 9, 2021
c9bf0d3
Refactor some code to helpers
jcy2704 Apr 9, 2021
6c476f9
Refactor api methods
jcy2704 Apr 9, 2021
77e7289
Finish styling filter modal
jcy2704 Apr 9, 2021
954ecc9
Finish filters
jcy2704 Apr 10, 2021
40d5cf7
Add more movies
jcy2704 Apr 10, 2021
b6cf893
Add modals container
jcy2704 Apr 10, 2021
5932329
Update README.md
jcy2704 Apr 10, 2021
201928c
Update README.md
jcy2704 Apr 10, 2021
92ac6ed
Fix linters
jcy2704 Apr 10, 2021
18e3a58
Update README.md
jcy2704 Apr 10, 2021
aa60d52
Change favicon
jcy2704 Apr 11, 2021
4053ac3
Update README.md
jcy2704 Apr 11, 2021
3fdf87d
Fix trailer links
jcy2704 Apr 11, 2021
db0944f
Update README.md
jcy2704 Apr 11, 2021
041117d
Update README.md
jcy2704 Apr 11, 2021
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
Prev Previous commit
Next Next commit
Add loading screen and start popular section
  • Loading branch information
jcy2704 committed Apr 8, 2021
commit ec5c0dbc96599a4f9ffd98951da757537ca5db05
22 changes: 11 additions & 11 deletions public/env.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
window.env = {
"TRENDING": "https://api.themoviedb.org/3/trending/movie/week",
"DETAILS": "https://api.themoviedb.org/3/movie/",
"LATEST": "https://api.themoviedb.org/3/movie/latest",
"NOW_PLAYING": "https://api.themoviedb.org/3/movie/now_playing",
"POPULAR": "https://api.themoviedb.org/3/movie/popular",
"TOP_RATED": "https://api.themoviedb.org/3/movie/top_rated",
"UPCOMING": "https://api.themoviedb.org/3/movie/upcoming",
"API_KEY": "42cea6b932576c057f794e0128e498c2",
"IMG_URL": "https://image.tmdb.org/t/p/original",
"POSTER_URL": "https://image.tmdb.org/t/p/w342"
};
TRENDING: 'https://api.themoviedb.org/3/trending/movie/week',
DETAILS: 'https://api.themoviedb.org/3/movie/',
LATEST: 'https://api.themoviedb.org/3/movie/latest',
NOW_PLAYING: 'https://api.themoviedb.org/3/movie/now_playing',
POPULAR: 'https://api.themoviedb.org/3/movie/popular',
TOP_RATED: 'https://api.themoviedb.org/3/movie/top_rated',
UPCOMING: 'https://api.themoviedb.org/3/movie/upcoming',
API_KEY: '42cea6b932576c057f794e0128e498c2',
IMG_URL: 'https://image.tmdb.org/t/p/original',
POSTER_URL: 'https://image.tmdb.org/t/p/w342',
};
8 changes: 7 additions & 1 deletion src/components/BigHero.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ const BigHero = ({
<h1 className="title">{title}</h1>

<div className="d-flex genres">
{genres.map(genre => <p key={genre}>{genre}</p>)}
{genres.map(genre => (
<p key={genre}>
<button type="button" onClick={() => console.log('er')} name={genre}>
{genre}
</button>
</p>
))}
<p className="rating">
<FontAwesomeIcon className="rating-star" icon={faStar} />
{rating}
Expand Down
7 changes: 7 additions & 0 deletions src/components/Catalogue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

const Catalogue = () => {

};

export default Catalogue;
19 changes: 19 additions & 0 deletions src/components/Loading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import PropTypes from 'prop-types';

const Loading = ({ nothing }) => (

<div className={`${nothing ? 'nothing' : ''}`}>
<div className="loading d-flex justify-content-center align-items-center">
<div className="spinner-grow text-warning" role="status">
<span className="sr-only">Loading...</span>
</div>
</div>
</div>
);

Loading.propTypes = {
nothing: PropTypes.bool.isRequired,
};

export default Loading;
7 changes: 7 additions & 0 deletions src/containers/Popular.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

const Popular = () => {

};

export default Popular;
3 changes: 2 additions & 1 deletion src/containers/Trending.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { topTrending } from '../helpers/api_methods/api';
import { loadTrending, loadVideos } from '../actions';
import BigHero from '../components/BigHero';
import GenreList from '../helpers/genres/genre';
import Loading from '../components/Loading';

const Trending = ({ movie, loader, trailer }) => {
const [isLoading, setLoading] = useState(true);
Expand All @@ -20,7 +21,7 @@ const Trending = ({ movie, loader, trailer }) => {
} = movie;

if (isLoading) {
return <div />;
return <Loading nothing />;
}

return (
Expand Down
13 changes: 13 additions & 0 deletions src/styles/_globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,17 @@ a {
text-decoration: none;
color: inherit;
}
}

.nothing {
height: 100vh;
}

.loading {
height: 100%;
}

.spinner-grow {
width: 10em;
height: 10em;
}
25 changes: 22 additions & 3 deletions src/styles/bighero/BigHero.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/styles/bighero/BigHero.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions src/styles/bighero/BigHero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}

.info {
padding: 30px;
padding: 0 30px;
padding-right: 0;

.title {
Expand All @@ -47,7 +47,7 @@

.desc {
margin-top: 40px;
margin-bottom: 50px;
margin-bottom: 55px;
font-size: 1.5em;
}
}
Expand All @@ -70,6 +70,13 @@
}
}
}

button {
@extend p;
padding: 0;
background-color: transparent;
border: none;
}
}

.trailer-cont {
Expand Down
13 changes: 13 additions & 0 deletions src/styles/index/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/styles/index/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.