-
-
Notifications
You must be signed in to change notification settings - Fork 193
Glasgow | 25-ITP-SEP | Fares Bakhet | Sprint 3 | Quote Generator App #889
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
base: main
Are you sure you want to change the base?
Glasgow | 25-ITP-SEP | Fares Bakhet | Sprint 3 | Quote Generator App #889
Conversation
cjyuan
left a comment
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.
Can you revert all unrelated changes made on this branch to keep it clean?
Sprint-3/quote-generator/index.html
Outdated
| <h1>Quote Generator App</h1> | ||
| <div id="quote-container"> | ||
| <p id="quote-text"></p> | ||
| <p id="quote-author"></p> | ||
| <button id="new-quote-button">New Quote</button> | ||
| </div> |
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.
Indentation is off.
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.
@cjyuan, I have reverted all the changes I have made.
Sprint-3/quote-generator/quotes.js
Outdated
| function showRandomQuote() { | ||
| const randomQuote = pickFromArray(quotes); | ||
| const quoteText = document.getElementById("quote-text"); | ||
| const quoteAuthor = document.getElementById("quote-author"); | ||
|
|
||
| quoteText.innerText = randomQuote.quote; | ||
| quoteAuthor.innerText = `— ${randomQuote.author}`; | ||
| } | ||
|
|
||
| window.onload = showRandomQuote; | ||
|
|
||
| document.getElementById("new-quote-button").addEventListener("click", showRandomQuote); | ||
|
|
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.
We should respect instructions like DO NOT EDIT BELOW HERE; it is usually there for a reason. If you are curious about why, you can ask ChatGPT Why should programmers respect "DO NOT EDIT BELOW HERE" instruction in a file?
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.
@cjyuan, I have looked up and learn the lesson.
cjyuan
left a comment
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.
Branch is still not clean; it contains some unmodified files in the Sprint-2 folder. Can you make this branch clean?
| <body> | ||
| <main> | ||
| <section></section> | ||
| <h1>hello there</h1> | ||
| <p id="quote"></p> | ||
| <p id="author"></p> | ||
| <button type="button" id="new-quote">New quote</button> | ||
| </section> | ||
| </main> | ||
| <script defer src="quotes.js"></script> | ||
| </body> |
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.
- Indentation is still off and there seems to be some error in the HTML code.
Learners, PR Template
Self checklist
Changelist
Editing the JS and HTML files to create a quote generator app.
Questions
No questions.