From 73c75a99f4340a3b70a267b0465ad58cc485491f Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Thu, 12 Dec 2024 17:09:54 +0200
Subject: [PATCH 01/20] init: init project
---
.idea/.gitignore | 8 ++++++++
.idea/vcs.xml | 4 ++++
2 files changed, 12 insertions(+)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/vcs.xml
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000000..13566b81b0
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000000..d843f340d2
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
From 99131e013222e81248bbe93905cc0a5d0327a0f5 Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Mon, 16 Dec 2024 14:06:30 +0200
Subject: [PATCH 02/20] fix(basic-2.2): add Html5 DOCTYPE tag
---
.idea/clean-code-s1e1.iml | 12 ++++++++++++
.idea/modules.xml | 8 ++++++++
.idea/vcs.xml | 4 +++-
index.html | 1 +
4 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 .idea/clean-code-s1e1.iml
create mode 100644 .idea/modules.xml
diff --git a/.idea/clean-code-s1e1.iml b/.idea/clean-code-s1e1.iml
new file mode 100644
index 0000000000..24643cc374
--- /dev/null
+++ b/.idea/clean-code-s1e1.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000000..84337bf755
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index d843f340d2..35eb1ddfbb 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,4 +1,6 @@
-
+
+
+
\ No newline at end of file
diff --git a/index.html b/index.html
index ef4aa1f60c..72fb82e737 100644
--- a/index.html
+++ b/index.html
@@ -1,3 +1,4 @@
+
+
+
Todo
-
-
-
+Completed
diff --git a/style.css b/style.css
index ab36227705..6e104fed6e 100644
--- a/style.css
+++ b/style.css
@@ -58,7 +58,7 @@ button:hover {
}
/* Heading */
h3,
-label[for='new-task'] {
+label[for="new-task"] {
color: #333;
font-weight: 700;
font-size: 15px;
@@ -84,7 +84,7 @@ input[type="text"]:focus {
}
/* New Task */
-label[for='new-task'] {
+label[for="new-task"] {
display: block;
margin: 0 0 20px;
}
From 8c8250d13605b69502f5b51afbc0a24f8b7b59c1 Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Mon, 16 Dec 2024 14:38:49 +0200
Subject: [PATCH 06/20] refactor(basic-2.1): adjust indentation to respect the
nesting hierarchy
---
index.html | 64 +++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 47 insertions(+), 17 deletions(-)
diff --git a/index.html b/index.html
index ab041370b7..efca9108d4 100644
--- a/index.html
+++ b/index.html
@@ -1,20 +1,50 @@
-Todo App
-
-
-
-
-
-
-
Todo
-
Completed
-
-
-
+
+ Todo App
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Todo
+
+
Completed
+
+
+
+
\ No newline at end of file
From fb3addc52a6dbf2f24681406e678a5b22e0efa1b Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Mon, 16 Dec 2024 14:40:16 +0200
Subject: [PATCH 07/20] refactor(basic-2.3): update named character reference
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index efca9108d4..2547f14a03 100644
--- a/index.html
+++ b/index.html
@@ -7,7 +7,7 @@
From 1a1d3786773676fe399521205f2fbee03afed120 Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Mon, 16 Dec 2024 14:49:35 +0200
Subject: [PATCH 08/20] fix(basic(2-1)
---
index.html | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 2547f14a03..96ad92e6b7 100644
--- a/index.html
+++ b/index.html
@@ -33,7 +33,8 @@
Todo
-
+
+
Completed
@@ -44,7 +45,7 @@ Completed
-
+
\ No newline at end of file
From 225afb3f4522e1b21f898ad5d1d326cc95217023 Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Mon, 16 Dec 2024 14:57:07 +0200
Subject: [PATCH 09/20] fix(html-2.5): break long HTML lines into multiple
lines for readability
---
index.html | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/index.html b/index.html
index 96ad92e6b7..b15c79c5d9 100644
--- a/index.html
+++ b/index.html
@@ -2,18 +2,36 @@
Todo App
-
-
+
+
From 3766022daeed2630db663d3af0b4c5db4dabace5 Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Tue, 17 Dec 2024 07:18:15 +0200
Subject: [PATCH 10/20] refactor(basic-3.5): make hierarchy in media block
---
index.html | 3 ++-
style.css | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index b15c79c5d9..3e410b221c 100644
--- a/index.html
+++ b/index.html
@@ -58,7 +58,8 @@
Todo
Completed
- -
+
-
+
diff --git a/style.css b/style.css
index 6e104fed6e..4aeabae6a6 100644
--- a/style.css
+++ b/style.css
@@ -18,9 +18,11 @@ body {
}
@media (max-width:768px) {
-.aaa { text-align: center;
-}
+ .aaa {
+ text-align: center;
+ }
}
+
.centered-main-page-element {
display: block;
width: 500px;
From 89028e26f4fb0615311a161b02ea644c88cf2280 Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Tue, 17 Dec 2024 07:22:13 +0200
Subject: [PATCH 11/20] refactor(basic-3.6): ensure consistent spacing after
property names
---
style.css | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/style.css b/style.css
index 4aeabae6a6..ffc4ec6991 100644
--- a/style.css
+++ b/style.css
@@ -17,7 +17,7 @@ body {
font-family: fantasy, cursive;
}
-@media (max-width:768px) {
+@media (max-width: 768px) {
.aaa {
text-align: center;
}
@@ -41,10 +41,10 @@ ul {
padding: 0px;
}
li, h3 {
- list-style:none;
+ list-style: none;
}
input,button{
- outline:none;
+ outline: none;
}
button {
background: none;
@@ -117,7 +117,7 @@ li > label {
font-size: 18px;
width: 226px;
}
-li > input[type="text"] {
+li > input[type="text"] {
width: 226px
}
button.delete img {
@@ -131,20 +131,20 @@ button.delete img:hover {
/* Completed */
ul#completed-tasks label {
- text-decoration: line-through
+ 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;
}
\ No newline at end of file
From c582d90f80ecd31cca2e28fcbbf756f4235e350e Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Tue, 17 Dec 2024 07:24:00 +0200
Subject: [PATCH 12/20] refactor(basic-3.7): add semicolon after each property
---
style.css | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/style.css b/style.css
index ffc4ec6991..633998e914 100644
--- a/style.css
+++ b/style.css
@@ -31,7 +31,7 @@ body {
.task {
width: 56%;
display: inline-block;
- flex-grow: 1
+ flex-grow: 1;
}
.task-row-wrapper {
display: flex;
@@ -118,7 +118,7 @@ li > label {
width: 226px;
}
li > input[type="text"] {
- width: 226px
+ width: 226px;
}
button.delete img {
height: 2em;
@@ -137,12 +137,12 @@ ul#completed-tasks label {
/* Edit Task */
ul li input[type=text] {
- display: none
+ display: none;
}
ul li.editMode input[type=text] {
display: inline-block;
- width: 224px
+ width: 224px;
}
ul li.editMode label {
From 5014e608b59b5301b9df8ee0b63534cc5301901e Mon Sep 17 00:00:00 2001
From: Volodia34 <120255295+Volodia34@users.noreply.github.com>
Date: Tue, 17 Dec 2024 07:37:50 +0200
Subject: [PATCH 13/20] refactor(basic-3.7): ensure semicolon usage after
properties
---
app.js | 14 +++++++-------
index.html | 6 +++---
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/app.js b/app.js
index efe00ad7f4..e11b9b5279 100644
--- a/app.js
+++ b/app.js
@@ -10,7 +10,7 @@
var taskInput=document.getElementById("new-task");//Add a new task.
var addButton=document.getElementsByTagName("button")[0];//first button
-var incompleteTaskHolder=document.getElementById("incompleteTasks");//ul of #incompleteTasks
+var incompleteTaskHolder=document.getElementById("incomplete-tasks");//ul of #incompleteTasks
var completedTasksHolder=document.getElementById("completed-tasks");//completed-tasks
@@ -85,11 +85,11 @@ var editTask=function(){
var editInput=listItem.querySelector("input[type=text]");
var label=listItem.querySelector("label");
var editBtn=listItem.querySelector(".edit");
- var containsClass=listItem.classList.contains("editMode");
- //If class of the parent is .editmode
+ var containsClass=listItem.classList.contains("edit-mode");
+ //If class of the parent is .edit-mode
if(containsClass){
- //switch to .editmode
+ //switch to .edit-mode
//label becomes the inputs value.
label.innerText=editInput.value;
editBtn.innerText="Edit";
@@ -98,8 +98,8 @@ var editTask=function(){
editBtn.innerText="Save";
}
- //toggle .editmode on the parent.
- listItem.classList.toggle("editMode");
+ //toggle .edit-mode on the parent.
+ listItem.classList.toggle("edit-mode");
};
@@ -119,7 +119,7 @@ var deleteTask=function(){
var taskCompleted=function(){
console.log("Complete Task...");
- //Append the task list item to the #completed-tasks
+ //Append the task list item to the #incomplete-tasks
var listItem=this.parentNode;
completedTasksHolder.appendChild(listItem);
bindTaskEvents(listItem, taskIncomplete);
diff --git a/index.html b/index.html
index 3e410b221c..53d88adb7e 100644
--- a/index.html
+++ b/index.html
@@ -24,7 +24,7 @@