Skip to content

Conversation

@philberryman
Copy link

Please ignore old.js, new.js and functionNames.js .

Thanks!

Phil

}

// api request to news api. Returns json and calls createArticles function
const getArticles = (page=1, excludedDomainsStr='', filterDomains="") => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

twentyArticles = hundredArticles.slice(startArticle,startArticle+20);
itemId = 0;
twentyArticles.forEach(article => {
itemId ++
Copy link
Contributor

Choose a reason for hiding this comment

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

you can get the itemId using forEach index for example twentyArticles.forEach((article, index)){

}

// add a listener to article creating 'click' event that takes user to URL
const clickArticle = (articleNode, url) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it not be easier to wrap the html with an <a> tag?



// adds listeners that change the colour of the article the mouse is over - move to css
const mouseOverArticle = (articleNode) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be easier to achieve using CSS :hover

@dmitrigrabov
Copy link
Contributor

It would be great to see an updated README so other people looking at the repo in future can see what you have done, how it works, what technologies it uses

@dmitrigrabov
Copy link
Contributor

BTW, if you don't need old.js, new.js and functionNames.js, you can delete them, commit and push

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