-
-
Notifications
You must be signed in to change notification settings - Fork 283
Sheffield | 26-ITP-jan | Richard Frimpong | Sprint 3 | Todo List #1059
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
Closed
Richiealx
wants to merge
5
commits into
CodeYourFuture:main
from
Richiealx:coursework/sprint-3-todo-list
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
de72b31
Add HTML structure for todo list app
Richiealx 1d7b2c3
Style todo list layout and controls
Richiealx f70dc96
Extend todo module with optional deadlines and delete completed support
Richiealx 01dba5f
Add todo list rendering, input handling and DOM interactions
Richiealx 55e53b2
Refine todo list render naming and completed task deletion
Richiealx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,63 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
| <title>ToDo List</title> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet"> | ||
|
|
||
| <script type="module" src="script.mjs"></script> | ||
| </head> | ||
| <body> | ||
| <div class="todo-container"> | ||
| <h1>My ToDo List</h1> | ||
|
|
||
| <div class="todo-input"> | ||
| <input type="text" id="new-task-input" placeholder="Enter a new task..." /> | ||
| <button id="add-task-btn">Add</button> | ||
| </div> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Todo List</title> | ||
| <link rel="stylesheet" href="style.css" /> | ||
| <script type="module" src="script.mjs"></script> | ||
| </head> | ||
| <body> | ||
| <div class="todo-container"> | ||
| <h1>My Todo List</h1> | ||
|
|
||
| <div class="todo-input"> | ||
| <input | ||
| type="text" | ||
| id="new-task-input" | ||
| placeholder="Enter a new task..." | ||
| aria-label="Enter a new task" | ||
| /> | ||
|
|
||
| <input | ||
| type="date" | ||
| id="deadline-input" | ||
| aria-label="Set a deadline" | ||
| /> | ||
|
|
||
| <button id="add-task-btn" type="button">Add</button> | ||
| </div> | ||
|
|
||
| <div class="todo-actions"> | ||
| <button id="delete-completed-btn" type="button"> | ||
| Delete Completed | ||
| </button> | ||
| </div> | ||
|
|
||
| <ul id="todo-list" class="todo-list"> | ||
| </ul> | ||
|
|
||
| <!-- | ||
| This is a template for the To-do list item. | ||
| It can simplify the creation of list item node in JS script. | ||
| --> | ||
| <template id="todo-item-template"> | ||
| <li class="todo-item"> <!-- include class "completed" if the task completed state is true --> | ||
| <span class="description">Task description</span> | ||
| <div class="actions"> | ||
| <button class="complete-btn"><span class="fa-solid fa-check" aria-hidden="true"></span></button> | ||
| <button class="delete-btn"><span class="fa-solid fa-trash" aria-hidden="true"></span></button> | ||
| </div> | ||
| </li> | ||
| </template> | ||
|
|
||
| </div> | ||
| </body> | ||
| </html> | ||
| <ul id="todo-list" class="todo-list"></ul> | ||
|
|
||
| <!-- | ||
| Template used to create each todo list item in JavaScript. | ||
| Add class "completed" to <li> when the task is complete. | ||
| --> | ||
| <template id="todo-item-template"> | ||
| <li class="todo-item"> | ||
| <div class="todo-content"> | ||
| <button class="complete-btn" type="button" aria-label="Complete task"> | ||
| ☑ | ||
| </button> | ||
|
|
||
| <div class="todo-text-group"> | ||
| <span class="description">Task description</span> | ||
| <span class="deadline"></span> | ||
| </div> | ||
| </div> | ||
|
|
||
| <button class="delete-btn" type="button" aria-label="Delete task"> | ||
| 🗑 | ||
| </button> | ||
| </li> | ||
| </template> | ||
| </div> | ||
| </body> | ||
| </html> | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
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 implementation of the stretch 1 task
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.
Thank you for the feedback.
I have now updated the todo list based on your comments:
render()so it matches the original starter structure and the task guidance.elsebranch for the deadline text because the element is empty by default unless text is set.I tested the app again and confirmed the functionality still works correctly.