-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
69 lines (65 loc) · 2.04 KB
/
index.html
File metadata and controls
69 lines (65 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html>
<html>
<head>
<title>Task Manager</title>
<link rel="stylesheet" href="./src/style.css" />
</head>
<body>
<div class="app-container">
<div class="content-container">
<!-- <button id="toggleHeader" onclick="toggleHeader()">☰</button> -->
<header id="header">
<h1>Task Manager</h1>
<nav>
<button id="toggleStats" onclick="toggleStats()">Stats</button>
<button id="toggleOptions" onclick="toggleOptions()">Options</button>
</nav>
</header>
<div id="optionsContainer"></div>
<div id="statsContainer"></div>
<div id="filtersContainer"></div>
<div class="input-container">
<input
class="task-input"
id="taskInput"
type="text"
placeholder="Add a task..."
/>
<button id="addTaskBtn">Add</button>
</div>
<div class="tasks-container">
<ul id="taskList" class="task-list"></ul>
</div>
</div>
</div>
<script src="src/index.js" type="module"></script>
<script>
let index = 0;
let showOptions = false;
let showStats = false;
document.documentElement.setAttribute("data-theme", "dark");
const toggleOptions = () => {
showOptions = !showOptions;
const options = document.querySelector("#optionsContainer");
const button = document.querySelector("#toggleOptions");
button.classList.toggle("selected")
if (showOptions) {
options.style.display = "block";
} else {
options.style.display = "none";
}
}
const toggleStats = () => {
showStats = !showStats;
const stats = document.querySelector("#statsContainer");
const button = document.querySelector("#toggleStats");
button.classList.toggle("selected")
if (showStats) {
stats.style.display = "block";
} else {
stats.style.display = "none";
}
}
</script>
</body>
</html>