Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
AsheelAhmedSiddiqui committed Jun 4, 2024
1 parent abed61b commit 1faae0d
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 14 deletions.
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ <h1>Todo List</h1>
<ol id="ol"></ol>
</div>
</div>

<footer>
<p>CopyRight &copy; <span id="year"></span> Asheel Ahmed Siddiqui</p>
</footer>
<script src="main.js"></script>
</body>
</html>
51 changes: 38 additions & 13 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
}

body {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
margin-top: 50px;
background-color: #352f5b;
color: #fff;
}
Expand All @@ -30,10 +27,31 @@ body {
font-size: 2.6rem;
}

.show-box{
border: 1px solid #fff;
border-radius: 5px;
margin-top: 20px;
.show-box {
border: 1px solid #fff;
border-radius: 5px;
margin-top: 20px;
height: 350px;
overflow-y: scroll;
}

.show-box::-webkit-scrollbar {
width: 6px;
}

/* Track */
.show-box::-webkit-scrollbar-track {
background: #f1f1f1;
}

/* Handle */
.show-box::-webkit-scrollbar-thumb {
background: #888;
}

/* Handle on hover */
.show-box::-webkit-scrollbar-thumb:hover {
background: #555;
}

.input-box {
Expand All @@ -52,12 +70,11 @@ body {
border-radius: 5px;
}


.input-box button {
font-size: 1.4rem;
padding: 14px 20px;
border: none;
border-radius: 5px;
font-size: 1.4rem;
padding: 14px 20px;
border: none;
border-radius: 5px;
}

ol {
Expand Down Expand Up @@ -94,8 +111,16 @@ ol li .btn-container button {
border: none;
padding: 10px 20px;
border-radius: 20px;
cursor: pointer;
}

ol li input {
padding: 0 10px;
}

/* footer Style */
footer {
margin-top: 30px;
font-size: 1.2rem;
text-align: center;
}
7 changes: 7 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
let userValue = document.getElementById("userValue");
let addBtn = document.getElementById("add");
let ol = document.getElementById("ol");
let show = document.getElementsByClassName("show-box");

addBtn.addEventListener("click", () => {
let li = document.createElement("li");
Expand Down Expand Up @@ -69,3 +70,9 @@ userValue.addEventListener("keydown", (e) => {
li.appendChild(newDiv);
}
});


let now = new Date();
let currYear = now.getFullYear();
let span = document.getElementById('year');
span.textContent = `2024 - ${currYear}`;

0 comments on commit 1faae0d

Please sign in to comment.