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
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Todo</title>
<title>Task manager</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" rel="stylesheet">
</head>
<body>
<div id="root"></div>
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0"
"react-dom": "^19.0.0",
"zustand": "^5.0.4"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
Expand Down
353 changes: 353 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,353 @@
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: "Inter", sans-serif;
font-optical-sizing: auto;
}

body {
background-color: #fffbb0;
color: #1d1d1d;
display: flex;
justify-content: center;
min-height: 100vh;
padding: 20px;
max-width: 750px;
margin: 0 auto;
}

h1 {
font-family: "Bebas Neue", sans-serif;
font-weight: 400;
font-size: 72px;
color: #a0074c;
text-align: center;
margin-bottom: 20px;
}

p {
font-size: 16px;
}


.todo-form {
display: flex;
flex-direction: column;
gap: 20px;
margin-bottom: 20px;
}

.dueDate-submit-container {
display: flex;
gap: 20px;
}

.todo-form input[type="text"] {
flex-grow: 1;
word-break: break-word;
padding: 8px;
border: 1px solid #a0074c;
background-color: white;
border-radius: 4px;
font-size: 16px;
transition: border-color 0.3s ease;
}

.todo-form input[type="text"]:focus {
border-color: #a0074c;
outline: none;
box-shadow: 0 0 0 3px rgba(160, 7, 76, 0.2);
}

.todo-form input[type="date"] {
padding: 8px;
border: 1px solid #a0074c;
background-color: transparent;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: border-color 0.3s ease;
}

.todo-form input[type="date"]:focus {
border-color: #a0074c;
outline: none;
box-shadow: 0 0 0 3px rgba(160, 7, 76, 0.2);
}

.todo-form button {
font-family: "Inter", sans-serif;
padding: 8px;
border: 1px solid #a0074c;
background-color: transparent;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.2s ease;
}

.todo-form button:hover {
background-color: #a0074c;
color: #fffbb0;
}

.task-count {
display: flex;
flex-direction: row;
justify-content: space-between;
gap: 20px;
margin-bottom: 20px;
color: #a0074c;
}

.task-count p {
margin: 5px 0;
}

.todo-list {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
}

.task-main-content {
display: flex;
align-items: center;
width: 100%;
margin-bottom: 20px;
gap: 20px;
}

.todo-item {
display: flex;
justify-content: space-evenly;
flex-direction: column;
padding: 20px;
border-bottom: 1px solid #a0074c;
transition: background-color 0.2s ease;
}

.todo-item.completed {
background-color: #e6ffe6;
}

.todo-item input[type="checkbox"] {
transform: scale(1.3);
cursor: pointer;
accent-color: #a0074c;
border-radius: 4px;
transition: all 0.2s ease;
}

.todo-item input[type="checkbox"]:focus {
outline: 1px solid #a0074c;
outline-offset: 1px;
}

.todo-item .task-text {
flex-grow: 1;
font-size: 16px;
word-break: break-word;
}

.todo-item.completed .task-text {
text-decoration: line-through;
color: #888;
}

.todo-item button {
background-color: transparent;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.2s ease;
}

.todo-item button span {
border-bottom: 1px solid #a0074c;
}


.todo-item button span:hover {
border-bottom: 1px solid #1d1d1d;
}

.task-meta {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 20px;
font-size: 16px;
}

.todo-item.overdue {
border-left: 5px solid #f80000;
}

.overdue-text {
color: #f80000;
}

.task-filters {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 20px;
justify-content: space-between;
border-radius: 8px;
}

.task-filters button {
padding: 8px;
border: 1px solid #a0074c;
background-color: transparent;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.2s ease, transform 0.1s ease;
flex-shrink: 1;
}

.task-filters button:hover {
background-color: #a0074c;
color: #fffbb0;
transform: translateY(-1px);
}

.task-filters button.active {
background-color: #a0074c;
color: #fffbb0;
font-weight: bold;
}

.empty-state {
text-align: center;
color: #1d1d1d;
padding: 20px;
border: 2px dashed #a0074c;
border-radius: 4px;
margin-top: 20px;
font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
.todo-form {
flex-direction: column;
}

.todo-form button {
width: 100%;
}

.todo-item {
flex-wrap: wrap;
}

.todo-item .task-text {
flex-basis: 100%;
margin-bottom: 10px;
}

.todo-item button {
margin-left: 0;
margin-top: 10px;
width: 100%;
}

.todo-item {
flex-direction: column;
align-items: flex-start;
}

.task-main-content {
margin-bottom: 10px;
}

.task-meta {
margin-left: 30px;
margin-bottom: 10px;
}

.todo-item button {
position: static;
width: auto;
margin-top: 10px;
align-self: flex-end;
}

.task-filters {
display: flex;
flex-wrap: wrap;
justify-content: stretch;
gap: 8px;
margin-bottom: 20px;
border-radius: 8px;
}
}

@media (max-width: 480px) {

body {
padding: 10px;
}

h1 {
font-size: 42px;
}

p {
font-size: 12px;
}

.todo-form input,
.todo-form button {
font-size: 12px;
}

.todo-item {
padding: 10px;
max-width: 100%;
}

.todo-item .task-text {
font-size: 12px;
}

.task-filters {
flex-direction: column;
align-items: stretch;
}

.task-filters button {
width: 100%;
font-size: 12px;
}

.todo-item button {
width: 100%;
margin-left: 0;
}

.todo-item button {
font-size: 12px;
}

.todo-form input[type="text"] {
font-size: 12px;
}

.todo-form input[type="date"] {
font-size: 12px;
}

.task-meta {
font-size: 12px;
}
}
15 changes: 14 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import { Header } from './components/Header'
import { TodoForm } from './components/TodoForm'
import { TaskCount } from './components/TaskCount'
import { TaskFilter } from './components/TaskFilter'
import { TodoList } from './components/TodoList'
import './App.css'

export const App = () => {
return (
<h1>React Boilerplate</h1>
<>
<Header />
<TodoForm />
<TaskCount />
<TaskFilter />
<TodoList />
</>
)
}
Loading