-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.html
More file actions
164 lines (142 loc) · 3.83 KB
/
settings.html
File metadata and controls
164 lines (142 loc) · 3.83 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Settings</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">
<style>
/* Light Mode */
body {
margin: 0;
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
background-size: 400% 400%;
animation: gradientMove 20s ease infinite;
color: #333;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
transition: background 0.5s, color 0.5s;
}
@keyframes gradientMove {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
body.dark-theme {
background: linear-gradient(135deg, #232526, #414345);
color: #fff;
}
.settings-box {
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 2rem;
width: 90%;
max-width: 500px;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
text-align: center;
transition: background 0.5s;
}
/*body.dark-theme .settings-box {
background: rgba(0, 0, 0, 0.6);
}*/
.settings-box h1 {
margin-bottom: 1rem;
}
button {
margin: 10px 0;
width: 100%;
padding: 0.8rem;
border: none;
border-radius: 1rem;
font-size: 1rem;
background: linear-gradient(to right, #89f7fe, #66a6ff);
color: white;
cursor: pointer;
transition: 0.3s;
}
button:hover {
background: linear-gradient(to right, #667eea, #764ba2);
}
footer {
margin-top: 30px;
font-size: 0.8rem;
color: #777;
}
/* Switch */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
margin: 10px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0; left: 0; right: 0; bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked + .slider {
background-color: #66a6ff;
}
input:checked + .slider:before {
transform: translateX(26px);
}
</style>
</head>
<body>
<div class="settings-box">
<h1>Settings</h1>
<div>
<button onclick="showHelp()">Help Center</button>
<button onclick="shareProgress()">Share Progress</button>
<button onclick="goHome()">🏠 Home</button>
<button onclick="logout()">🚪 Logout</button>
</div>
<footer>© 2025 Digital Planner | Built by Tk</footer>
<script>
/*function showHelp() {
alert('Help Center:\n- Add tasks on Task Page\n- Track Progress\n- Dark/Light mode switch\n- Share your success with friends!');
}*/
function shareProgress() {
const tasks = JSON.parse(localStorage.getItem('tasks')) || [];
const completed = tasks.filter(t => t.completed).length;
const total = tasks.length;
const progress = total ? ((completed / total) * 100).toFixed(0) : 0;
navigator.clipboard.writeText(`I'm ${progress}% done with my tasks on Digital Planner! 🚀`);
alert('Progress copied to clipboard!');
}
function goHome() {
window.location.href = 'home.html';
}
function logout() {
localStorage.removeItem('isLoggedIn');
window.location.href = 'login-signup.html';
}
</script>
</body>
</html>