This is a solution to the Todo app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Add new todos to the list
- Mark todos as complete
- Delete todos from the list
- Filter by all/active/complete todos
- Clear all completed todos
- Toggle light and dark mode
Extra 🎯💡🧐
- Data are store in browser localStorage
- Light and dark mode will save in localStorage when toggle
- Mark todos as urgent task
- Show alert message when adding empty todo and clearing all completed todo
- Click on the task description to show the full description and edit todo
Mobile view
Desktop view
Vue-todo-app.overview.mp4
- Vue3 - JS framework
- SASS / SCSS
- Local Storage
- Desktop-first workflow
- The basics of Vue.js:
- Two-way data binding
- Template syntax and expressions
- Vue directives, loops and conditional rendering
- Handling user Inputs
- Handling Events
- Vue.js Methods and Computed Properties
- Attribute Bindings and dynamic classes
- CSS - Remove autocomplete style:
&:-webkit-autofill,
&:-webkit-autofill:hover,
&:-webkit-autofill:focus,
&:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 1000px #fff inset !important;
}
- JS - Change the layout using event listener:
window.addEventListener("resize", this.myEventHandler);
myEventHandler(e) {
let width = e.target.innerWidth
this.windowWidth = width
}
displayDesktop(media = this.windowWidth){...}
displayMobile(media = this.windowWidth){...}
- Vue School.io - This is an official website for Vue.js, it helps me to understand how we can structure the files when building more component in a particular project.
- Github - Eric Choo
- Frontend Mentor - @ericcst197