365JS - Todolist
How do I make an 365js - todolist?
What is a 365js - todolist? How do you make a 365js - todolist? This script and codes were developed by Kévin Barfleur on 30 January 2023, Monday.
365JS - Todolist - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>365JS - Todolist</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <h1 class="title">Todolist</h1> <form> <input type="text" placeholder="add a task" /> </form> <div class="container-task"> </div>
</div> <script src="js/index.js"></script>
</body>
</html>
365JS - Todolist - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Josefin+Sans);
@import url(https://fonts.googleapis.com/css?family=Anton);
* { padding: 0; margin: 0; font-family: 'Josefin Sans', sans-serif; outline: none;
}
.title { font-family: 'Anton', sans-serif; color: transparent; letter-spacing: 20px; font-size: 3em; text-align: center; padding: 50px; text-shadow: 1px 1px 0px black, 15px 0px 5px rgba(255, 132, 132, 0.5), -15px 0px 5px rgba(117, 117, 255, 0.5);
}
.subtitle { text-align: center;
}
form { width: 100vw; text-align: center; margin: 5% auto;
}
form input { text-align: center; width: 100px; height: 20px; border: none; border-bottom: 1px solid rgba(255, 132, 132, 0.5); transition: .3s;
}
form input:focus { border-bottom: 2px solid rgba(255, 132, 132, 0.5); transition: .3s; transform: scale(1.1); width: 200px;
}
.container-task { width: 50vw; height: 50vh; margin: 10% auto;
}
.container-task .task { width: 100%; padding: 5px; text-align: center; position: relative; border-radius: 15px; transition: all .5s;
}
.container-task .task.check { background-color: rgba(211, 255, 206, 0.5); text-decoration: line-through;
}
.container-task .task .done { opacity: 0; position: absolute; left: 7px; top: 0px; width: 12px; height: 12px; font-size: 1.2em; border: none; background-color: transparent; color: #7575ff; transform: translateX(50px); transition: all .5s;
}
.container-task .task .delete { opacity: 0; position: absolute; right: 7px; top: 0px; width: 12px; height: 12px; font-size: 1.2em; border: none; background-color: transparent; color: #ff8484; transform: translateX(-50px); transition: all .5s;
}
.container-task .task button:hover { cursor: pointer;
}
.container-task .task:hover { cursor: pointer; transform: scale(1.2); transition: all .5s;
}
.container-task .task:hover button { opacity: 1; transform: translateX(0); transition: all .5s;
}
.container-task .task.taskDone { text-decoration: line-through; background-color: lightgray;
}
365JS - Todolist - Script Codes JS Codes
'use strict';
/* Shadow Effect */
var container = document.querySelector('.container');
var title = container.querySelector('.title');
var walk = 20;
var shadow = function shadow(event) { var width = container.offsetWidth; var x = event.offsetX; if (undefined !== event.target) { x = x + event.target.offsetLeft; } var xWalk = Math.round(x / width * walk - walk / 2); title.style.textShadow = '1px 1px 0px rgba(0, 0, 0, 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t' + xWalk + 'px 0px 5px rgba(255, 132, 132, .5),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t' + -xWalk + 'px 0px 5px rgba(117, 117, 255, .5)';
};
document.addEventListener('mousemove', shadow);
/* Todolist */
var containerTask = document.querySelector('.container-task');
var form = document.querySelector('form');
var input = document.querySelector('input');
var tasksButtons = Array.from(document.querySelectorAll('.task>button'));
var addTask = function addTask(event) { event.preventDefault(); var taskInput = input.value; if (taskInput.length > 0) { var taskHTML = '<button class=\'done\'>✓</button><h4>' + taskInput + '</h4><button class=\'delete\'>✗</button>'; var div = document.createElement('div'); div.classList.add('task'); div.innerHTML = taskHTML; containerTask.appendChild(div); } form.reset(); tasksButtons = Array.from(document.querySelectorAll('.task>button')); tasksButtons.forEach(function (button) { button.addEventListener('click', function () { if (button.classList.contains('done')) { if (button.parentNode.classList.contains('check')) { button.parentNode.classList = 'task'; } else { button.parentNode.classList = 'task check'; } } else if (button.classList.contains('delete')) { containerTask.removeChild(button.parentNode); tasksButtons = Array.from(document.querySelectorAll('.task>button')); } }); });
};
form.addEventListener('submit', addTask);
Developer | Kévin Barfleur |
Username | kevin_barfleur |
Uploaded | January 30, 2023 |
Rating | 3 |
Size | 4,506 Kb |
Views | 2,024 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
ReactMeteoApp | 7,492 Kb |
365JS - Clavier | 4,037 Kb |
Stylexemple | 4,088 Kb |
ReactJS - Todolist | 6,102 Kb |
ReactJS - Camper Leaderboard | 5,169 Kb |
365JS - 1 - Snake | 6,331 Kb |
ReactJS - Markdown Previewer | 4,115 Kb |
ReactJS - Portfolio | 6,875 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Fellowship of the Ring | Aussieyang | 2,639 Kb |
Confirm Close Of Foundation Reveal Modal | Winghouchan | 1,818 Kb |
CSS Bot Confusion | Jpod | 3,456 Kb |
RPG Style Text Dialogue | Odylic | 2,635 Kb |
A Pen by Adrien Clerbois | AClerbois | 6,501 Kb |
HTM5 picture dropzone | Jaysalvat | 2,576 Kb |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
Gradients | Karpovsystems | 2,394 Kb |
CSS Parent Selector | Tomhodgins | 2,143 Kb |
Zeichensatz | Moklick | 2,058 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!