Conversation
mnhaque
reviewed
Jul 28, 2019
Week-3/scripts/Render.js
Outdated
| } | ||
| } | ||
| function setLeftContent(fullContainer,container){ | ||
| let url = `https://newsapi.org/v2/top-headlines?country=in&apiKey=ac1fd7a9fc1342abb913e554a9525d85&pageSize=20`; |
Week-3/scripts/constants.js
Outdated
| @@ -0,0 +1,17 @@ | |||
| const defaultContent='Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; | |||
| const defaultDescription='created at 21 July 2019""created at 21 July 2019'; | |||
Week-3/scripts/Utility.js
Outdated
| window.localStorage.setItem(emailid, JSON.stringify(emailid)); | ||
| alert(emailSubscribedMessage); | ||
| } | ||
| else{ |
There was a problem hiding this comment.
generally if else block is indented as below example
if(condition) {
//code
} else if(condition) {
//code
} else {
//code
}
Week-3/scripts/Utility.js
Outdated
| popup.appendChild(descriptionPopup); | ||
| fullContainer.style.opacity = '0.3'; | ||
| } | ||
| else if(clickEvent.srcElement.id === 'closePopup'){ |
There was a problem hiding this comment.
generally if else block is indented as below example
if(condition) {
//code
} else if(condition) {
//code
} else {
//code
}
Week-3/scripts/Update_View.js
Outdated
| btn.heading=contentHead; | ||
| } | ||
| else{ | ||
| btn.data=data.articles[index].description; |
There was a problem hiding this comment.
generally if else block is indented as below example
if(condition) {
//code
} else if(condition) {
//code
} else {
//code
}
Week-3/scripts/Render.js
Outdated
| }) | ||
| .catch(function(error) { | ||
| }); | ||
| fullContainer.appendChild(container); |
There was a problem hiding this comment.
shouldnt be this line inside the success?
Week-3/scripts/Render.js
Outdated
| .catch(function(error) { | ||
| }); | ||
| fullContainer.appendChild(container); | ||
| } |
Owner
Author
There was a problem hiding this comment.
for this assignment trainer asked to keep in header only
Week-3/scripts/Render.js
Outdated
| @@ -0,0 +1,41 @@ | |||
| function setRightContent(article_data,fullContainer,container){ | |||
| let rightContainer = document.createElement('div'), | |||
Week-3/scripts/Render.js
Outdated
| } | ||
| } | ||
| function setLeftContent(fullContainer,container){ | ||
| let url = `https://newsapi.org/v2/top-headlines?country=in&apiKey=ac1fd7a9fc1342abb913e554a9525d85&pageSize=20`; |
Week-3/scripts/Update_View.js
Outdated
| function changeContent(val,fullContainer,container){ | ||
| let data=fullContainer.data; | ||
| let similar=0; | ||
| container.innerHTML = ''; |
amanrajs
commented
Jul 29, 2019
Week-3/scripts/Render.js
Outdated
| .catch(function(error) { | ||
| }); | ||
| fullContainer.appendChild(container); | ||
| } |
Owner
Author
There was a problem hiding this comment.
for this assignment trainer asked to keep in header only
mnhaque
reviewed
Aug 4, 2019
| @@ -0,0 +1,10 @@ | |||
| function setLeftContent(fullContainer,container,newsUrl){ | |||
| @@ -0,0 +1,78 @@ | |||
| function changeContent(container,fullContainer){ | |||
Week-3/scripts/Utility.js
Outdated
| @@ -0,0 +1,40 @@ | |||
| function clicked(clickEvent,fullContainer,popup){ | |||
| return clickEvent => { | |||
|
looks good |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.