javascript hilfe dringendd?

1 Antwort

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Google Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">


    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="./style.css">
    <title>To Do List</title>
</head>
<body>


    <header>
        <h1>My Tasks</h1>
    </header>
    <form action="">
       <div class="inputs">
        <input type="text" class="todo-input">
        <input type="date" class="todo-input-two">
       </div>
        <button class="todo-button" type="submit">
            <i class="fas fa-plus-circle fa-lg"></i>
        </button>
        <div class="select">
            <select name="todos" class="filter-todo">
                <option value="all">All</option>
                <option value="completed">Completed</option>
                <option value="incomplete">Incomplete</option>
            </select>
        </div>
    </form>


    <div class="todo-container">
        <ul class="todo-list"></ul>
    </div>


    <div class="deleteAll">
      <button>Delete All</button>
      <button>Change Status</button>
    </div>


    <script src="./script.js"></script>
    
</body>
</html>

CSS:

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  background-image: linear-gradient(45deg, rgb(20, 222, 124) 0%, rgb(20, 222, 124) 21%,rgb(25, 190, 119) 21%, rgb(25, 190, 119) 37%,rgb(30, 158, 113) 37%, rgb(30, 158, 113) 46%,rgb(35, 126, 108) 46%, rgb(35, 126, 108) 53%,rgb(39, 94, 103) 53%, rgb(39, 94, 103) 59%,rgb(44, 62, 97) 59%, rgb(44, 62, 97) 77%,rgb(49, 30, 92) 77%, rgb(49, 30, 92) 100%);
  background-repeat: no-repeat;
  height: 1220px;
  color: white;
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
}


header {
  font-size: 1.5rem;
}


header, 
form {
  min-height: 20vh;
  display: flex;
  justify-content: center;
  align-items: center;
}


.inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


form input, 
form button {
  padding: 0.5rem;
  padding-left: 1rem;
  font-size: 1.8rem;
  border: none;
  background: white;
  border-radius: 2rem;
}


form button {
  color:  #311E5C;
  background: white;
  cursor: pointer;
  transition: all 0.3 ease;
  margin-left: 0.5rem;
}


form button:hover {
  color: white;
  background: #311E5C;
}


.fa-plus-circle {
  margin-top: 0.3rem;
  margin-left: -8px;
}


.todo-container {
  display: flex;
  justify-content: center;
  align-items: center;
}


.todo-list {
  min-width: 30%;
  list-style: none;
}


.todo {
  margin: 0.5rem;
  padding-left: 0.5rem;
  background: white;
  color: black;
  font-size: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.5s;
  border-radius: 2rem;
}


.todo li {
  flex: 1;
}


.trash-btn, 
.complete-btn {
  color: white;
  border: none;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
}


.complete-btn {
  background: #311E5C;
}


.trash-btn {
  border-top-right-radius: 1.75rem;
  border-bottom-right-radius: 1.75rem;
  background: #275E67;
}


.todo-item {
  padding: 0rem 0.5rem;
}


.fa-trash, 
.fa-check-circle {
  pointer-events: none;
}


.completed {
  text-decoration: line-through;
  opacity: 0.5;
}


.slide {
  transform: translateX(10rem);
  opacity: 0;
}


select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  border: none;
}


.select {
  margin: 1rem;
  position: relative;
  overflow: hidden;
  border-radius: 50px;
}


select {
  color:#311E5C;
  width: 10rem;
  height: 3.2rem;
  cursor: pointer;
  padding: 1rem;
}


.select::after {
  content: "\25BC";
  position: absolute;
  background:#311E5C;
  top: 0;
  right: 0;
  padding: 1rem;
  pointer-events: none;
  transition: all 0.3s ease;
}


.select:hover::after {
  background: white;
  color: #311E5C;
}


.deleteAll {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-left: -150px;
  margin-top: 35px;
}


.deleteAll button {
  padding: 0.5rem;
  padding-left: 1rem;
  font-size: 30px;
  border: none;
  background: white;
  border-radius: 2rem;
  color: #311E5C;
  text-transform: uppercase;
  cursor: pointer;
}


.deleteAll button:hover {
  color: white;
  background-color: #311E5C;
}