Skip to content

Commit cdf9211

Browse files
committed
Sprint-3: implement todo-list solutions from local timeline cache
1 parent ccfb60d commit cdf9211

6 files changed

Lines changed: 969 additions & 69 deletions

File tree

‎Sprint-3/todo-list/about.html‎

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6+
<title>Be You</title>
7+
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
8+
<link rel="stylesheet" href="style.css" />
9+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
10+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap" rel="stylesheet">
11+
</head>
12+
<body>
13+
14+
<header class="header">
15+
<nav class="nav-bar">
16+
<div class="nav-brand">
17+
<span class="brand-icon"><i class="fa-solid fa-circle-check"></i></span>
18+
<span class="brand-name">Be You<span class="brand-dot">.</span></span>
19+
</div>
20+
<button class="nav-toggle" id="nav-toggle" aria-label="Toggle navigation">
21+
<i class="fa-solid fa-bars"></i>
22+
</button>
23+
<div class="nav-links" id="nav-links">
24+
<a href="index.html">home</a>
25+
<a href="about.html" class="active">about</a>
26+
<a href="reminders.html">reminders</a>
27+
</div>
28+
</nav>
29+
</header>
30+
31+
<!-- Page Hero -->
32+
<section class="page-hero">
33+
<div class="page-hero-content">
34+
<h1>About Be You</h1>
35+
<p>The person behind the tasks</p>
36+
</div>
37+
</section>
38+
39+
<!-- Profile Section -->
40+
<section class="about-section">
41+
<div class="about-card">
42+
<div class="about-avatar">
43+
<i class="fa-solid fa-user-tie"></i>
44+
</div>
45+
<div class="about-info">
46+
<h2>Be You</h2>
47+
<p class="about-role"><i class="fa-solid fa-briefcase"></i> Goal-Driven Individual</p>
48+
<p class="about-bio">
49+
I'm Be You; someone who believes that every big achievement starts with a single task written down.
50+
This app is my personal space to stay organised, track progress, and show up every single day.
51+
</p>
52+
<div class="about-tags">
53+
<span><i class="fa-solid fa-bolt"></i> Focused</span>
54+
<span><i class="fa-solid fa-seedling"></i> Growing</span>
55+
<span><i class="fa-solid fa-star"></i> Consistent</span>
56+
<span><i class="fa-solid fa-brain"></i> Learner</span>
57+
</div>
58+
</div>
59+
</div>
60+
61+
<!-- Values -->
62+
<div class="values-grid">
63+
<div class="value-card">
64+
<i class="fa-solid fa-bullseye"></i>
65+
<h3>Purpose</h3>
66+
<p>Every task I set has a reason. I don't just stay busy — I stay intentional.</p>
67+
</div>
68+
<div class="value-card">
69+
<i class="fa-solid fa-calendar-check"></i>
70+
<h3>Consistency</h3>
71+
<p>Showing up daily, even when motivation is low. That's where growth lives.</p>
72+
</div>
73+
<div class="value-card">
74+
<i class="fa-solid fa-chart-line"></i>
75+
<h3>Progress</h3>
76+
<p>I measure success not by perfection, but by how far I've come.</p>
77+
</div>
78+
<div class="value-card">
79+
<i class="fa-solid fa-hands-holding-circle"></i>
80+
<h3>Accountability</h3>
81+
<p>I own my goals. No excuses — just action and reflection.</p>
82+
</div>
83+
</div>
84+
</section>
85+
86+
<footer class="footer">
87+
<p>© 2024 Be You</p>
88+
</footer>
89+
90+
<script>
91+
document.getElementById("nav-toggle").addEventListener("click", () => {
92+
document.getElementById("nav-links").classList.toggle("open");
93+
});
94+
</script>
95+
</body>
96+
</html>
103 KB
Loading

‎Sprint-3/todo-list/index.html‎

Lines changed: 79 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,92 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6-
<title>ToDo List</title>
6+
<title>Be You — ToDo</title>
77
<link rel="stylesheet" href="style.css" />
88
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
9-
9+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap" rel="stylesheet">
1010
<script type="module" src="script.mjs"></script>
1111
</head>
1212
<body>
13-
<div class="todo-container">
14-
<h1>My ToDo List</h1>
1513

