Skip to content

Instantly share code, notes, and snippets.

@sembug
Created March 5, 2020 13:59
Show Gist options
  • Save sembug/38da8b91377b0bd30b035d6753346eb6 to your computer and use it in GitHub Desktop.
Save sembug/38da8b91377b0bd30b035d6753346eb6 to your computer and use it in GitHub Desktop.
Todo List

Features

  • [] Adding a single todo
  • [] Clearing the list
  • [] Marking and deleting a single todo
html{
height: 100%;
background-image: linear-gradient(#ff6161,#ff768c);
background-repeat: no-repeat;
font-family: sans-serif;
color: #0f222d;
background-size: auto;
}
.main{
width: 400px;
display: flex;
justify-content: center;
flex-direction: column;
margin: auto;
}
h1{
text-align: center;
color: #fff;
}
form{
background-color: #fff;
padding: 15px;
}
input[type="text"]{
width: 310px;
height: 30px;
outline: 0;
border: none;
font-size: 1.5em;
background: #fff;
color: #2f4f4f;
}
button{
font-size: 1.5em;
color: #53BDFF;
background-color: #fff;
outline: 0;
border: none;
width: 50px;
}
.tasksBoard{
background-color: #fff;
margin-top: 20px;
padding-top: 10px;
padding-bottom: 10px;
padding-right: 40px;
/*display: none;*/
}
ul{
list-style: none;
}
li{
border-bottom: 1px solid #53BDFF;
padding-bottom: 15px;
padding-top: 15px;
font-size: 1.3em;
color: #2f4f4f;
}
a{
float: right;
text-align: right;
color: #ff6161;
font-size: 1.2em;
cursor: pointer;
}
.delete{
background-color: #ff6161;
padding: 0px 3px 0px 3px;
color: #fff;
cursor: pointer;
}
@media (max-width: 500px) {
.main{
margin: auto;
width: 100%;
}
input[type="text"]{
width: 80%;
}
button{
width: 10%;
}
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>toDoList</title>
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="main">
<h1>TO-DO LIST</h1>
<form class="" action="index.html" method="post">
<input type="text" placeholder="new task" name="task">
<button type="submit"><strong>ADD</strong></button>
</form>
<div class="tasksBoard">
<ul>
<li><span class="delete">×</span><input type="checkbox"><label>Vanilla JavaScript</label></li>
<li><span class="delete">×</span><input type="checkbox"><label>Vue.js</label></li>
<li><span class="delete">×</span><input type="checkbox"><label>React.js</label></li>
<li><span class="delete">×</span><input type="checkbox"><label>Node.js</label></li>
</ul>
<a id="clear">Clear</a>
</div>
</div>
<script type="text/javascript" src="app.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment