Skip to content

Commit

Permalink
ver 1.0.0.1
Browse files Browse the repository at this point in the history
fixed design and made the list rendering better
  • Loading branch information
ShinyACash committed Sep 20, 2024
1 parent 1b1bd62 commit 0b23258
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 22 deletions.
Binary file modified .vs/To-do-Listsite/v17/.wsuo
Binary file not shown.
22 changes: 11 additions & 11 deletions .vs/To-do-Listsite/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\codeshit.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:codeshit.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:index.html||{40D31677-CBC0-4297-A9EF-89D907823A98}"
Expand All @@ -14,6 +10,10 @@
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\style.css||{A5401142-F49D-43DB-90B1-F57BA349E55C}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:style.css||{A5401142-F49D-43DB-90B1-F57BA349E55C}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\codeshit.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:codeshit.js||{14D17961-FE51-464D-9111-C4AF11D7D99A}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}"
Expand All @@ -26,7 +26,7 @@
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 2,
"SelectedChildIndex": 4,
"Children": [
{
"$type": "Bookmark",
Expand All @@ -46,39 +46,39 @@
},
{
"$type": "Document",
"DocumentIndex": 0,
"DocumentIndex": 2,
"Title": "codeshit.js",
"DocumentMoniker": "C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\codeshit.js",
"RelativeDocumentMoniker": "codeshit.js",
"ToolTip": "C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\codeshit.js",
"RelativeToolTip": "codeshit.js",
"ViewState": "AQIAABEAAAAAAAAAAAAQwEEAAAAbAAAA",
"ViewState": "AQIAAAAAAAAAAAAAAAAAACAAAABIAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001646|",
"WhenOpened": "2024-09-15T05:49:41.04Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"DocumentIndex": 1,
"Title": "style.css",
"DocumentMoniker": "C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\style.css",
"RelativeDocumentMoniker": "style.css",
"ToolTip": "C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\style.css",
"RelativeToolTip": "style.css",
"ViewState": "AQIAAA4BAAAAAAAAAAAAAEoBAAANAAAA",
"ViewState": "AQIAAPAAAAAAAAAAAAAAAHIBAAARAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003000|",
"WhenOpened": "2024-09-15T05:07:08.959Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"DocumentIndex": 0,
"Title": "index.html",
"DocumentMoniker": "C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\index.html",
"RelativeDocumentMoniker": "index.html",
"ToolTip": "C:\\Users\\Akash\\Documents\\GitHub\\To-do-Listsite\\index.html",
"RelativeToolTip": "index.html",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAB8AAAA0AAAA",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAQAAABsAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001512|",
"WhenOpened": "2024-09-15T05:07:01.254Z",
"EditorCaption": ""
Expand Down
Binary file modified .vs/slnx.sqlite
Binary file not shown.
21 changes: 14 additions & 7 deletions codeshit.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ document.addEventListener('DOMContentLoaded', () => {
const delList = document.getElementById('delList');

let lists = JSON.parse(localStorage.getItem('todo_lists')) || { 'default': [] };
let currentList = 'default';
let currentList = Object.keys(lists)[0];

function saveLists() {
localStorage.setItem('todo_lists', JSON.stringify(lists));
Expand Down Expand Up @@ -64,11 +64,16 @@ document.addEventListener('DOMContentLoaded', () => {
delList.addEventListener('click', () => deleteList());

function deleteList() {
delete lists[currentList];
window.alert("Your window will be refreshing now to display updated lists teehee.");
location.reload();
saveLists();
renderTasks();
if (lists.length != 0) {
delete lists[currentList];
window.alert("Your window will be refreshing now to display updated lists teehee.");
location.reload();
saveLists();
renderTasks();
}
else {
window.alert("You only have one list left could you please add a new one and then delete this one? plsplsplspls");
}
}

function updateProgress() {
Expand All @@ -83,7 +88,9 @@ document.addEventListener('DOMContentLoaded', () => {
tot = tot + lists[listName].length;
tot_c = tot_c + lists[listName].filter(task => task.completed).length;
if (lists[listName].length == lists[listName].filter(task => task.completed).length) {
noOfLists++;
if (lists[listName].length != 0) {
noOfLists++;
}
}
});
const progressTot = tot === 0 ? 0 : (tot_c / tot) * 100;
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title>Todo List</title>
<link rel="stylesheet" href="style.css">
</head>
Expand Down Expand Up @@ -32,7 +32,7 @@ <h1>To-Do</h1>
<button class="delete-btn-list" id="delList">x</button>
<div class="list-header">
<select id="list-selector" class="list-selector">
<option value="Default">Default List</option>
<option></option>
</select>
<button id="new-list-btn" class="todo-input btn">New List</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ p2 {
font-size: 3rem;
padding: 10px;
color: black;
margin-top: 100px;
margin-top: 80px;
}

.prog1 {
Expand Down Expand Up @@ -550,7 +550,7 @@ p2 {
width: 96.5vw;
padding-inline: 5vw;
padding-top: 2.15vh;
margin: -5vw;
margin: -5.5vw;
padding-bottom: 1vh;
}

Expand Down

0 comments on commit 0b23258

Please sign in to comment.