16-
<div class="todo-input">
17-
<input type="text" id="new-task-input" placeholder="Enter a new task..." />
18-
<button id="add-task-btn">Add</button>
14+
<header class="header">
15+
<nav class="nav-bar">
16+
<div class="nav-brand">
17+
<span class="brand-icon"><i class="fa-solid fa-circle-check"></i></span>
18+
<span class="brand-name">Be You<span class="brand-dot">.</span></span>
19+
</div>
20+
<button class="nav-toggle" id="nav-toggle" aria-label="Toggle navigation">
21+
<i class="fa-solid fa-bars"></i>
22+
</button>
23+
<div class="nav-links" id="nav-links">
24+
<a href="index.html" class="active">home</a>
25+
<a href="about.html">about</a>
26+
<a href="reminders.html">reminders</a>
27+
</div>
28+
</nav>
29+
</header>
30+
31+
<!-- Hero Section -->
32+
<section class="hero">
33+
<div class="hero-content">
34+
<p class="hero-greeting">Hello, I'm</p>
35+
<h1 class="hero-name">Be You</h1>
36+
<p class="hero-tagline">Turning goals into <span class="highlight">done</span>. One task at a time.</p>
37+
<a href="#todo-section" class="hero-btn">Start My Day <i class="fa-solid fa-arrow-down"></i></a>
38+
</div>
39+
<div class="hero-visual">
40+
<div class="hero-card">
41+
<i class="fa-solid fa-list-check hero-card-icon"></i>
42+
<p>Stay focused.<br>Stay productive.</p>
43+
</div>
1944
</div>
45+
</section>
46+
47+
<!-- Stats Bar -->
48+
<section class="stats-bar">
49+
<div class="stat"><i class="fa-solid fa-fire"></i><span id="stat-total">0</span><small>Tasks</small></div>
50+
<div class="stat"><i class="fa-solid fa-circle-check"></i><span id="stat-done">0</span><small>Completed</small></div>
51+
<div class="stat"><i class="fa-solid fa-hourglass-half"></i><span id="stat-pending">0</span><small>Pending</small></div>
52+
</section>
53+
54+
<!-- Todo Section -->
55+
<section class="todo-section" id="todo-section">
56+
<div class="todo-container">
57+
<div class="todo-header">
58+
<h2><i class="fa-solid fa-list-check"></i> My ToDo List</h2>
59+
<p class="todo-subtitle">What are we conquering today?</p>
60+
</div>
61+
62+
<div class="todo-input">
63+
<input type="text" id="new-task-input" placeholder="Add a new task..." />
64+
<button id="add-task-btn"><i class="fa-solid fa-plus"></i> Add</button>
65+
</div>
66+
67+
<ul id="todo-list" class="todo-list"></ul>
68+
69+
<template id="todo-item-template">
70+
<li class="todo-item">
71+
<span class="description">Task description</span>
72+
<div class="actions">
73+
<button class="complete-btn" title="Complete"><i class="fa-solid fa-check"></i></button>
74+
<button class="delete-btn" title="Delete"><i class="fa-solid fa-trash"></i></button>
75+
</div>
76+
</li>
77+
</template>
78+
</div>
79+
</section>
80+
81+
<!-- Quote Section -->
82+
<section class="quote-section">
83+
<blockquote>
84+
"Discipline is choosing between what you want now and what you want most."
85+
<cite>— Abraham Lincoln</cite>
86+
</blockquote>
87+
</section>
88+
89+
<footer class="footer">
90+
<p>© 2026 Be You</p>
91+
</footer>
2092

21-
<ul id="todo-list" class="todo-list">
22-
</ul>
23-
24-
<!--
25-
This is a template for the To-do list item.
26-
It can simplify the creation of list item node in JS script.
27-
-->
28-
<template id="todo-item-template">
29-
<li class="todo-item"> <!-- include class "completed" if the task completed state is true -->
30-
<span class="description">Task description</span>
31-
<div class="actions">
32-
<button class="complete-btn"><span class="fa-solid fa-check" aria-hidden="true"></span></button>
33-
<button class="delete-btn"><span class="fa-solid fa-trash" aria-hidden="true"></span></button>
34-
</div>
35-
</li>
36-
</template>
37-
38-
</div>
3993
</body>
4094
</html>

