├── js ├── addTodo.js └── script.js ├── .gitattributes ├── img ├── logo.png ├── 1.svg ├── 2.svg ├── 3.svg └── 4.svg ├── screenshot2.png ├── README.md ├── index.html └── css └── style.css /js/addTodo.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-vendored 2 | *.js linguist-vendored=false -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abdulrahim-ramadan/space-js-ToDo/HEAD/img/logo.png -------------------------------------------------------------------------------- /screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abdulrahim-ramadan/space-js-ToDo/HEAD/screenshot2.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # space js ToDo ⭐ 2 | 3 | Space JS ToDo is a simple web-based todo list application built with HTML, CSS, and JavaScript. It provides a minimalistic interface for managing your tasks efficiently. 4 | 5 | ## Featuress 6 | 7 | - **Add and Remove Tasks:** Easily add new tasks to your todo list and remove them when completed. 8 | - **Mark Tasks as Complete:** Mark tasks as complete by checking them off from the list. 9 | - **Persistent Storage:** Your todo list is saved locally in the browser's storage, ensuring your tasks are preserved even after refreshing the page. 10 | - **Responsive Design:** The application is responsive and works seamlessly across different devices and screen sizes. 11 | 12 | ## Live Demo 13 | 14 | Check out the live demo of Space JS ToDo [here](https://abdulrahim-ramadan.github.io/space-js-ToDo/). 15 | 16 | ## Screenshots 17 | 18 | ![project demo](screenshot2.png) 19 | 20 | ## Usage 21 | 22 | 1. **Clone the Repository:** 23 | 24 | ```bash 25 | git clone https://github.com/abdulrahim-ramadan/space-js-ToDo.git 26 | ``` 27 | 28 | 2. **Open `index.html` in Your Browser:** 29 | 30 | Navigate to the project directory and open the `index.html` file in your preferred web browser to start using the application. 31 | 32 | 3. **Add and Manage Tasks:** 33 | 34 | - To add a new task, type the task in the input field and press Enter. 35 | - To mark a task as complete, click on the checkbox next to the task. 36 | - To remove a task, click on the delete button next to the task. 37 | 38 | ## Contributing 39 | 40 | Contributions are welcome! If you have any ideas, suggestions, or bug fixes, please open an issue or submit a pull request. 41 | 42 | ## License 43 | 44 | This project is licensed under the [MIT License](LICENSE). 45 | 46 | 47 | #Please ⭐ the repo to support our project 48 | -------------------------------------------------------------------------------- /js/script.js: -------------------------------------------------------------------------------- 1 | 2 | const todoinput = document.querySelector('.todo-input') 3 | const todoBtn =document.querySelector('.todo-btn') 4 | const todoResult =document.querySelector('.todo-result') 5 | 6 | function addTodo(e) { 7 | 8 | e.preventDefault(); 9 | 10 | 11 | 12 | // create li 13 | const todoLi = document.createElement('li'); 14 | todoLi.classList.add('my-2', 'p-3', 'border', 'rounded',"list-unstyled") 15 | 16 | 17 | // create h4 18 | const todoTitle = document.createElement('h4') 19 | todoTitle.innerText = todoinput.value 20 | todoinput.value = '' 21 | todoTitle.classList.add("mian-op",'d-inline-block') 22 | 23 | todoLi.appendChild(todoTitle); 24 | 25 | 26 | 27 | // create div 28 | const todoAction = document.createElement('div') 29 | todoAction.classList.add("mian-btn",'d-inline-block', 'float-end') 30 | 31 | 32 | 33 | // add btn 34 | const btnComplete = document.createElement('button') 35 | btnComplete.classList.add('btn','btn-primary') 36 | btnComplete.innerHTML = '' 37 | todoAction.appendChild(btnComplete); 38 | 39 | 40 | // btn 2 41 | const btnDelete = document.createElement('button') 42 | btnDelete.classList.add('btn','btn-danger') 43 | btnDelete.innerHTML = '' 44 | todoAction.appendChild(btnDelete) 45 | 46 | 47 | 48 | todoLi.appendChild(todoAction) 49 | 50 | todoResult.appendChild(todoLi) 51 | 52 | } 53 | 54 | 55 | 56 | 57 | 58 | function todoToggle(e){ 59 | const item = e.target 60 | 61 | if (item.classList[1]=='fa-check'){ 62 | const todo_li = item.parentElement.parentElement.parentElement 63 | todo_li.childNodes[0].classList.toggle('completed') 64 | } 65 | 66 | else if (item.classList[1]=='fa-trash-can'){ 67 | item.parentElement.parentElement.parentElement.classList.add('deleted') 68 | 69 | } 70 | 71 | } 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | todoBtn.addEventListener('click',addTodo) 80 | todoResult.addEventListener('click',todoToggle) -------------------------------------------------------------------------------- /img/1.svg: -------------------------------------------------------------------------------- 1 | 5 | 6 | rocket_1 -------------------------------------------------------------------------------- /img/2.svg: -------------------------------------------------------------------------------- 1 | 5 | 6 | earth -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | space__Jss__ToDo 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | 24 | 25 |
26 | 36 | 37 |
38 | 39 | 40 |
41 |
42 |
43 |

