-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
107 lines (96 loc) · 3.79 KB
/
Copy pathindex.html
File metadata and controls
107 lines (96 loc) · 3.79 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!--
SPDX-License-Identifier: MIT
Copyright © 2025 github.com/dtiberio
-->
<!DOCTYPE html>
<html lang="en" data-theme="modern">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A simple Task Manager PWA">
<title>Task Manager PWA</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="manifest" href="manifest.json">
</head>
<body>
<header class="bg-primary text-white text-center p-3">
<nav class="navbar navbar-dark">
<div class="container-fluid">
<span class="navbar-brand mb-0 h1"><i class="bi bi-card-checklist"></i> Task Manager</span>
<div class="d-flex gap-2">
<!-- Theme Switcher Button -->
<button id="theme-toggle" class="btn btn-outline-light btn-sm">
<i class="bi bi-palette"></i>
<span class="theme-label">Modern</span>
</button>
<a href="about.html" class="btn btn-light btn-sm">
<i class="bi bi-info-circle-fill"></i> About
</a>
</div>
</div>
</nav>
</header>
<main class="container mt-5">
<section id="task-input-section" class="mb-4 p-4 border rounded shadow-sm">
<h2 class="mb-3 h4">Add New Task</h2>
<form id="task-form">
<div class="mb-3">
<label for="task-input" class="form-label">Task Description</label>
<input type="text" class="form-control" id="task-input" placeholder="Enter task description" required>
</div>
<button type="submit" class="btn btn-primary w-100"><i class="bi bi-plus-circle-fill"></i> Add Task</button>
</form>
</section>
<section id="task-list-section">
<h2 class="mb-3 h4">Tasks</h2>
<!-- Enhanced empty state -->
<div id="empty-state" class="text-center py-5 d-none">
<i class="bi bi-clipboard-check display-1 text-muted mb-3"></i>
<h3 class="text-muted">No tasks yet!</h3>
<p class="text-muted">Add your first task above to get started.</p>
</div>
<!-- Loading state -->
<div id="loading-state" class="text-center py-4 d-none">
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<div id="task-list-container" class="list-group">
<!-- Tasks will be dynamically added here -->
</div>
</section>
</main>
<footer class="text-center p-3 mt-5 bg-light">
<p class="mb-0">© 2025 Task Manager PWA</p>
</footer>
<!-- Bootstrap JS Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<script src="js/main.js"></script>
<script>
// Initialize theme on page load
document.addEventListener('DOMContentLoaded', () => {
initThemeSystem();
});
</script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('service-worker.js')
.then(registration => {
console.log('ServiceWorker registration successful with scope: ', registration.scope);
})
.catch(err => {
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>
</body>
</html>