Skip to content

Commit a470145

Browse files
committed
styling changes to tasks and focus pages
1 parent b1f971e commit a470145

10 files changed

Lines changed: 46 additions & 58 deletions

File tree

client/src/components/task_form.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ export function TaskForm({ userId, onTaskCreated }: TaskFormProps) {
128128
return (
129129
<form
130130
onSubmit={handleSubmit}
131-
className="task-form flex h-full w-full flex-col items-center justify-between gap-2 rounded-lg bg-slate-900 p-4 text-slate-200"
131+
className="task-form flex h-full w-full flex-col items-center justify-between gap-2 rounded-lg bg-indigo-800 p-4 text-slate-200"
132132
>
133133
<input
134-
className="title-input w-full rounded-lg bg-indigo-400 px-3 py-1 text-3xl font-bold text-slate-100 brightness-90 placeholder:text-slate-300 hover:brightness-110"
134+
className="title-input w-full rounded-lg bg-indigo-600 px-3 py-1 text-3xl font-bold text-slate-100 brightness-90 placeholder:text-slate-300 hover:brightness-110"
135135
type="text"
136136
value={taskName}
137137
onChange={(e) => setTaskName(e.target.value)}
@@ -143,7 +143,7 @@ export function TaskForm({ userId, onTaskCreated }: TaskFormProps) {
143143
Description
144144
</h1>
145145
<textarea
146-
className="description-input w-full rounded-lg bg-indigo-400 p-2 brightness-90 placeholder:text-slate-300 hover:brightness-110"
146+
className="description-input w-full rounded-lg bg-indigo-600 p-2 brightness-90 placeholder:text-slate-300 hover:brightness-110"
147147
value={description}
148148
onChange={(e) => setDescription(e.target.value)}
149149
rows={7}
@@ -157,7 +157,7 @@ export function TaskForm({ userId, onTaskCreated }: TaskFormProps) {
157157
/>
158158
<TimeInput times={times} setTimes={setTimes} />
159159
<button
160-
className="w-fit rounded-full border border-slate-300 bg-indigo-400 px-3 py-1 text-xl brightness-110 hover:brightness-125"
160+
className="w-fit rounded-full border border-slate-300 bg-indigo-600 px-3 py-1 text-xl brightness-110 hover:brightness-125"
161161
type="submit"
162162
>
163163
Save

client/src/components/task_item.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function TaskItem({
134134
/* Item Display */
135135
}
136136
return (
137-
<div className="task flex h-fit w-full min-w-[20rem] max-w-[48rem] flex-col gap-3 rounded-3xl bg-slate-900 p-5 text-slate-200 shadow-xl shadow-black/40">
137+
<div className="task flex h-fit w-full min-w-[20rem] max-w-[48rem] flex-col gap-3 rounded-3xl bg-indigo-500 p-5 text-slate-200 shadow-xl shadow-black/40">
138138
<div className="task-title-container flex w-full flex-row items-center justify-start gap-2 text-3xl font-bold text-slate-100 hover:text-slate-100">
139139
{/* Task Name and Completion */}
140140
<input
@@ -145,7 +145,7 @@ export function TaskItem({
145145
/>
146146
{isEditing ? (
147147
<input
148-
className="task-title-edit w-full rounded-lg bg-indigo-400 px-3 py-1 brightness-90 hover:brightness-110"
148+
className="task-title-edit w-full rounded-lg bg-indigo-600 px-3 py-1 brightness-90 hover:brightness-110"
149149
value={draftName}
150150
onChange={(e) => setDraftName(e.target.value)}
151151
/>
@@ -176,7 +176,7 @@ export function TaskItem({
176176
item.times.map((time) => (
177177
<div
178178
key={time.id}
179-
className="day-time-tags flex w-fit flex-row gap-3 rounded-full bg-indigo-400 px-3 py-1 hover:brightness-110"
179+
className="day-time-tags flex w-fit flex-row gap-3 rounded-full bg-indigo-600 px-3 py-1 hover:brightness-110"
180180
>
181181
<DayTag day={formatDay(time.day)} />
182182
<TimeTag start_time={time.start_time} end_time={time.end_time} />
@@ -219,7 +219,7 @@ export function TaskItem({
219219
Description
220220
</h1>
221221
<textarea
222-
className="w-full rounded-lg bg-indigo-400 p-1 brightness-90 hover:brightness-110"
222+
className="w-full rounded-lg bg-indigo-600 p-1 brightness-90 hover:brightness-110"
223223
value={draftDescription}
224224
rows={7}
225225
onChange={(e) => setDraftDescription(e.target.value)}
@@ -238,14 +238,14 @@ export function TaskItem({
238238
{isEditing ? (
239239
<div className="flex w-full flex-row justify-center gap-2 text-lg">
240240
<button
241-
className="rounded-full bg-indigo-400 px-3 py-1 hover:brightness-110"
241+
className="rounded-full bg-indigo-600 px-3 py-1 hover:brightness-110"
242242
onClick={saveEdit}
243243
disabled={saving}
244244
>
245245
Save
246246
</button>
247247
<button
248-
className="rounded-full bg-indigo-400 px-3 py-1 hover:brightness-110"
248+
className="rounded-full bg-indigo-600 px-3 py-1 hover:brightness-110"
249249
onClick={cancelEdit}
250250
>
251251
Cancel

client/src/components/time_input.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
5656
{times.map((time, index) => (
5757
<div
5858
key={index}
59-
className="time-input-wrapper flex w-full flex-row items-center justify-evenly gap-1 rounded-lg bg-indigo-400 p-1 brightness-90 hover:brightness-95"
59+
className="time-input-wrapper flex w-full flex-row items-center justify-evenly gap-1 rounded-lg bg-indigo-600 p-1 brightness-90 hover:brightness-95"
6060
>
6161
<div className="day-select-wrapper flex w-[20%] flex-row items-center justify-center gap-1">
6262
<FaRegCalendarAlt />
6363
<select
64-
className="day-select h-full rounded-lg bg-indigo-400 p-1 text-center hover:brightness-110"
64+
className="day-select h-full rounded-lg bg-indigo-600 p-1 text-center hover:brightness-110"
6565
value={time.day}
6666
onChange={(e) =>
6767
updateTime(index, "day", parseInt(e.target.value))
@@ -78,22 +78,22 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
7878
<FaRegClock />
7979
<div className="time-inputs-wrapper text-md flex flex-col">
8080
<input
81-
className="time-input h-full rounded-lg bg-indigo-400 hover:brightness-110"
81+
className="time-input h-full rounded-lg bg-indigo-600 hover:brightness-110"
8282
type="time"
8383
value={time.start_time}
8484
onChange={(e) =>
8585
updateTime(index, "start_time", e.target.value)
8686
}
8787
/>
8888
<input
89-
className="time-input h-full rounded-lg bg-indigo-400 hover:brightness-110"
89+
className="time-input h-full rounded-lg bg-indigo-600 hover:brightness-110"
9090
type="time"
9191
value={time.end_time}
9292
onChange={(e) => updateTime(index, "end_time", e.target.value)}
9393
/>
9494
</div>
9595
</div>
96-
<div className="repeat-input-wrapper flex w-[25%] flex-row gap-2 rounded-lg bg-indigo-400 p-1 hover:brightness-110">
96+
<div className="repeat-input-wrapper flex w-[25%] flex-row gap-2 rounded-lg bg-indigo-600 p-1 hover:brightness-110">
9797
<span>Repeats?</span>
9898
<input
9999
className="repeat-input"
@@ -113,7 +113,7 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
113113
</div>
114114
))}
115115
<button
116-
className="add-time-button w-12 rounded-full bg-indigo-400 text-xl hover:brightness-110"
116+
className="add-time-button w-12 rounded-full bg-indigo-600 text-xl hover:brightness-110"
117117
type="button"
118118
onClick={addTime}
119119
>

client/src/components/topic_input.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function TopicInput({
5555
return (
5656
<div
5757
key={index}
58-
className="new-topic-input flex w-full flex-row justify-evenly gap-2 rounded-lg bg-indigo-400 p-2 brightness-90 hover:brightness-95"
58+
className="new-topic-input flex w-full flex-row justify-evenly gap-2 rounded-lg bg-indigo-600 p-2 brightness-90 hover:brightness-95"
5959
>
6060
<input
6161
className="color-select h-5 w-5 border-0"
@@ -69,7 +69,7 @@ export function TopicInput({
6969
}}
7070
/>
7171
<input
72-
className="topic-name-input w-[75%] bg-indigo-400 text-justify placeholder:text-slate-300 hover:brightness-110"
72+
className="topic-name-input w-[75%] bg-indigo-600 text-justify placeholder:text-slate-300 hover:brightness-110"
7373
type="text"
7474
placeholder="Topic name..."
7575
value={topic.name}
@@ -94,7 +94,7 @@ export function TopicInput({
9494

9595
{/* Existing Topic Selection */}
9696
<select
97-
className="topic-select w-full rounded-lg bg-indigo-400 p-2 text-center brightness-90 hover:brightness-110"
97+
className="topic-select w-full rounded-lg bg-indigo-600 p-2 text-center brightness-90 hover:brightness-110"
9898
onChange={(e) => {
9999
const id = Number(e.target.value);
100100
if (!id) return;
@@ -114,7 +114,7 @@ export function TopicInput({
114114

115115
<button
116116
type="button"
117-
className="add-topic-button w-12 rounded-full bg-indigo-400 text-xl hover:brightness-110"
117+
className="add-topic-button w-12 rounded-full bg-indigo-600 text-xl hover:brightness-110"
118118
onClick={() =>
119119
setTopics([...topics, { type: "new", name: "", color_hex: 0xffffff }])
120120
}

client/src/components/ui/focus/currentTaskTitle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function CurrentTaskTitle(task_name: string) {
44
return (
55
<div className="m-3 flex flex-col items-center justify-center rounded-3xl bg-slate-900 p-10 shadow-xl shadow-black/40">
66
<h1 className="mb-2 font-inter text-4xl font-semibold">Current Focus</h1>
7-
<div className="rounded-full bg-indigo-400 p-3 px-8 font-inter text-xl font-semibold">
7+
<div className="rounded-full bg-indigo-700 p-3 px-8 font-inter text-xl font-semibold">
88
{task_name}
99
</div>
1010
</div>

client/src/components/ui/focus/taskDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function TaskDisplay({
2727
className={
2828
current
2929
? "px-auto outline-3 m-3 flex flex-auto flex-col rounded-3xl bg-indigo-500 p-4 shadow-md shadow-black/40 outline outline-slate-50"
30-
: "px-auto m-3 flex flex-auto flex-col rounded-3xl bg-indigo-400 p-4 shadow-md shadow-black/40"
30+
: "px-auto m-3 flex flex-auto flex-col rounded-3xl bg-indigo-700 p-4 shadow-md shadow-black/40"
3131
}
3232
>
3333
<div className="font-bold">{task.name}</div>

client/src/components/ui/focus/timer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const Timer = (timeRemaining: number) => {
2424
};
2525

2626
return (
27-
<div className="w-full rounded-full bg-indigo-400 p-3 px-8 font-inter text-xl font-semibold">
27+
<div className="w-full rounded-full bg-indigo-600 p-3 px-8 font-inter text-xl font-semibold">
2828
{formatTime(timeRemaining)}
2929
</div>
3030
);

client/src/components/ui/navbar.tsx

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,19 @@ export function Navbar() {
1414
: "rounded-md px-3 py-2 text-xl font-bold text-gray-300 hover:bg-white/5 hover:text-white";
1515

1616
return (
17-
<nav className="relative bg-indigo-500 after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-white/10">
18-
<div className="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8">
19-
<div className="relative flex h-16 items-center justify-between">
20-
<div className="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
21-
<div className="hidden sm:ml-6 sm:block">
22-
<div className="flex space-x-4">
23-
<Link
24-
href="/tasks"
25-
aria-current="page"
26-
className={linkClass("/tasks")}
27-
>
28-
Tasks
29-
</Link>
30-
<Link href="/schedule" className={linkClass("/schedule")}>
31-
Schedule
32-
</Link>
33-
<Link href="/focus" className={linkClass("/focus")}>
34-
Focus
35-
</Link>
36-
<LogoutButton />
37-
</div>
38-
</div>
39-
</div>
40-
<div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0"></div>
41-
</div>
17+
<nav className="flex bg-indigo-500 px-5 py-3 after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-white/10">
18+
<div className="flex w-full flex-1 items-center justify-center gap-4 sm:items-stretch sm:justify-start">
19+
<Link href="/tasks" aria-current="page" className={linkClass("/tasks")}>
20+
Tasks
21+
</Link>
22+
<Link href="/schedule" className={linkClass("/schedule")}>
23+
Schedule
24+
</Link>
25+
<Link href="/focus" className={linkClass("/focus")}>
26+
Focus
27+
</Link>
28+
<div className="w-full"></div>
29+
<LogoutButton />
4230
</div>
4331
</nav>
4432
);

client/src/pages/focus.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@ const CountdownTimer = () => {
209209
<p className="p-4 font-inter text-4xl font-semibold">Focus</p>
210210
<div className="flex flex-row justify-center">
211211
<div className="flex flex-col">
212+
<div>
213+
{currentTask ? (
214+
<div>{CurrentTaskTitle(currentTask.name)}</div>
215+
) : (
216+
<div>{CurrentTaskTitle("none")}</div>
217+
)}
218+
</div>
212219
<div>
213220
{currentTime ? (
214221
<TimeDisplay
@@ -232,19 +239,12 @@ const CountdownTimer = () => {
232239
</>
233240
)}
234241
</div>
235-
<div>
236-
{currentTask ? (
237-
<div>{CurrentTaskTitle(currentTask.name)}</div>
238-
) : (
239-
<div>{CurrentTaskTitle("none")}</div>
240-
)}
241-
</div>
242242
</div>
243243
<div>
244244
{times.length > 0 ? (
245245
<div className="justify-top flex flex-col pl-8">
246246
<div className="p-4 font-inter text-2xl font-semibold">
247-
tasks
247+
Tasks
248248
</div>
249249
<UpcomingTasks tasks={tasks} times={times} refresh={refresh} />
250250
</div>

client/src/pages/tasks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export default function TasksPage() {
209209
/>
210210
</div>
211211
<div
212-
className="add-task-container sticky top-3 flex h-full flex-col items-center justify-start rounded-lg bg-slate-900 p-3 shadow-xl"
212+
className="add-task-container sticky top-3 flex h-full flex-col items-center justify-start rounded-3xl bg-indigo-800 p-3 shadow-xl"
213213
style={{ display: showAddTask ? "flex" : "none" }}
214214
>
215215
<h1 className="text-3xl font-bold text-slate-100">Add Task</h1>
@@ -227,7 +227,7 @@ export default function TasksPage() {
227227
</div>
228228
</div>
229229
<button
230-
className="toggle-add-task-button fixed bottom-9 right-9 flex h-12 w-12 items-center justify-center rounded-full border bg-indigo-400 text-xl brightness-90 hover:brightness-110"
230+
className="toggle-add-task-button fixed bottom-9 right-9 flex h-12 w-12 items-center justify-center rounded-full border bg-indigo-600 text-xl brightness-90 hover:brightness-110"
231231
onClick={toggleShowAddTask}
232232
>
233233
{!showAddTask ? <RxPlus /> : <RxCross2 />}

0 commit comments

Comments
 (0)