Skip to content

The Todo app is a task manager designed for users to organize their tasks efficiently. It offers responsive layout, hover states for interactive elements, adding new todos, marking as complete, deleting todos, filtering by status, clearing completed todos, toggling light and dark mode, and drag-and-drop functionality for reordering tasks.

Notifications You must be signed in to change notification settings

nabdelfattah/todo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Todo app solution

This is a solution to the Todo app challenge on Frontend Mentor.

Table of contents

Overview

The challenge

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
  • Drag and drop to reorder items on the list

Screenshot

desktop - light mode

desktop - dark mode

mobile - light mode

mobile - dark mode

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • SASS
  • JavaScript

What I learned

Adding border with gradient and radius:

.task:hover .check-box {
  border-radius: 50px;
  border: 2px solid transparent;
  background: var(--bg-gradient) border-box;
  -webkit-mask: linear-gradient(var(--Very-Light-Gray) 0 0) padding-box, linear-gradient(
      var(--Very-Light-Gray) 0 0
    );
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

Adjust background-image to stretch but not shrink:

.app {
  background-repeat: no-repeat;
  background-size: 100% 30rem;
}
@media (max-width: 1440px) {
  .app {
    background-size: auto 30rem;
    background-position-x: center;
  }
}

Swap items in an array using array destructuring

[this.tasksArr[draggedElIndex], this.tasksArr[targetElIndex]] = [
  this.tasksArr[targetElIndex],
  this.tasksArr[draggedElIndex],
];

Continued development

  • I guess the CSS implementation of dark mode need to be refactored.
  • The application should have a reset button to remove data in local storage.

Useful resources

  • DEV Community - This helped me figure out how to implement the gradient circular border.

Author

About

The Todo app is a task manager designed for users to organize their tasks efficiently. It offers responsive layout, hover states for interactive elements, adding new todos, marking as complete, deleting todos, filtering by status, clearing completed todos, toggling light and dark mode, and drag-and-drop functionality for reordering tasks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published