Skip to content

Commit 0d5f0e5

Browse files
authored
Merge pull request #18 from codersforcauses/consistant-styling
all pages use the same colour scheme
2 parents 3cb9997 + ca27e7a commit 0d5f0e5

17 files changed

Lines changed: 46 additions & 315 deletions

client/src/components/task_form.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ export function TaskForm({ userId, onTaskCreated }: TaskFormProps) {
101101
return (
102102
<form
103103
onSubmit={handleSubmit}
104-
className="task-form flex h-full w-full flex-col items-center justify-between gap-2 rounded-lg bg-slate-400 p-4 text-slate-200"
104+
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"
105105
>
106106
<input
107-
className="title-input w-full rounded-lg bg-slate-400 px-3 py-1 text-3xl font-bold text-slate-100 brightness-90 placeholder:text-slate-300 hover:brightness-110"
107+
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"
108108
type="text"
109109
value={taskName}
110110
onChange={(e) => setTaskName(e.target.value)}
@@ -116,7 +116,7 @@ export function TaskForm({ userId, onTaskCreated }: TaskFormProps) {
116116
Description
117117
</h1>
118118
<textarea
119-
className="description-input w-full rounded-lg bg-slate-400 p-2 brightness-90 placeholder:text-slate-300 hover:brightness-110"
119+
className="description-input w-full rounded-lg bg-indigo-400 p-2 brightness-90 placeholder:text-slate-300 hover:brightness-110"
120120
value={description}
121121
onChange={(e) => setDescription(e.target.value)}
122122
rows={7}
@@ -130,7 +130,7 @@ export function TaskForm({ userId, onTaskCreated }: TaskFormProps) {
130130
/>
131131
<TimeInput times={times} setTimes={setTimes} />
132132
<button
133-
className="w-fit rounded-lg border border-slate-300 bg-slate-400 px-3 py-1 text-xl brightness-110 hover:brightness-125"
133+
className="w-fit rounded-full border border-slate-300 bg-indigo-400 px-3 py-1 text-xl brightness-110 hover:brightness-125"
134134
type="submit"
135135
>
136136
Save

client/src/components/task_item.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export function TaskItem({
132132
/* Item Display */
133133
}
134134
return (
135-
<div className="task flex h-fit w-full max-w-[48rem] flex-col gap-3 rounded-lg bg-slate-400 p-5 text-slate-200 shadow-xl">
135+
<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">
136136
<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">
137137
{/* Task Name and Completion */}
138138
<input
@@ -143,7 +143,7 @@ export function TaskItem({
143143
/>
144144
{isEditing ? (
145145
<input
146-
className="task-title-edit w-full rounded-lg bg-slate-400 px-3 py-1 brightness-90 hover:brightness-110"
146+
className="task-title-edit w-full rounded-lg bg-indigo-400 px-3 py-1 brightness-90 hover:brightness-110"
147147
value={draftName}
148148
onChange={(e) => setDraftName(e.target.value)}
149149
/>
@@ -167,14 +167,14 @@ export function TaskItem({
167167
</div>
168168

169169
{/* Task Times */}
170-
<div className="task-times-container flex flex-row flex-wrap items-start justify-start gap-y-1">
170+
<div className="task-times-container flex flex-row flex-wrap items-start justify-start gap-1">
171171
{isEditing ? (
172172
<TimeInput times={draftTimes} setTimes={setDraftTimes} />
173173
) : item.times?.length > 0 ? (
174174
item.times.map((time) => (
175175
<div
176176
key={time.id}
177-
className="day-time-tags flex w-fit flex-row gap-3 rounded-full bg-slate-400 px-3 py-1 hover:brightness-110"
177+
className="day-time-tags flex w-fit flex-row gap-3 rounded-full bg-indigo-400 px-3 py-1 hover:brightness-110"
178178
>
179179
<DayTag day={formatDay(time.day)} />
180180
<TimeTag start_time={time.start_time} end_time={time.end_time} />
@@ -217,7 +217,7 @@ export function TaskItem({
217217
Description
218218
</h1>
219219
<textarea
220-
className="w-full rounded-lg bg-slate-400 p-1 brightness-90 hover:brightness-110"
220+
className="w-full rounded-lg bg-indigo-400 p-1 brightness-90 hover:brightness-110"
221221
value={draftDescription}
222222
rows={7}
223223
onChange={(e) => setDraftDescription(e.target.value)}
@@ -234,16 +234,16 @@ export function TaskItem({
234234

235235
<div className="task-edit flex gap-2">
236236
{isEditing ? (
237-
<div className="flex w-full flex-row justify-center text-lg">
237+
<div className="flex w-full flex-row justify-center text-lg gap-2">
238238
<button
239-
className="rounded-full bg-slate-400 px-3 py-1 hover:brightness-110"
239+
className="rounded-full bg-indigo-400 px-3 py-1 hover:brightness-110"
240240
onClick={saveEdit}
241241
disabled={saving}
242242
>
243243
Save
244244
</button>
245245
<button
246-
className="rounded-full bg-slate-400 px-3 py-1 hover:brightness-110"
246+
className="rounded-full bg-indigo-400 px-3 py-1 hover:brightness-110"
247247
onClick={cancelEdit}
248248
>
249249
Cancel

client/src/components/task_list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function TaskList({
4646
);
4747
}
4848
return (
49-
<ul className="task-list h-fit space-y-3">
49+
<ul className="task-list h-fit space-y-3 w-xl">
5050
{items.map((item) => (
5151
<li key={item.id}>
5252
<TaskItem

client/src/components/time_input.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
3131
{times.map((time, index) => (
3232
<div
3333
key={index}
34-
className="time-input-wrapper flex w-full flex-row items-center justify-evenly gap-1 rounded-lg bg-slate-400 p-1 brightness-90 hover:brightness-95"
34+
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"
3535
>
3636
<div className="day-select-wrapper flex w-[20%] flex-row items-center justify-center gap-1">
3737
<FaRegCalendarAlt />
3838
<select
39-
className="day-select h-full rounded-lg bg-slate-400 p-1 text-center hover:brightness-110"
39+
className="day-select h-full rounded-lg bg-indigo-400 p-1 text-center hover:brightness-110"
4040
value={time.day}
4141
onChange={(e) => {
4242
const newTimes = [...times];
@@ -55,7 +55,7 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
5555
<FaRegClock />
5656
<div className="time-inputs-wrapper text-md flex flex-col">
5757
<input
58-
className="time-input h-full rounded-lg bg-slate-400 hover:brightness-110"
58+
className="time-input h-full rounded-lg bg-indigo-400 hover:brightness-110"
5959
type="time"
6060
value={time.start_time}
6161
onChange={(e) => {
@@ -65,7 +65,7 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
6565
}}
6666
/>
6767
<input
68-
className="time-input h-full rounded-lg bg-slate-400 hover:brightness-110"
68+
className="time-input h-full rounded-lg bg-indigo-400 hover:brightness-110"
6969
type="time"
7070
value={time.end_time}
7171
onChange={(e) => {
@@ -76,7 +76,7 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
7676
/>
7777
</div>
7878
</div>
79-
<div className="repeat-input-wrapper flex w-[25%] flex-row gap-2 rounded-lg bg-slate-400 p-1 hover:brightness-110">
79+
<div className="repeat-input-wrapper flex w-[25%] flex-row gap-2 rounded-lg bg-indigo-400 p-1 hover:brightness-110">
8080
<span>Repeats?</span>
8181
<input
8282
className="repeat-input"
@@ -99,7 +99,7 @@ export function TimeInput({ times, setTimes }: TimeInputProps) {
9999
</div>
100100
))}
101101
<button
102-
className="add-time-button w-12 rounded-full bg-slate-400 text-xl hover:brightness-110"
102+
className="add-time-button w-12 rounded-full bg-indigo-400 text-xl hover:brightness-110"
103103
type="button"
104104
onClick={() =>
105105
setTimes([

client/src/components/timetable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ function Timetable({ timetable_tasks_props }: TimetableProps) {
370370
return (
371371
<div
372372
id="timetable-border"
373-
className="h-full w-full rounded-lg bg-slate-900 p-3"
373+
className="h-full w-full rounded-lg bg-slate-900 p-3 shadow-xl shadow-black/40"
374374
>
375375
<div
376376
id="timetable-content"

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-slate-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-400 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-slate-400 text-justify placeholder:text-slate-300 hover:brightness-110"
72+
className="topic-name-input w-[75%] bg-indigo-400 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-slate-400 p-2 text-center brightness-90 hover:brightness-110"
97+
className="topic-select w-full rounded-lg bg-indigo-400 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-slate-400 text-xl hover:brightness-110"
117+
className="add-topic-button w-12 rounded-full bg-indigo-400 text-xl hover:brightness-110"
118118
onClick={() =>
119119
setTopics([...topics, { type: "new", name: "", color_hex: 0xffffff }])
120120
}

client/src/components/ui/countdown.tsx

Lines changed: 0 additions & 59 deletions
This file was deleted.

client/src/components/ui/currentTask.tsx

Lines changed: 0 additions & 104 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const Timer = (timeRemaining: number) => {
22
const formatTime = (time: number) => {
33
const seconds = Math.floor(time % 60);
44
const minutes = Math.floor((time / 60) % 60);
5-
const hours = Math.floor((time / (60 * 60)) % 24);
5+
const hours = Math.floor((time / (60 * 60)));
66

77
return (
88
<div className="countdown-display">
@@ -24,7 +24,7 @@ const Timer = (timeRemaining: number) => {
2424
};
2525

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

client/src/components/ui/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ 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-800 after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-white/10">
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">
1818
<div className="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8">
1919
<div className="relative flex h-16 items-center justify-between">
2020
<div className="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">

0 commit comments

Comments
 (0)