-
Notifications
You must be signed in to change notification settings - Fork 38
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
base: master
Are you sure you want to change the base?
Conversation
<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"> |
There was a problem hiding this comment.
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
@@ -0,0 +1,230 @@ | |||
//e2c4cd31 API Key | |||
const apiKey = "e2c4cd31"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
//Creates result template | ||
function resultTemplate(arr) { | ||
let results = arr.map(function(film){ | ||
let poster = (film.Poster === "N/A") ? "images/noimage.png" : film.Poster; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
|
||
//Populates results container | ||
function populateResults(arr) { | ||
resultsContainer.innerHTML = arr.join().replace(/,/g, " "); |
There was a problem hiding this comment.
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
//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 => { |
There was a problem hiding this comment.
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?
grid-template-columns: 4fr 1fr; | ||
} | ||
|
||
form input { |
There was a problem hiding this comment.
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
Great work, but BEM usage needs more attention |
No description provided.