Start Todo App

44 |
45 |
46 | 47 |
48 |
49 |
55 |
56 | 57 | 58 | 59 |
60 | 61 |
62 | 63 |
64 | 65 |
66 |
    67 | 68 |
69 | 70 |
71 | 72 |
73 | 74 | 75 |
76 | 77 | 78 | 79 | 80 |
81 | 82 |
83 | 84 |
85 | 86 | 87 |
88 |
89 | 90 |
91 |
92 | 93 | 94 |
95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /img/3.svg: -------------------------------------------------------------------------------- 1 | 5 | 6 | moon_1 -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Dosis:300,400,500'); 2 | 3 | @-moz-keyframes rocket-movement { 100% {-moz-transform: translate(1200px,-600px);} } 4 | @-webkit-keyframes rocket-movement {100% {-webkit-transform: translate(1200px,-600px); } } 5 | @keyframes rocket-movement { 100% {transform: translate(1200px,-600px);} } 6 | @-moz-keyframes spin-earth { 100% { -moz-transform: rotate(-360deg); transition: transform 20s; } } 7 | @-webkit-keyframes spin-earth { 100% { -webkit-transform: rotate(-360deg); transition: transform 20s; } } 8 | @keyframes spin-earth{ 100% { -webkit-transform: rotate(-360deg); transform:rotate(-360deg); transition: transform 20s; } } 9 | 10 | @-moz-keyframes move-astronaut { 11 | 100% { -moz-transform: translate(-160px, -160px);} 12 | } 13 | @-webkit-keyframes move-astronaut { 14 | 100% { -webkit-transform: translate(-160px, -160px);} 15 | } 16 | @keyframes move-astronaut{ 17 | 100% { -webkit-transform: translate(-160px, -160px); transform:translate(-160px, -160px); } 18 | } 19 | @-moz-keyframes rotate-astronaut { 20 | 100% { -moz-transform: rotate(-720deg);} 21 | } 22 | @-webkit-keyframes rotate-astronaut { 23 | 100% { -webkit-transform: rotate(-720deg);} 24 | } 25 | @keyframes rotate-astronaut{ 26 | 100% { -webkit-transform: rotate(-720deg); transform:rotate(-720deg); } 27 | } 28 | 29 | @-moz-keyframes glow-star { 30 | 40% { -moz-opacity: 0.3;} 31 | 90%,100% { -moz-opacity: 1; -moz-transform: scale(1.2);} 32 | } 33 | @-webkit-keyframes glow-star { 34 | 40% { -webkit-opacity: 0.3;} 35 | 90%,100% { -webkit-opacity: 1; -webkit-transform: scale(1.2);} 36 | } 37 | @keyframes glow-star{ 38 | 40% { -webkit-opacity: 0.3; opacity: 0.3; } 39 | 90%,100% { -webkit-opacity: 1; opacity: 1; -webkit-transform: scale(1.2); transform: scale(1.2); border-radius: 999999px;} 40 | } 41 | 42 | .spin-earth-on-hover{ 43 | 44 | transition: ease 200s !important; 45 | transform: rotate(-3600deg) !important; 46 | } 47 | 48 | html, body{ 49 | margin: 0; 50 | width: 100%; 51 | height: 100%; 52 | font-family:'Jost', sans-serif; 53 | font-weight: 300; 54 | -webkit-user-select: none; /* Safari 3.1+ */ 55 | -moz-user-select: none; /* Firefox 2+ */ 56 | -ms-user-select: none; /* IE 10+ */ 57 | user-select: none; /* Standard syntax */ 58 | } 59 | 60 | .bg-purple{ 61 | background: url(http://salehriaz.com/404Page/img/bg_purple.png); 62 | background-repeat: repeat-x; 63 | background-size: cover; 64 | background-position: left top; 65 | height: 100%; 66 | overflow: hidden; 67 | } 68 | 69 | .custom-navbar{ 70 | padding-top: 15px; 71 | } 72 | 73 | .brand-logo{ 74 | margin-left: 25px; 75 | margin-top: 5px; 76 | display: inline-block; 77 | } 78 | 79 | .navbar-links{ 80 | display: inline-block; 81 | float: right; 82 | margin-right: 15px; 83 | text-transform: uppercase; 84 | } 85 | 86 | ul { 87 | list-style-type: none; 88 | margin: 0; 89 | padding: 0; 90 | /* overflow: hidden;*/ 91 | align-items: center; 92 | } 93 | 94 | li { 95 | float: left; 96 | padding: 0px 15px; 97 | } 98 | 99 | li a { 100 | display: block; 101 | color: white; 102 | text-align: center; 103 | text-decoration: none; 104 | letter-spacing : 2px; 105 | font-size: 12px; 106 | 107 | -webkit-transition: all 0.3s ease-in; 108 | -moz-transition: all 0.3s ease-in; 109 | -ms-transition: all 0.3s ease-in; 110 | -o-transition: all 0.3s ease-in; 111 | transition: all 0.3s ease-in; 112 | } 113 | 114 | li a:hover { 115 | color: #ffcb39; 116 | } 117 | 118 | .btn-request{ 119 | padding: 10px 25px; 120 | border: 1px solid #FFCB39; 121 | border-radius: 100px; 122 | font-weight: 400; 123 | } 124 | 125 | .btn-request:hover{ 126 | background-color: #FFCB39; 127 | color: #fff; 128 | transform: scale(1.05); 129 | box-shadow: 0px 20px 20px rgba(0,0,0,0.1); 130 | } 131 | 132 | .btn-go-home{ 133 | position: relative; 134 | z-index: 200; 135 | margin: 15px auto; 136 | width: 100px; 137 | padding: 10px 15px; 138 | border: 1px solid #FFCB39; 139 | border-radius: 100px; 140 | font-weight: 400; 141 | display: block; 142 | color: white; 143 | text-align: center; 144 | text-decoration: none; 145 | letter-spacing : 2px; 146 | font-size: 11px; 147 | 148 | -webkit-transition: all 0.3s ease-in; 149 | -moz-transition: all 0.3s ease-in; 150 | -ms-transition: all 0.3s ease-in; 151 | -o-transition: all 0.3s ease-in; 152 | transition: all 0.3s ease-in; 153 | } 154 | 155 | .btn-go-home:hover{ 156 | background-color: #FFCB39; 157 | color: #fff; 158 | transform: scale(1.05); 159 | box-shadow: 0px 20px 20px rgba(0,0,0,0.1); 160 | } 161 | 162 | .central-body{ 163 | /* width: 100%;*/ 164 | padding: 17% 5% 10% 5%; 165 | text-align: center; 166 | } 167 | 168 | .objects img{ 169 | z-index: 90; 170 | pointer-events: none; 171 | } 172 | 173 | .object_rocket{ 174 | z-index: 95; 175 | position: absolute; 176 | transform: translateX(-50px); 177 | top: 75%; 178 | pointer-events: none; 179 | animation: rocket-movement 200s linear infinite both running; 180 | } 181 | 182 | .object_earth{ 183 | position: absolute; 184 | top: 20%; 185 | left: 15%; 186 | z-index: 90; 187 | /* animation: spin-earth 100s infinite linear both;*/ 188 | } 189 | 190 | .object_moon{ 191 | position: absolute; 192 | top: 12%; 193 | left: 25%; 194 | /* 195 | transform: rotate(0deg); 196 | transition: transform ease-in 99999999999s; 197 | */ 198 | } 199 | 200 | .earth-moon{ 201 | 202 | } 203 | 204 | .object_astronaut{ 205 | animation: rotate-astronaut 200s infinite linear both alternate; 206 | } 207 | 208 | .box_astronaut{ 209 | z-index: 110 !important; 210 | position: absolute; 211 | top: 60%; 212 | right: 20%; 213 | will-change: transform; 214 | animation: move-astronaut 50s infinite linear both alternate; 215 | } 216 | 217 | .image-404{ 218 | position: relative; 219 | z-index: 100; 220 | pointer-events: none; 221 | } 222 | 223 | .stars{ 224 | background: url(http://salehriaz.com/404Page/img/overlay_stars.svg); 225 | background-repeat: repeat; 226 | background-size: contain; 227 | background-position: left top; 228 | } 229 | 230 | .glowing_stars .star{ 231 | position: absolute; 232 | border-radius: 100%; 233 | background-color: #fff; 234 | width: 3px; 235 | height: 3px; 236 | opacity: 0.3; 237 | will-change: opacity; 238 | } 239 | 240 | .glowing_stars .star:nth-child(1){ 241 | top: 80%; 242 | left: 25%; 243 | animation: glow-star 2s infinite ease-in-out alternate 1s; 244 | } 245 | .glowing_stars .star:nth-child(2){ 246 | top: 20%; 247 | left: 40%; 248 | animation: glow-star 2s infinite ease-in-out alternate 3s; 249 | } 250 | .glowing_stars .star:nth-child(3){ 251 | top: 25%; 252 | left: 25%; 253 | animation: glow-star 2s infinite ease-in-out alternate 5s; 254 | } 255 | .glowing_stars .star:nth-child(4){ 256 | top: 75%; 257 | left: 80%; 258 | animation: glow-star 2s infinite ease-in-out alternate 7s; 259 | } 260 | .glowing_stars .star:nth-child(5){ 261 | top: 90%; 262 | left: 50%; 263 | animation: glow-star 2s infinite ease-in-out alternate 9s; 264 | } 265 | 266 | @media only screen and (max-width: 600px){ 267 | .navbar-links{ 268 | display: none; 269 | } 270 | 271 | .custom-navbar{ 272 | text-align: center; 273 | } 274 | 275 | .brand-logo img{ 276 | width: 120px; 277 | } 278 | 279 | .box_astronaut{ 280 | top: 70%; 281 | } 282 | 283 | .central-body{ 284 | padding-top: 25%; 285 | } 286 | } 287 | 288 | .mian-btn{ 289 | margin-left: 286px; 290 | } 291 | 292 | 293 | .completed{ 294 | text-decoration: line-through; 295 | 296 | } 297 | 298 | 299 | .deleted{ 300 | display: none; 301 | } 302 | 303 | 304 | 305 | 306 | .pulsa { 307 | animation: pulsa 1.4s infinite; 308 | min-width: 200px; 309 | width: fit-content; 310 | border-radius: 9999px; 311 | /* overflow: hidden; */ 312 | } 313 | 314 | .cta { 315 | width: 100%; 316 | height: 100%; 317 | border: none; 318 | outline: none; 319 | background-color: none; 320 | border-radius: 9999px; 321 | padding: 8px 16px; 322 | color: white; 323 | font-size: 15px; 324 | background: linear-gradient(109.6deg, #090979 11.2%, #9006A1 53.7%, #090979 100.2%); 325 | letter-spacing: 0.08em; 326 | font-weight: 800; 327 | position: relative; 328 | } 329 | 330 | .cta:active { 331 | animation: pulsa-active .4s infinite; 332 | } 333 | 334 | .star { 335 | width: 2px; 336 | height: 2px; 337 | background-color: white; 338 | border-radius: 50%; 339 | position: absolute; 340 | animation: pulsa-stella 1.8s infinite; 341 | transition: all .8s ease-in-out; 342 | } 343 | 344 | .star.a { 345 | top: 8px; 346 | left: 6px; 347 | } 348 | 349 | .star.b { 350 | top: 2px; 351 | left: 16px; 352 | } 353 | 354 | .star.c { 355 | top: 18px; 356 | left: 8px; 357 | } 358 | 359 | .star.d { 360 | top: 14px; 361 | left: 20px; 362 | } 363 | 364 | .star.e { 365 | top: 30px; 366 | left: 8px; 367 | } 368 | 369 | .star.f { 370 | top: 24px; 371 | left: 24px; 372 | } 373 | 374 | .star.g { 375 | top: 10px; 376 | left: 32px; 377 | } 378 | 379 | .pulsa:hover .star.a { 380 | transform: translate3d(0px, 8px, 0); 381 | } 382 | 383 | .pulsa:hover .star.b { 384 | transform: translate3d(-4px, 6px, 0); 385 | } 386 | 387 | .pulsa:hover .star.c { 388 | transform: translate3d(14px, -8px, 0); 389 | } 390 | 391 | .pulsa:hover .star.d { 392 | transform: translate3d(16px, -2px, 0); 393 | } 394 | 395 | .pulsa:hover .star.e { 396 | transform: translate3d(58px, -20px, 0); 397 | } 398 | 399 | .pulsa:hover .star.f { 400 | transform: translate3d(34px, 2px, 0); 401 | } 402 | 403 | .pulsa:hover .star.g { 404 | transform: translate3d(10px, 16px, 0); 405 | } 406 | 407 | .rocket { 408 | position: absolute; 409 | top: 8px; 410 | right: 16px; 411 | z-index: -1; 412 | transform: rotate(180deg); 413 | transition: all .3s ease-in-out; 414 | } 415 | 416 | .pulsa:hover .rocket { 417 | z-index: auto; 418 | animation: muovi-razzo 1.8s linear; 419 | transform: rotate(0deg); 420 | } 421 | 422 | @keyframes pulsa { 423 | 0% { 424 | box-shadow: 0 0 0 0 #9006A1; 425 | } 426 | 427 | 100% { 428 | box-shadow: 0 0 0 8px #fbb32f01; 429 | } 430 | } 431 | 432 | @keyframes pulsa-stella { 433 | 0% { 434 | box-shadow: 0 0 0 0 #ffffff; 435 | } 436 | 437 | 100% { 438 | box-shadow: 0 0 0 4px #fbb32f01; 439 | } 440 | } 441 | 442 | @keyframes muovi-razzo { 443 | from { 444 | transform: rotate(180deg); 445 | } 446 | 447 | 25% { 448 | transform: translate3d(40px, 32px, 0); 449 | } 450 | 451 | 50% { 452 | transform: translate3d(32px, -60px, 0); 453 | } 454 | 455 | 75% { 456 | transform: translate3d(0px, -60px, 0) rotate(0); 457 | } 458 | 459 | to { 460 | transform: rotate(0deg); 461 | } 462 | } 463 | 464 | @keyframes pulsa-active { 465 | 0% { 466 | box-shadow: 0 0 0 0 #9006A1; 467 | } 468 | 469 | 100% { 470 | box-shadow: 0 0 0 16px #fbb32f01; 471 | } 472 | } 473 | 474 | 475 | .pulsa{ 476 | margin-left: 1650px; 477 | margin-top: -60px; 478 | } 479 | 480 | -------------------------------------------------------------------------------- /img/4.svg: -------------------------------------------------------------------------------- 1 | 5 | 6 | astronaut_1 --------------------------------------------------------------------------------