Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Code S1E1 #90

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
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
62 changes: 47 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,51 @@
<!DOCTYPE html>
<html>
<HEAD><title>Todo App</title>
<link href='https://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="style.css" type="text/css" MEDIA="screen" charset="utf-8">
</HEAD>
<head><title>Todo App</title>
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet" >
<link rel="stylesheet" href="style.css" media="screen" charset="utf-8">
</head>
<body>
<div class="aaa"><img src="./eisenhower-matrix.jpg"><a class='more_inf' href="https://goal-life.com/page/method/matrix-eisenhower">Want more details&quest;</a></div>
<div class="centered-main-page-element"><p id='topSectionForAddingElementToList'><label for="new-task">Add Item</label><div class="task-row-wrapper"><input id='new-task'class="task" type="text"><button>Add</button></div>
</p><h3>Todo</h3>
<ul id='incompleteTasks'>
<li><input type='checkbox'><label class="task">Pay Bills</label><input type="text" class="task"><button class="edit">Edit</button><button class="delete"><img src="./remove.svg"></button></li>
<li class="editMode"><input type="checkbox"><label class="task">Go Shopping</label><input type="text" value="Go Shopping" class="task"><button class='edit'>Save</button><button class="delete"><img src="./remove.svg"></button></li>
</ul><h3>Completed</h3><ul id="completed-tasks"><li><input type="checkbox" checked><label class="task">See the Doctor</label><input type="text" class="task"><button class="edit">Edit</button><button class="delete"><img src="./remove.svg"></button>
</li>
</ul>
</div>
<script type="text/javascript" SRC="app.js"></script>
<div class="body__image-container">
<img src="./eisenhower-matrix.jpg" alt="more"><a class="more_inf" href="https://goal-life.com/page/method/matrix-eisenhower">Want more details?</a>
</div>
<div class="body__content-container">
<p>
<label for="new-task">Add Item</label>
<div class="task-row-wrapper">
<input id="new-task" class="task" type="text">
<button>Add</button>
</div>
</p>
<h3>Todo</h3>
<ul id="incompleteTasks">
<li>
<input type="checkbox">
<label class="task">Pay Bills</label>
<input type="text" class="task">
<button class="edit">Edit</button>
<button class="delete"><img src="./remove.svg" alt="remove"></button>
</li>
<li class="editMode">
<input type="checkbox">
<label class="task">Go Shopping</label>
<input type="text" value="Go Shopping" class="task">
<button class="edit">Save</button>
<button class="delete"><img src="./remove.svg"></button>
</li>
</ul>
<h3>Completed</h3>
<ul id="completed-tasks">
<li>
<input type="checkbox" checked>
<label class="task">See the Doctor</label>
<input type="text" class="task">
<button class="edit">Edit</button>
<button class="delete">
<img src="./remove.svg" alt="remove">
</button>
</li>
</ul>
</div>
<script src="app.js"></script>
</body>
</html>
38 changes: 20 additions & 18 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@ body {
color: #333;
font-family: Lato, sans-serif;
}
.aaa {
.body__image-container {
width: 500px;
margin: 0 auto;
display: block;
text-align: right;
}
.aaa img {
.body__image-container img {
width: 100%;
}
.aaa .more_inf {
.more_inf {
font-family: fantasy, cursive;
}

@media (max-width:768px) {
.aaa { text-align: center;
.body__image-container {
text-align: center;
}
}
}
.centered-main-page-element {
.body__content-container {
display: block;
width: 500px;
margin: 0 auto 0;
Expand All @@ -35,14 +36,15 @@ body {
display: flex;
}
ul {
margin:0;
margin: 0;
padding: 0px;
}
li, h3 {
list-style:none;
li,
h3 {
list-style: none;
}
input,button{
outline:none;
outline: none;
}
button {
background: none;
Expand Down Expand Up @@ -88,7 +90,7 @@ label[for='new-task'] {
display: block;
margin: 0 0 20px;
}
input#new-task {
#new-task {
width: 318px;
}

Expand Down Expand Up @@ -116,7 +118,7 @@ li > label {
width: 226px;
}
li > input[type="text"] {
width: 226px
width: 226px;
}
button.delete img {
height: 2em;
Expand All @@ -128,21 +130,21 @@ button.delete img:hover {
}

/* Completed */
ul#completed-tasks label {
text-decoration: line-through
#completed-tasks {
text-decoration: line-through;
color: #888;
}

/* Edit Task */
ul li input[type=text] {
display:none
display: none;
}

ul li.editMode input[type=text] {
display:inline-block;
width:224px
display: inline-block;
width: 224px
}

ul li.editMode label {
display:none;
display: none;
}