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

David Gridley Project Cinema #26

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
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 added .DS_Store
Binary file not shown.
60 changes: 26 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,46 @@
---
path: "/project-cinema"
date: "2018-05-28"
date: "2018-09-24"
title: "Project cinema"
---

# Project Cinema
# Movie Quest

We want to create a movie search engine. To power it we will use the [Open Movie Database](http://www.omdbapi.com) API.
The aim of this project, titled "Movie Quest", is to create a search application for users to be able to find films that they like or are interested in viewing, and to show them relevent information about said film. Movie Quest has been designed to fit the mobile phone screen primarily, but has also been designed to react responsively to the size of the user's device, making it also appropriate for tablet or desktop.

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.
**Design Objectives**

To get started, fork and clone this repo. Please submit a pull request after your first commit and push commits regularly.
With this project I endevoured to keep all JavaScript to be function-oriented, using many short, concise functions to carry out specific processes, which are then used as callback functions within other functions. I also tried to make sure that each function involved as little mutation as possible in order prevent problems with source information.

You should complete as many of the following tasks as you can.
In terms of UI design, this was the first project in which I tried to use CSS Grid to form page layout. While I did find this easier to impliment, I feel my inexperience with Grid lead to a slightly boxy and less sleek layout, although the page is still fully responseive.

- [ ] 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
**API**

**Movie details**
The project utilizes the [Open Movie Database](http://www.omdbapi.com) to fetch relvent data on a search term that the user inputs into the search function. On page load, the application retrieves information about films from the Star Wars franchise that were released in 2018. From there, the user can use the search feature to look for films.

- [ ] 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
**Film Description**

**Your own feature**
If the user wants to find out more information about a film they see, they can click on the "More info" button. This button makes a seperate call to the API to retrieve more detailed information about each film, using the film's IMDB id that is displayed in the ID attribute of each search result. If the API recieves a fetch request that specifies a film by ID, it returns specific information about that film only.

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

**Stretch goals**
Once the user searches for a film, the application will display page numbers at the bottom so that the user can look through multiple pages of enteries. The function that creates these pages will look at how many results have been returned by the API, divide that number by how many entries there are by page, and dynamically generate page buttons accordingly.

- [ ] 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 change events on 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.
**Favourites Feature**

## Objectives
If a user finds a film that they like or would want to see, they can then add that film to their favourites list. The application adds a button to each search result which, when clicked, will take the name of the film that the button belongs to and store it in a seperate area on the page.

* 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
**Future Goals And Ideas To Be Implimented**

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.
In order to make continual improvements to Movie Quest, I would like to impliment these changes in the future:

- Limit the viewable amount of page buttons for each search in order to clean up the bottom of the application.

- Have favourite be savable so that they remain after a page refresh.

- Have favourites be rankable so that the user can be placed in preference order.

- Impliment functionality so that movie information can be displayed or hidden at the user's request, without having to make seperate API calls for each entry.

- Add a "Popular Films" feature that will provide search results for predetermened search terms based on popular films or film series.
Binary file added images/.DS_Store
Binary file not shown.
Binary file added images/moviequestlogo.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 images/noimage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE 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">
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Poppins:400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

importing every font weight feels like overkill

<title>Movie Quest</title>
</head>
<body>
<main>
<header class="header">
<img src="/Users/madodaveo/workspace/project-cinema/images/moviequestlogo.png" alt="">
</header>
<div class="search__container">
<form class="search__form">
<input class="search__box" placeholder="Search..."></textarea>

<button class="search__button" type="submit">Search</button>
</form>
</div>
<div class="content">
<div class="favourites">
<ul class="favourites__list">Favourites:</ul>
</div>
<div class="results__container">
</div>
</div>
<div class="page__container">
</div>
<footer class="footer">
</footer>
</main>
</body>
<script src="src/index.js"></script>
</html>
54 changes: 54 additions & 0 deletions src/brief.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
path: "/project-cinema"
date: "2018-05-28"
title: "Project cinema"
---

# Project Cinema

We want to create a movie search engine. To power it we will use the [Open Movie Database](http://www.omdbapi.com) API.

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.

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.

- [x] Work using mobile first, that is create the mobile version first and add tablet and desktop versions after.
- [x] 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.
- [x] 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
- [x] Display the data returned by the API including title, year and poster picture

**Movie details**

- [x] Adjust your layout to create room for a detailed view of movie information
- [x] 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
- [x] Display the detailed movie result in the in the details view you created earlier
- [x] 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**

- [x] Implement pagination so that users can navigate between all movies in search results rather than just the first ten
- [x] 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 change events on 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.
Loading