-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
323 lines (293 loc) · 16.2 KB
/
Copy pathindex.html
File metadata and controls
323 lines (293 loc) · 16.2 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE html>
<html lang="si">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>O/L 2026 Master Dashboard - Rashmitha EDITZ</title>
<script async src="https://tally.so/widgets/embed.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');
:root {
--red: #ff3e3e;
--bg: #050505;
--glass: rgba(255, 255, 255, 0.02);
--border: rgba(255, 62, 62, 0.15);
--dark-box: rgba(0, 0, 0, 0.6);
}
body {
background-color: var(--bg);
background-image: radial-gradient(circle at 50% 50%, #150505 0%, #050505 100%);
color: white;
font-family: 'Inter', sans-serif;
margin: 0;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}
.header { text-align: center; margin-bottom: 40px; }
#current-time { font-size: 4rem; font-weight: 900; margin: 0; text-shadow: 0 0 20px rgba(255, 62, 62, 0.2); }
#current-date { color: var(--red); font-weight: bold; text-transform: uppercase; letter-spacing: 4px; font-size: 0.9rem; }
.dashboard-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 20px;
width: 100%;
max-width: 1100px;
}
.card {
background: var(--glass);
backdrop-filter: blur(25px);
border: 1px solid var(--border);
border-radius: 28px;
padding: 25px;
text-align: center;
transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
}
.card:hover { border-color: var(--red); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(255, 62, 62, 0.1); }
h2 { font-size: 0.8rem; color: var(--red); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 20px; opacity: 0.8; }
/* COUNTDOWN BOXES */
.ol-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ol-box {
background: var(--dark-box);
padding: 18px 5px;
border-radius: 18px;
border: 1px solid #111;
box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}
.ol-num { font-size: 2rem; font-weight: 900; display: block; color: #fff; }
.ol-label { font-size: 0.6rem; color: #555; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; display: block; }
/* TIMER DISPLAY */
.timer-val { font-size: 5rem; font-weight: 900; margin: 15px 0; color: var(--red); letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
button {
background: var(--red); border: none; padding: 14px 28px; border-radius: 14px;
color: white; font-weight: 900; cursor: pointer; transition: 0.2s;
box-shadow: 0 4px 15px rgba(255, 62, 62, 0.3);
text-transform: uppercase;
}
button.secondary { background: #111; border: 1px solid #222; box-shadow: none; }
button:hover { transform: scale(1.05); }
#status-text { font-weight: bold; font-size: 1rem; margin-top: 5px; text-transform: uppercase; letter-spacing: 2px; color: var(--red); }
/* MUSIC BUTTON STYLES */
.music-btn {
background: #111; border: 1px solid #222; padding: 16px; color: white;
border-radius: 50px; cursor: pointer; width: 100%; font-weight: 900;
transition: 0.3s; box-shadow: none;
}
.music-btn.playing {
background: var(--red); border-color: var(--red);
box-shadow: 0 0 20px rgba(255, 62, 62, 0.4);
}
/* TO-DO */
.todo-input-wrap { display: flex; gap: 10px; margin-bottom: 20px; }
input { flex: 1; background: #0a0a0a; border: 1px solid #222; padding: 14px; border-radius: 12px; color: white; outline: none; }
.todo-item {
background: rgba(255,255,255,0.02); padding: 12px; border-radius: 12px;
margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between;
border: 1px solid #111; cursor: pointer; transition: 0.3s;
}
.task-content { display: flex; flex-direction: column; text-align: left; flex: 1; }
.task-text { font-size: 1rem; color: #eee; transition: 0.3s; }
.task-time { font-size: 0.65rem; color: var(--red); margin-top: 4px; font-weight: bold; opacity: 0.7; }
.done .task-text { text-decoration: line-through; color: #444; }
.done { border-color: rgba(255, 62, 62, 0.3); background: rgba(255, 62, 62, 0.05); }
/* TALLY FORM CONTAINER */
.tally-container {
border-radius: 18px;
overflow: hidden;
background: rgba(0,0,0,0.2);
margin-top: 10px;
min-height: 400px;
}
footer { margin-top: 60px; color: #333; font-weight: bold; font-size: 0.75rem; letter-spacing: 5px; padding-bottom: 20px; }
</style>
</head>
<body>
<div class="header">
<div id="current-date">LOADING...</div>
<h1 id="current-time">00:00:00</h1>
</div>
<div class="dashboard-grid">
<div class="card">
<h2>O/L 2026 Countdown</h2>
<div class="ol-grid">
<div class="ol-box"><span class="ol-num" id="d">00</span><span class="ol-label">Days</span></div>
<div class="ol-box"><span class="ol-num" id="h">00</span><span class="ol-label">Hours</span></div>
<div class="ol-box"><span class="ol-num" id="m">00</span><span class="ol-label">Mins</span></div>
<div class="ol-box"><span class="ol-num" id="s">00</span><span class="ol-label">Secs</span></div>
</div>
</div>
<div class="card" style="grid-row: span 2;">
<h2>Pomodoro Method Study</h2>
<div id="status-text">WORK MODE</div>
<div id="timer-display" class="timer-val">25:00</div>
<div class="btn-group">
<button onclick="toggleTimer()" id="start-btn">START SESSION</button>
<button class="secondary" onclick="resetTimer()">RESET</button>
</div>
<audio id="alertSound" src="https://assets.mixkit.co/active_storage/sfx/2869/2869-preview.mp3"></audio>
</div>
<div class="card">
<h2>Stopwatch</h2>
<div id="sw-display" class="timer-val" style="font-size: 3.5rem;">00:00:00</div>
<div class="btn-group">
<button onclick="toggleSW()" id="sw-btn">START</button>
<button class="secondary" onclick="resetSW()">RESET</button>
</div>
</div>
<div class="card" style="grid-row: span 2;">
<h2>Submit Study Tips & Notes to me</h2>
<div class="tally-container">
<iframe
data-tally-src="https://tally.so/embed/kdZRq6?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1"
loading="lazy"
width="100%"
height="450"
frameborder="0"
marginheight="0"
marginwidth="0"
title="Study Notes Submission">
</iframe>
</div>
</div>
<div class="card">
<h2>Daily Motivation</h2>
<div id="quote-text" style="font-size: 1.1rem; line-height: 1.6; color: #ddd; min-height: 85px; display: flex; align-items: center; justify-content: center;">"අද කරන කැපවීම හෙට ඔබේ සාර්ථකත්වය තීරණය කරයි."</div>
</div>
<div class="card">
<h2>Motivation Music</h2>
<button class="music-btn" id="mBtn" onclick="toggleMusic()">▶ PLAY TRACK</button>
<div id="track-info" style="font-size: 0.6rem; color: #444; margin-top: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px;">Ready to Play</div>
<audio id="bgMusic" onended="nextTrack()"></audio>
</div>
<div class="card">
<h2>Study Goals (Click to Check)</h2>
<div class="todo-input-wrap">
<input type="text" id="taskInput" placeholder="Add a study goal...">
<button onclick="addTask()">ADD</button>
</div>
<div id="todoList"></div>
</div>
</div>
<footer>© Rashmitha EDITZ</footer>
<script>
// 1. CLOCK
function clock() {
const now = new Date();
document.getElementById("current-time").innerText = now.toLocaleTimeString('en-US', { hour12: false });
document.getElementById("current-date").innerText = now.toLocaleDateString('si-LK', { weekday:'long', year:'numeric', month:'long', day:'numeric' });
}
setInterval(clock, 1000); clock();
// 2. O/L COUNTDOWN
const target = new Date("December 8, 2026 08:30:00").getTime();
setInterval(() => {
const diff = target - new Date().getTime();
if(diff > 0) {
document.getElementById("d").innerText = Math.floor(diff / (1000 * 60 * 60 * 24));
document.getElementById("h").innerText = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
document.getElementById("m").innerText = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
document.getElementById("s").innerText = Math.floor((diff % (1000 * 60)) / 1000);
}
}, 1000);
// 3. STOPWATCH
let swStart, swElapsed = 0, swInterval;
function toggleSW() {
const btn = document.getElementById("sw-btn");
if (swInterval) {
clearInterval(swInterval); swInterval = null; btn.innerText = "RESUME";
} else {
swStart = Date.now() - swElapsed;
btn.innerText = "PAUSE";
swInterval = setInterval(() => {
swElapsed = Date.now() - swStart;
let m = Math.floor(swElapsed / 60000);
let s = Math.floor((swElapsed % 60000) / 1000);
let ms = Math.floor((swElapsed % 1000) / 10);
document.getElementById("sw-display").innerText = `${m < 10 ? '0'+m : m}:${s < 10 ? '0'+s : s}:${ms < 10 ? '0'+ms : ms}`;
}, 10);
}
}
function resetSW() { clearInterval(swInterval); swInterval = null; swElapsed = 0; document.getElementById("sw-display").innerText = "00:00:00"; document.getElementById("sw-btn").innerText = "START"; }
// 4. POMODORO METHOD STUDY
let timeLeft = 25 * 60, running = false, timerInterval;
const alarm = document.getElementById("alertSound");
function updateDisplay() {
let m = Math.floor(timeLeft / 60); let s = timeLeft % 60;
document.getElementById("timer-display").innerText = `${m < 10 ? '0' + m : m}:${s < 10 ? '0' + s : s}`;
}
function playAlarmTwice() {
let count = 0; alarm.play();
alarm.onended = function() {
count++;
if(count < 2) { setTimeout(() => { alarm.play(); }, 400); }
else { setTimeout(() => { alert("Session Done! Take a break."); resetTimer(); }, 500); }
};
}
function toggleTimer() {
const btn = document.getElementById("start-btn");
if (running) { clearInterval(timerInterval); running = false; btn.innerText = "RESUME"; }
else {
running = true; btn.innerText = "PAUSE";
timerInterval = setInterval(() => {
timeLeft--; updateDisplay();
if (timeLeft <= 0) { clearInterval(timerInterval); running = false; btn.innerText = "START SESSION"; playAlarmTwice(); }
}, 1000);
}
}
function resetTimer() { clearInterval(timerInterval); running = false; timeLeft = 25 * 60; updateDisplay(); document.getElementById("start-btn").innerText = "START SESSION"; }
// 5. MUSIC
const tracks = [
{ name: "Phonk Killer - Rare", url: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-8.mp3" },
{ name: "Night Drift - Montagem", url: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-10.mp3" }
];
let currentIdx = 0;
const audio = document.getElementById("bgMusic");
const mBtn = document.getElementById("mBtn");
const info = document.getElementById("track-info");
function toggleMusic() {
if (audio.paused) {
if(!audio.src) audio.src = tracks[currentIdx].url;
audio.play(); mBtn.innerText = "⏸ STOP TRACK"; mBtn.classList.add("playing"); info.innerText = "NOW PLAYING: " + tracks[currentIdx].name;
} else {
audio.pause(); mBtn.innerText = "▶ PLAY TRACK"; mBtn.classList.remove("playing"); info.innerText = "Track Paused";
}
}
function nextTrack() { currentIdx = (currentIdx + 1) % tracks.length; audio.src = tracks[currentIdx].url; audio.play(); info.innerText = "NOW PLAYING: " + tracks[currentIdx].name; }
// 6. GOALS & QUOTES
const quotes = ["අද කරන කැපවීම හෙට ඔබේ සාර්ථකත්වය තීරණය කරයි.", "අසීරුම කඳු මුදුන්වලට හොඳම දර්ශන උරුම වේ.", "සාර්ථකත්වයේ රහස කැපවීමයි.", "නිහඬව වැඩ කරන්න, ඔබේ සාර්ථකත්වයට ශබ්ද කිරීමට ඉඩ දෙන්න."];
setInterval(() => { document.getElementById("quote-text").innerText = `"${quotes[Math.floor(Math.random() * quotes.length)]}"`; }, 30000);
function addTask() {
let val = document.getElementById("taskInput").value; if(!val) return;
let tasks = JSON.parse(localStorage.getItem("tasks_new") || "[]");
tasks.push({ text: val, completed: false, doneTime: "" });
localStorage.setItem("tasks_new", JSON.stringify(tasks));
document.getElementById("taskInput").value = ""; renderTasks();
}
function toggleTask(i) {
let tasks = JSON.parse(localStorage.getItem("tasks_new") || "[]");
tasks[i].completed = !tasks[i].completed;
if(tasks[i].completed) {
let now = new Date(); tasks[i].doneTime = "Completed at " + now.getHours() + ":" + (now.getMinutes()<10?'0':'') + now.getMinutes();
} else { tasks[i].doneTime = ""; }
localStorage.setItem("tasks_new", JSON.stringify(tasks)); renderTasks();
}
function delTask(e, i) { e.stopPropagation(); let tasks = JSON.parse(localStorage.getItem("tasks_new") || "[]"); tasks.splice(i, 1); localStorage.setItem("tasks_new", JSON.stringify(tasks)); renderTasks(); }
function renderTasks() {
let tasks = JSON.parse(localStorage.getItem("tasks_new") || "[]");
document.getElementById("todoList").innerHTML = tasks.map((t, i) => `
<div class="todo-item ${t.completed ? 'done' : ''}" onclick="toggleTask(${i})">
<div class="task-content">
<span class="task-text">${t.completed ? '✅' : '🎯'} ${t.text}</span>
${t.doneTime ? `<span class="task-time">${t.doneTime}</span>` : ''}
</div>
<button style="background:none; border:none; color:#444; cursor:pointer;" onclick="delTask(event, ${i})">✖</button>
</div>
`).join("");
}
renderTasks();
</script>
</body>
</html>