Skip to content

David Gridley Project Cinema#26

Open
DavidGridley wants to merge 6 commits intoconstructorlabs:masterfrom
DavidGridley:master
Open

David Gridley Project Cinema#26
DavidGridley wants to merge 6 commits intoconstructorlabs:masterfrom
DavidGridley:master

Conversation

@DavidGridley
Copy link
Copy Markdown

No description provided.

Comment thread index.html
<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
Copy Markdown
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

Comment thread src/index.js
@@ -0,0 +1,230 @@
//e2c4cd31 API Key
const apiKey = "e2c4cd31";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice

Comment thread src/index.js
//Creates result template
function resultTemplate(arr) {
let results = arr.map(function(film){
let poster = (film.Poster === "N/A") ? "images/noimage.png" : film.Poster;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice

Comment thread src/index.js

//Populates results container
function populateResults(arr) {
resultsContainer.innerHTML = arr.join().replace(/,/g, " ");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This could be written as arr.join('') by joining with an empty string we avoid the commas being inserted

Comment thread src/index.js
//Listener for clicks on movie coontainers to either fetch information or trigger class toggles to hide previously displayed information from view (Only working in part, works the first time and then generates another lot of information, before then triggering toggle again)
function addInfoListener() {
const moreInfo = document.querySelectorAll(".more__info__button");
moreInfo.forEach(button => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we need a forEach if we are doing delgation?

Comment thread style.css
grid-template-columns: 4fr 1fr;
}

form input {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

selector woud better handled using BEM classes

@dmitrigrabov
Copy link
Copy Markdown
Collaborator

Great work, but BEM usage needs more attention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants