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 #28

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3c32fc9
refactor: change structure of the project
Jan 8, 2024
9ca493a
fix: create doctype tag
Jan 8, 2024
e16bf2c
fix: add atribute lang to html tag
Jan 8, 2024
aae3fae
fix: rename atribute lang to html tag
Jan 8, 2024
1594d57
fix: set padding for the head tag, added two meta tags for page encod…
Jan 8, 2024
a810fa9
fix: set padding inside the body tag
Jan 8, 2024
7d7b579
fix: rename tag div to header and add rename class aaa to header
Jan 8, 2024
e68f751
feat: add class header__logo to tag img and rename class to tag a
Jan 8, 2024
c4d3bd8
fix: create main tag with class main
Jan 8, 2024
f0aef91
fix: create main tag with class main
Jan 8, 2024
839658a
refactor: changed the upper quotes and set the alt attribute for the …
Jan 8, 2024
a989bf9
fix: edit link path to tag img for atribute src
Jan 8, 2024
609069e
refactor: edit tag p to h1
Jan 8, 2024
3bf34e5
refactor: rename class to tag h2, ul
Jan 8, 2024
77e901c
fix: edit erorrs validator
Jan 8, 2024
c6232a6
fix: rename body to .page and edit erros padding
Jan 8, 2024
00b9a80
fix: rename class's
Jan 8, 2024
80fd5ab
fix: rename class's
Jan 8, 2024
28272d0
fix: got variables using querySelector
Jan 8, 2024
dfed436
fix: set template strings in functions
Jan 8, 2024
e6c1ba5
refactor: refactor function addTask
Jan 8, 2024
15b98b0
refactor: refactor function editTask
Jan 8, 2024
a4d5bc2
refactor: refactor function deleteTask
Jan 8, 2024
0c94979
refactor: refactor function taskCompleted
Jan 8, 2024
7e6f58e
refactor: refactor function taskIncomplete
Jan 8, 2024
b1b838e
fix: delete double click function
Jan 8, 2024
b969397
refactor: refactor function bindTaskEvents
Jan 8, 2024
e30f3e9
refactor: refactor function
Jan 8, 2024
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
169 changes: 169 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
/* Basic Style */
.page {
background-color: #f8f8f8;
color: #333;
font-family: Lato, sans-serif;
}

.header {
width: 500px;
margin: 0 auto;
display: block;
text-align: right;
}

.header__logo {
width: 100%;
}

.header__link {
font-family: fantasy, cursive;
}

.main {
display: block;
width: 500px;
margin: 0 auto 0;
}

.task {
width: 56%;
display: inline-block;
flex-grow: 1;
}

.task-row-wrapper {
display: flex;
}

.task__list {
margin: 0;
padding: 0px;
}

li,
.main__heading {
list-style: none;
}

input,
button {
outline: none;
}

button {
background: none;
border: 0px;
color: #888;
font-size: 15px;
width: 60px;
font-family: Lato, sans-serif;
cursor: pointer;
}

button:hover {
color: #3a3a3a;
}
/* Heading */
.main__heading,
label[for="new-task"] {
color: #333;
font-weight: 700;
font-size: 15px;
border-bottom: 2px solid #333;
padding: 30px 0 10px;
margin: 0;
text-transform: uppercase;
}

input[type="text"] {
margin: 0;
font-size: 18px;
line-height: 18px;
height: 21px;
padding: 0 9px;
border: 1px solid #ddd;
background: #fff;
border-radius: 6px;
font-family: Lato, sans-serif;
color: #888;
}

input[type="text"]:focus {
color: #333;
}

/* New Task */
label[for="new-task"] {
display: block;
margin: 0 0 20px;
}

#new-task {
width: 318px;
}

/* Task list */
.task__list-item {
overflow: hidden;
padding: 20px 0;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
}

.task__list-item > * {
vertical-align: middle;
}

.task__list-item > input[type="checkbox"] {
margin: 0 10px;
}

.task__list-item > label {
padding-left: 10px;
box-sizing: border-box;
font-size: 18px;
width: 226px;
}

.task__list-item > input[type="text"] {
width: 226px;
}

.delete img {
height: 2em;
transform: rotateZ(45deg);
transition: transform 200ms ease-in;
}

.delete img:hover {
transform: rotateZ(0);
}

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

/* Edit Task */
.task__list-item input[type="text"] {
display: none;
}

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

.editMode label {
display: none;
}

@media screen and (max-width: 768px) {
.header__link {
text-align: center;
}
}
File renamed without changes
92 changes: 46 additions & 46 deletions remove.svg → img/remove.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions index copy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Todo App</title>
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet">
<link href="./css/style.css" rel="stylesheet">
</head>
<body>
<header class="header">
<img class="header__logo" src="./img/eisenhower-matrix.jpg" alt="logotype site">
<a class="header__link" href="https://goal-life.com/page/method/matrix-eisenhower">
Want more details&quest;
</a>
</header>
<main class="main">
<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" alt="remove img">
</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" alt="remove img">
</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="./img/remove.svg" alt="remove img">
</button>
</li>
</ul>
</main>
<script src="./js/app.js"></script>
</body>
</html>
Loading