-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
88 lines (84 loc) · 3.88 KB
/
index.html
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DumbDo - Stupidly Simple Todo List</title>
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<script>
// Prevent theme flicker by setting theme immediately
(function() {
const theme = localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', theme);
})();
</script>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="app">
<header>
<h1>DumbDo</h1>
<div class="list-controls">
<div class="list-selector-container">
<select id="listSelector" aria-label="Select todo list">
<option value="List 1">List 1</option>
</select>
</div>
<div class="list-buttons">
<button type="button" id="renameList" class="icon-btn" aria-label="Rename current list">
<svg viewBox="0 0 24 24" width="14" height="14">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
</svg>
</button>
<button type="button" id="addList" class="icon-btn" aria-label="Add new list">
<svg viewBox="0 0 24 24" width="14" height="14">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</div>
</div>
<button id="themeToggle" aria-label="Toggle theme">
<svg class="moon" viewBox="0 0 24 24">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
<svg class="sun" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
</button>
</header>
<main>
<form id="todoForm" class="todo-form">
<input
type="text"
id="todoInput"
placeholder="What needs to be done?"
required
>
<div class="button-group">
<button type="submit">Add</button>
<button type="button" id="clearCompleted" class="clear-btn" aria-label="Delete completed tasks">
<svg viewBox="0 0 24 24" width="16" height="16">
<path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
</svg>
</button>
</div>
</form>
<ul id="todoList" class="todo-list">
<!-- Todo items will be inserted here -->
</ul>
</main>
<div id="toast" class="toast" role="alert" aria-hidden="true"></div>
</div>
<script src="app.js"></script>
</body>
</html>