‎Sprint-3/todo-list/reminders.html‎

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
6+
<title>Reminders — Be You</title>
7+
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
8+
<link rel="stylesheet" href="style.css" />
9+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
10+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap" rel="stylesheet">
11+
</head>
12+
<body>
13+
14+
<header class="header">
15+
<nav class="nav-bar">
16+
<div class="nav-brand">
17+
<span class="brand-icon"><i class="fa-solid fa-circle-check"></i></span>
18+
<span class="brand-name">Be You<span class="brand-dot">.</span></span>
19+
</div>
20+
<button class="nav-toggle" id="nav-toggle" aria-label="Toggle navigation">
21+
<i class="fa-solid fa-bars"></i>
22+
</button>
23+
<div class="nav-links" id="nav-links">
24+
<a href="index.html">home</a>
25+
<a href="about.html">about</a>
26+
<a href="reminders.html" class="active">reminders</a>
27+
</div>
28+
</nav>
29+
</header>
30+
31+
<!-- Page Hero -->
32+
<section class="page-hero reminders-hero">
33+
<div class="page-hero-content">
34+
<h1>Daily Reminders</h1>
35+
<p>Words to keep you grounded and moving forward</p>
36+
</div>
37+
</section>
38+
39+
<!-- Reminders Section -->
40+
<section class="reminders-section">
41+
42+
<div class="reminder-featured">
43+
<i class="fa-solid fa-quote-left"></i>
44+
<p>"You don't have to be great to start, but you have to start to be great."</p>
45+
<cite>— Zig Ziglar</cite>
46+
</div>
47+
48+
<div class="reminders-grid">
49+
<div class="reminder-card">
50+
<div class="reminder-icon"><i class="fa-solid fa-sun"></i></div>
51+
<h3>Start Your Morning Right</h3>
52+
<p>Write down your top 3 tasks before checking your phone. Own your morning, own your day.</p>
53+
</div>
54+
<div class="reminder-card">
55+
<div class="reminder-icon"><i class="fa-solid fa-person-running"></i></div>
56+
<h3>Always Show Up</h3>
57+
<p>Even on hard days, showing up 50% is better than not showing up at all. Momentum matters.</p>
58+
</div>
59+
<div class="reminder-card">
60+
<div class="reminder-icon"><i class="fa-solid fa-book-open"></i></div>
61+
<h3>Learning Reminder</h3>
62+
<p>Dedicate at least 30 minutes a day to learning something new. Small steps compound into mastery.</p>
63+
</div>
64+
<div class="reminder-card">
65+
<div class="reminder-icon"><i class="fa-solid fa-battery-full"></i></div>
66+
<h3>Rest Is Productive</h3>
67+
<p>Recovery is part of the process. Sleep, breathe, and recharge — you can't pour from an empty cup.</p>
68+
</div>
69+
<div class="reminder-card">
70+
<div class="reminder-icon"><i class="fa-solid fa-magnifying-glass"></i></div>
71+
<h3>Reflect Daily</h3>
72+
<p>Before bed, ask: What did I accomplish? What can I improve? Reflection turns experience into wisdom.</p>
73+
</div>
74+
<div class="reminder-card">
75+
<div class="reminder-icon"><i class="fa-solid fa-handshake-simple"></i></div>
76+
<h3>Be Kind to Yourself</h3>
77+
<p>Progress isn't linear. Celebrate small wins and forgive setbacks — you're doing better than you think.</p>
78+
</div>
79+
</div>
80+
81+
<div class="reminder-cta">
82+
<p>Ready to take action?</p>
83+
<a href="index.html" class="hero-btn"><i class="fa-solid fa-list-check"></i> Go to My Tasks</a>
84+
</div>
85+
86+
</section>
87+
88+
<footer class="footer">
89+
<p>© 2024 Be You</p>
90+
</footer>
91+
92+
<script>
93+
document.getElementById("nav-toggle").addEventListener("click", () => {
94+
document.getElementById("nav-links").classList.toggle("open");
95+
});
96+
</script>
97+
</body>
98+
</html>

‎Sprint-3/todo-list/script.mjs‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ const todos = [];
88
window.addEventListener("load", () => {
99
document.getElementById("add-task-btn").addEventListener("click", addNewTodo);
1010

11-
// Populate sample data
12-
Todos.addTask(todos, "Wash the dishes", false);
13-
Todos.addTask(todos, "Do the shopping", true);
11+
document.getElementById("nav-toggle").addEventListener("click", () => {
12+
document.getElementById("nav-links").classList.toggle("open");
13+
});
14+
15+
Todos.addTask(todos, "Learning reminder", false);
16+
Todos.addTask(todos, "Always show up", false);
1417

1518
render();
1619
});
@@ -43,15 +46,19 @@ function render() {
4346
const todoListItem = createListItem(todo, index);
4447
todoListEl.append(todoListItem);
4548
});
49+
50+
const done = todos.filter(t => t.completed).length;
51+
document.getElementById("stat-total").textContent = todos.length;
52+
document.getElementById("stat-done").textContent = done;
53+
document.getElementById("stat-pending").textContent = todos.length - done;
4654
}
4755

4856

4957
// Note:
5058
// - First child of #todo-item-template is a <li> element.
5159
// We will create each ToDo list item as a clone of this node.
5260
// - This variable is declared here to be close to the only function that uses it.
53-
const todoListItemTemplate =
54-
document.getElementById("todo-item-template").content.firstElementChild;
61+
const todoListItemTemplate = document.getElementById("todo-item-template").content.firstElementChild;
5562

5663
// Create a <li> element for the given todo task
5764
function createListItem(todo, index) {

0 commit comments

Comments
 (0)