Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 46 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,66 @@

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Productivity Tracker</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<div class="container">
<h1>📚 Productivity Tracker</h1>

<!-- Task Input -->
<input type="text" id="taskInput" placeholder="Enter your task">
<button onclick="addTask()">Add</button>
<!-- Header -->
<header>
<h1>📚 Productivity Tracker</h1>
<p class="subtitle">Stay focused, organized, and productive every day.</p>
</header>

<!-- Task Input Section -->
<section class="task-section">
<input
type="text"
id="taskInput"
placeholder="Enter your task here..."
aria-label="Task Input"
>

<button onclick="addTask()">➕ Add Task</button>
</section>

<!-- Task Counter -->
<div class="task-counter">
<p>Total Tasks: <span id="taskCount">0</span></p>
</div>

<!-- Task List -->
<ul id="taskList"></ul>

<!-- Progress -->
<h3 id="progress">Progress: 0% (0/0 tasks completed)</h3>
<!-- Progress Section -->
<section class="progress-section">
<h3 id="progress">📊 Progress: 0% (0/0 tasks completed)</h3>
</section>

<!-- Timer -->
<div class="timer">
<!-- Timer Section -->
<section class="timer">
<h2>⏱️ Focus Timer</h2>
<h2 id="time">00:00:00</h2>
<button onclick="startTimer()">Start</button>
<button onclick="stopTimer()">Stop</button>
</div>

<div class="timer-buttons">
<button onclick="startTimer()">▶ Start</button>
<button onclick="stopTimer()">⏹ Stop</button>
<button onclick="resetTimer()">🔄 Reset</button>
</div>
</section>

<!-- Footer -->
<footer>
<p>Made with ❤️ for productivity and focus.</p>
</footer>

</div>

<script src="script.js"></script>
</body>
</html>
</html>
8 changes: 8 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ function updateProgress() {
`Progress: ${percent}% (${doneTasks}/${total} tasks completed)`;
}

function resetTimer() {
clearInterval(timer);

timer = null;
seconds = 0;

updateTime();
}


// ⏱️ Timer
Expand Down
97 changes: 84 additions & 13 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,104 @@
body {
font-family: Arial;
background: #f4f4f4;
font-family: Arial, sans-serif;
background: #121212;
color: white;
text-align: center;
margin: 0;
padding: 0;
}

/* Main Container */
.container {
width: 300px;
margin: auto;
margin-top: 50px;
background: white;
padding: 20px;
border-radius: 10px;
width: 90%;
max-width: 400px;
margin: 50px auto;
background: #1e1e1e;
padding: 25px;
border-radius: 15px;
box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

/* Heading */
h1 {
margin-bottom: 10px;
}

.subtitle {
font-size: 14px;
color: #bbbbbb;
margin-bottom: 20px;
}

/* Input Section */
input {
padding: 8px;
padding: 10px;
width: 70%;
border: none;
border-radius: 8px;
outline: none;
}

/* Buttons */
button {
padding: 8px;
padding: 10px 12px;
margin: 5px;
border: none;
border-radius: 8px;
background: #4caf50;
color: white;
cursor: pointer;
transition: 0.3s;
}

button:hover {
background: #45a049;
transform: scale(1.05);
}

/* Task List */
li {
list-style: none;
margin: 10px 0;
background: #eee;
padding: 5px;
border-radius: 5px;
background: #2a2a2a;
padding: 10px;
border-radius: 8px;
color: white;
}

/* Progress Section */
.progress-section {
margin-top: 20px;
}

/* Timer Section */
.timer {
margin-top: 20px;
}

.timer-buttons {
margin-top: 10px;
}

/* Footer */
footer {
margin-top: 20px;
font-size: 12px;
color: #aaaaaa;
}

/* Mobile Responsive */
@media (max-width: 500px) {
.container {
width: 95%;
padding: 15px;
}

input {
width: 100%;
margin-bottom: 10px;
}

button {
width: 100%;
}
}