Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added public/.DS_Store
Binary file not shown.
Binary file added public/css/.DS_Store
Binary file not shown.
70 changes: 68 additions & 2 deletions public/css/style.css
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
h1 {
color:red;
body {
background-color: lightgreen;
}

@media (max-width: 1500px) {
body {
background-color: MediumSeaGreen;
}
}

@media (max-width: 1250px) {
body {
background-color: SeaGreen;
}
}

@media (max-width: 1000px) {
body {
background-color: ForestGreen;
}
}

@media (max-width: 750px) {
body {
background-color: Green;
}
}

@media (max-width: 500px) {
body {
background-color: DarkGreen;
}
}

h2 {
font-size: 1.5em; /* 30px/16=1.875em */
}

h3 {
font-size: 1.5em; /* 30px/16=1.875em */
}

h4 {
font-size: 1.5em; /* 30px/16=1.875em */
}

ul li {
list-style:none;
}
input[type="checkbox"]{
margin-right: 35px;
}
.finished-task{
text-decoration: line-through;
color-#F00
}

#container{
width:100%;
height:100%;
}

.centered-panel{
width:50%;
margin:0 auto;
border:5px solid black;
padding:40px;
background-color:white;
}
50 changes: 38 additions & 12 deletions public/index.html
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<h1>Hello World!</h1>
<p>This is our home page</p>
</body>
</html>
<!DOCTYPE HTML>
<HTML>

<HEAD>
<link rel="stylesheet" href="css/style.css">
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<TITLE>My To Do List</TITLE>
</HEAD>

<BODY>
<div id="container">
<div class="centered-panel">
<h1>Honey Do This, Do That List </h1>
<h2>
Enter a task
<input type="text" id="taskInput" placeholder="Example: Churn the Butter" size="35">
<button type="button">Submit</button>

</h2>
<hr>
<h3>
Not Completed
</h3>
<ul class ="todo-list">
<li class='task'><input type = 'checkbox'>Pick up Dry Cleaning</li>
<li class ='task'><input type = 'checkbox'>Buy Apples, Bananas and Celery at Grocers</li>
<li class ='task'><input type = 'checkbox'>Vaccuum and Mop Floors</li>
</ul>

<h4>Completed</h4>
<ul class="finished-list">

</ul>
</div>
</div>
<script src="js/script.js"></script>
</BODY>
</HTML>
Binary file added public/js/.DS_Store
Binary file not shown.
20 changes: 20 additions & 0 deletions public/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$( document ).ready(function() {
$("button").click(function(){
console.log($('#taskInput').val() );
$(".todo-list").append('<li class="task"><input type = "checkbox"/>' + $('#taskInput').val()+'</li>');
});

$(document).on("click",".task",function(){
$(this).fadeOut( "slow", function() {
if($(this).find("input").is(':checked')){
$(this).appendTo(".finished-list").addClass("finished-task");
}else{
$(this).appendTo(".todo-list").removeClass("finished-task");
}

$(this).fadeIn("slow");
});
});

$(".finished-task input").prop( "disabled", true ); //Disable
});