Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
647172e
project initialise
joelamb Sep 28, 2018
44ecd28
display search results
joelamb Sep 28, 2018
a55fcad
search results
joelamb Sep 28, 2018
ebac8bb
film search results
joelamb Sep 28, 2018
2eeaec5
search by title
joelamb Sep 28, 2018
d85861d
get film details and save in state
joelamb Sep 28, 2018
38071ec
film details on ID search
joelamb Sep 28, 2018
a2f3e53
conditional rendering of Film Details
joelamb Sep 28, 2018
c95870e
pagination init
joelamb Sep 28, 2018
c30e65b
static pagination
joelamb Sep 28, 2018
9974e03
page advance and reverse
joelamb Sep 28, 2018
1ec615c
fetch results on page change
joelamb Sep 28, 2018
bb907bd
reset currentPage on submit searchByTitle
joelamb Sep 29, 2018
0b0f142
placeholder image added when poster is N/A
joelamb Sep 29, 2018
74d2b23
page number input
joelamb Sep 29, 2018
8204c7e
install classnames package
joelamb Sep 29, 2018
ed3c200
highlight fav button on click
joelamb Sep 29, 2018
bbfd21d
push favourites to array in App.js state
joelamb Sep 29, 2018
0aae09d
add film to favourites only if it is not already a favourite
joelamb Sep 29, 2018
74a93dc
clean up and refactor
joelamb Sep 29, 2018
c2ee4ab
persistent highlighting of favourites
joelamb Sep 29, 2018
f68cefe
display favourites
joelamb Sep 29, 2018
f0c875c
tidy and refactor
joelamb Sep 29, 2018
641224c
remove favourite from favourite list by clicking delete
joelamb Sep 29, 2018
013a348
call film details by clicking film title in favourites list
joelamb Sep 29, 2018
dbe5918
add move button to favourites list
joelamb Sep 29, 2018
64109f0
add move button to favourites list
joelamb Sep 29, 2018
1d6b320
receiveMov gets selected fav
joelamb Sep 29, 2018
bb6e7cf
user can move films up the favourites list
joelamb Sep 29, 2018
5c8fa4f
get search results hints based on input change
joelamb Sep 29, 2018
f997357
display search hints
joelamb Sep 30, 2018
b8a38f7
get film details from search hints
joelamb Sep 30, 2018
ac09a7e
show/hide favourites toggle
joelamb Sep 30, 2018
9b592b9
tablet and desktop styles
joelamb Sep 30, 2018
330fbe4
mobile styling - minimise search input
joelamb Sep 30, 2018
07c48a9
mobile search results styling
joelamb Sep 30, 2018
2f5041e
mobile styling pagination
joelamb Sep 30, 2018
56f85f0
mobile film details styling
joelamb Sep 30, 2018
bfe0ef2
mobile style toggle film details modal
joelamb Sep 30, 2018
b3bdd34
minify search bar on search submit
joelamb Sep 30, 2018
c39bfec
styling for larger phones
joelamb Sep 30, 2018
c3a3726
desktop styles
joelamb Sep 30, 2018
fc61642
desktop styling
joelamb Sep 30, 2018
44f4206
tidying up
joelamb Sep 30, 2018
ad28a79
prevent search expand after minify and close hints on search by title…
joelamb Oct 1, 2018
7bd27d7
persist favourites in local storage
joelamb Oct 1, 2018
8a62933
hide label on search bar minify in mobile view
joelamb Oct 1, 2018
4aca2e0
initialise localStorage
joelamb Oct 1, 2018
0de166c
make favourites shortlist
joelamb Oct 1, 2018
6e7c94e
render ease-in for film details
joelamb Oct 2, 2018
63eb5e1
prepare for Heroku deploy
joelamb Nov 28, 2018
bdd2801
fetch over secure https
joelamb Nov 28, 2018
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
1 change: 1 addition & 0 deletions .Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node server.js
69 changes: 22 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,33 @@
# React Cinema

Let's revisit our first project where we built a movie search engine using the Open Movie Database. This time we want to implement it using React. It should be a Single Page App, that is all the functionality should be on a single page, rather switch between multiple pages.
> A mobile-first, responsive design movie search app powered by the [Open Movie Database](http://www.omdbapi.com) API.

Before starting to code produce a diagram using pen and paper of your application which shows both layout and a tree diagram of the components.
---

What are some of the components you are going to need? Which components will fetch data and how will that data be displayed? Which components will store state and how will they pass data to other components? Which components should be re-used? Rather than re-implementing your previous solution again have a think about what you have learned in the past week and how you can apply it here.
## Set-up and installation

You can start coding once your plan has been checked by a TA or instructor.
- Clone the repo
- Run `npm run build`
- Open `index.html` in a browser

## The brief
## Technology

We want to create a movie search engine. To power it we will use the [Open Movie Database](http://www.omdbapi.com) API.
- **React**
- **HTML, CSS, BEM** (Flexbox, Grid)
- **JavaScript** (Fetch, OMDB API, localStorage)
- Pure functions used as much as possible.
- Concise, reusable functions, each with with a clear purpose.

To start using the OMDB API you will first need to sign up with them to receive and API key. The key issued to you will allow you 1000 requests per day and you will need to include this key as part of every request.
![image](https://user-images.githubusercontent.com/42837452/45933010-84862080-bf7d-11e8-8881-aa7b004c2dcf.png)

To get started, fork and clone this repo. Please submit a pull request after your first commit and push commits regularly.

You should complete as many of the following tasks as you can.
## FEATURES

- [ ] Work using mobile first, that is create the mobile version first and add tablet and desktop versions after.
- [ ] Create an HTML page which should have a `form` at the top which contains a text input and a submit button. Below it should have a placeholder element for the returned results.
- [ ] Use JavaScript to capture the `submit` event in your search form, extract the query string from the text input and use that to make an API call to the Open Movie Database API to search for films which match the query string using `fetch`. `console.log` the results
- [ ] Display the data returned by the API including title, year and poster picture

**Movie details**

- [ ] Adjust your layout to create room for a detailed view of movie information
- [ ] Capture clicks on your movie results items and use that information to make another request to the API for detailed movie information. Using event delegation will help you here. `console.log` the returned result
- [ ] Display the detailed movie result in the in the details view you created earlier
- [ ] Make your design responsive and ensure it looks great at different screen widths

**Your own feature**

- [ ] Implement any feature you would find useful or interesting

**Stretch goals**

- [ ] Implement pagination so that users can navigate between all movies in search results rather than just the first ten
- [ ] Create a favourites list. It's up to you how you would add items to favourites. You could add a button or otherwise. Display a list of favourites somewhere on your page.
- [ ] Make the favourites list sortable. Add `up` and `down` buttons to your favourites which on click will move the result in relevant direction
- [ ] Save favourites locally using `localStorage` so that favourites persist in browser after refresh
- [ ] Let's create a search preview. It should listen for input events and submit a search request with current query string. Display the search preview results in an absolute positioned container just below the search box.
Hint: You may want to kick of the searching after at least 3 characters have been typed.

## Objectives

* We want to see great looking webpages that work well at all screen widths
* Your code should have consistent indentation and sensible naming
* Use lots of concise, reusable functions with a clear purpose
* Add code comments where it is not immediately obvious what your code does
* Your code should not throw errors and handle edge cases gracefully. For example not break if server fails to return expected results
* Use BEM methodology to style your page
* Try to use pure functions as much as possible, but keep in mind it will not be possible to make all functions pure.

## README.md

When finished, include a README.md in your repo. Someone who is not familiar with the project should be able to look at it and understand what it is and what to do with it. Explain functionality created, mention any outstanding issues and possible features you would include if you had more time. List technologies used to create the app. Include a screenshot of your app in the README.
- Search, with preview
- Pagination of search results
- Film details displayed in modal window.
- Save to favourites
- View film details by tapping on any favourited film.
- Reorder / remove favourites.
- Favourites persist in localStorage.
- Responsive design
37 changes: 26 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="style.css">
<title>Hello World</title>
</head>
<body>
<div id="root"></div>
<script src="dist/bundle.js"></script>
</body>
</html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>The Reel Thing – Find Your New Favourite Film</title>

<link href="https://fonts.googleapis.com/css?family=Bungee+Inline|Dosis:300,600" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU"
crossorigin="anonymous">

<link rel="stylesheet" href="./style/modern-normalize.css">
<link rel="stylesheet" href="./style/style.css">
<link rel="stylesheet" href="./style/tablet-style.css">
<link rel="stylesheet" href="./style/desktop-style.css">

</head>

<body>
<div id="root"></div>
<script src="static/bundle.js"></script>

</body>

</html>
Loading