I'll create a comprehensive HTML page for a task and reminder management application with modern design and useful features. I'll include inline CSS and JavaScript to make it fully functional.
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TaskMaster - Your Ultimate Task Manager</title>
<style>
:root {
--primary-color: #4a90e2;
--secondary-color: #f5f5f5;
--text-color: #333;
--accent-color: #2ecc71;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Arial', sans-serif;
}
body {
background-color: var(--secondary-color);
color: var(--text-color);
line-height: 1.6;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.header {
background-color: var(--primary-color);
color: white;
text-align: center;
padding: 20px;
border-radius: 10px;
margin-bottom: 20px;
}
.task-input {
display: flex;
margin-bottom: 20px;
}
#taskInput {
flex-grow: 1;
padding: 10px;
font-size: 16px;
border: 2px solid var(--primary-color);
border-radius: 5px;
}
#addTask {
padding: 10px 20px;
background-color: var(--accent-color);
color: white;
border: none;
margin-left: 10px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
#addTask:hover {
background-color: #27ae60;
}
#taskList {
list-style-type: none;
}
.task-item {
background-color: white;
padding: 15px;
margin-bottom: 10px;
border-radius: 5px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.task-item.completed {
text-decoration: line-through;
opacity: 0.6;
}
.task-actions button {
background: none;
border: none;
cursor: pointer;
margin-left: 10px;
font-size: 18px;
}
.complete-btn {
color: var(--accent-color);
}
.delete-btn {
color: #e74c3c;
}
.filters {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
.filters button {
padding: 10px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.filters button.active {
background-color: var(--accent-color);
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>TaskMaster</h1>
<p>Your Personal Task and Reminder Management App</p>
</div>
<div class="task-input">
<input type="text" id="taskInput" placeholder="Enter a new task...">
<button id="addTask">Add Task</button>
</div>
<div class="filters">
<button id="allFilter" class="active">All Tasks</button>
<button id="activeFilter">Active</button>
<button id="completedFilter">Completed</button>
</div>
<ul id="taskList"></ul>
</div>
<script>
const taskInput = document.getElementById('taskInput');
const addTaskBtn = document.getElementById('addTask');
const taskList = document.getElementById('taskList');
const allFilter = document.getElementById('allFilter');
const activeFilter = document.getElementById('activeFilter');
const completedFilter = document.getElementById('completedFilter');
let tasks = JSON.parse(localStorage.getItem('tasks')) || [];
function saveTasks() {
localStorage.setItem('tasks', JSON.stringify(tasks));
}
function renderTasks(filter = 'all') {
taskList.innerHTML = '';
const filteredTasks = tasks.filter(task => {
if (filter === 'active') return !task.completed;
if (filter === 'completed') return task.completed;
return true;
});
filteredTasks.forEach((task, index) => {
const li = document.createElement('li');
li.classList.add('task-item');
if (task.completed) li.classList.add('completed');
li.innerHTML = `
<span>${task.text}</span>
<div class="task-actions">
<button class="complete-btn">✓</button>
<button class="delete-btn">🗑️</button>
</div>
`;
const completeBtn = li.querySelector('.complete-btn');
const deleteBtn = li.querySelector('.delete-btn');
completeBtn.addEventListener('click', () => {
tasks[tasks.indexOf(task)].completed = !tasks[tasks.indexOf(task)].completed;
saveTasks();
renderTasks(getCurrentFilter());
});
deleteBtn.addEventListener('click', () => {
tasks = tasks.filter(t => t !== task);
saveTasks();
renderTasks(getCurrentFilter());
});
taskList.appendChild(li);
});
}
function getCurrentFilter() {
if (completedFilter.classList.contains('active')) return 'completed';
if (activeFilter.classList.contains('active')) return 'active';
return 'all';
}
addTaskBtn.addEventListener('click', () => {
const taskText = taskInput.value.trim();
if (taskText) {
tasks.push({ text: taskText, completed: false });
taskInput.value = '';
saveTasks();
renderTasks(getCurrentFilter());
}
});
taskInput.addEventListener('keypress', (e) => {
if (e.key === 'Enter') addTaskBtn.click();
});
allFilter.addEventListener('click', () => {
[allFilter, activeFilter, completedFilter].forEach(btn =>
btn.classList.remove('active'));
allFilter.classList.add('active');
renderTasks('all');
});
activeFilter.addEventListener('click', () => {
[allFilter, activeFilter, completedFilter].forEach(btn =>
btn.classList.remove('active'));
activeFilter.classList.add('active');
renderTasks('active');
});
completedFilter.addEventListener('click', () => {
[allFilter, activeFilter, completedFilter].forEach(btn =>
btn.classList.remove('active'));
completedFilter.classList.add('active');
renderTasks('completed');
});
// Initial render
renderTasks();
</script>
</body>
</html>
This TaskMaster application includes several key features:
Modern, Responsive Design
Clean, minimalist UI
Responsive layout
Color-coded interactions
Smooth transitions and hover effects
Task Management Capabilities
Add new tasks
Mark tasks as complete/incomplete
Delete tasks
Filter tasks (All, Active, Completed)
Local Storage
Tasks persist between browser sessions
Automatic saving of task state
User Experience Enhancements
Enter key support for adding tasks
Visual feedback on task completion
Intuitive icons for actions
Accessibility
Clear typography
High color contrast
Simple, straightforward interface
The application uses vanilla JavaScript, making it lightweight and fast. It's fully self-contained with inline CSS and JavaScript, requiring no external libraries.
Would you like me to elaborate on any specific aspect of the design or functionality?