Skip to content

Instantly share code, notes, and snippets.

@erralb
Created May 2, 2024 20:37
Show Gist options
  • Save erralb/2bb30b1327590d2e252723fa92bea960 to your computer and use it in GitHub Desktop.
Save erralb/2bb30b1327590d2e252723fa92bea960 to your computer and use it in GitHub Desktop.
index.html pour la v10 de la todo list
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Todo List</title>
<style>
ul {
min-width: 400px;
display: inline-flex;
flex-direction: column;
list-style-type: none;
padding: 20px;
border-bottom: 4px solid lightgray;
}
li {
padding: 10px;
border: 1px solid #ccc;
margin: 5px 0;
display: flex;
}
li.done {
background-color: rgb(249, 246, 246);
}
li.done span {
text-decoration: line-through;
}
li input {
margin-right: 20px;
cursor: pointer;
}
li button {
margin-left: auto;
cursor: pointer;
}
</style>
</head>
<body>
<h1>Todo Lists</h1>
<div><button onclick="purgeLocalStorage()">Supprimer toutes les listes</button></div> <br>
<div>
<label for="listName">
Nom de la liste :
<input type="text" id="list-name" value="My Todo" placeholder="My todo">
</label>
<button onclick="createList()">Créer</button>
</div>
<div id="lists-container"></div>
<script defer src="v10-local-storage.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment