Skip to content

Commit 917fedf

Browse files
committed
feat: make some more updates to the feed
remove resources page, updated prizes, add new faq, remove ctf in events page (give activities the green color instead), increase size to fit time
1 parent 7a3fdb8 commit 917fedf

File tree

7 files changed

+71
-175
lines changed

7 files changed

+71
-175
lines changed

src/app/(site)/feed/events/_components/calendar.tsx

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ import { eventLabel, eventsType } from "@/types/interface";
22
import { TiStarFullOutline } from "react-icons/ti";
33
import React, { useState } from "react";
44

5-
const useWindowSize = () => {
6-
const [windowSize, setWindowSize] = useState({
7-
width: window.innerWidth,
8-
height: window.innerHeight
9-
});
10-
};
5+
const multiplier = 120;
116

127
interface CalendarProps {
138
events: eventsType[];
@@ -39,16 +34,14 @@ interface EventProps {
3934
}
4035

4136
const Event: React.FC<EventProps> = ({ event }) => {
42-
const multiplier = 110;
4337
const width = (event.endTime - event.startTime) * multiplier;
4438
const left = event.startTime * multiplier;
4539
const top = event.row * 100;
4640
const eventColors: Record<string, string> = {
4741
event: "#F5595C",
4842
workshop: "#7D22CC",
4943
food: "#FFA167",
50-
ctf: "#00CC8E",
51-
activity: "#6060C2"
44+
activity: "#00CC8E"
5245
};
5346
const backgroundColor = eventColors[event.type] || "#6060C2";
5447

@@ -93,40 +86,32 @@ export const EventLabel: React.FC<EventLableProps> = ({
9386
}) => {
9487
const eventLabels: eventLabel[] = [
9588
{
96-
id: "e2",
89+
id: "e1",
9790
name: "Main event",
9891
type: "event",
9992
borderStyle: "#F5595C",
10093
textStyle: "text-[#F5595C] font-rubik"
10194
},
10295
{
103-
id: "e3",
96+
id: "e2",
10497
name: "Workshops",
10598
type: "workshop",
10699
borderStyle: "#7D22CC",
107100
textStyle: "text-[#7D22CC] font-rubik"
108101
},
109102
{
110-
id: "e4",
103+
id: "e3",
111104
name: "Food",
112105
type: "food",
113106
borderStyle: "#FFA167",
114107
textStyle: "text-[#FFA167] font-rubik"
115108
},
116-
// new type so event.type can be added as ctf
117109
{
118-
id: "e5",
119-
name: "CTF",
120-
type: "ctf",
121-
borderStyle: "#00CC8E",
122-
textStyle: "text-[#00CC8E] font-rubik"
123-
},
124-
{
125-
id: "e6",
110+
id: "e4",
126111
name: "Activity",
127112
type: "activity",
128-
borderStyle: "#6060C2",
129-
textStyle: "text-[#6060C2] font-rubik"
113+
borderStyle: "#00CC8E",
114+
textStyle: "text-[#00CC8E] font-rubik"
130115
}
131116
];
132117

@@ -163,7 +148,6 @@ export const EventLabel: React.FC<EventLableProps> = ({
163148

164149
const Calendar: React.FC<CalendarProps> = ({ events }) => {
165150
const [selectedFilter, setSelectedFilter] = useState<string>("all");
166-
const multiplier = 110;
167151
const hoursArray = Array.from({ length: 30 }, (_, i) => {
168152
const hour = (i % 12) + 1;
169153
const period = i < 12 ? "pm" : i > 22 ? "pm" : "am";

src/app/(site)/feed/events/_components/events.tsx

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@ import Calendar, { EventLabel } from "./calendar";
77

88
export default function Events() {
99
const [selectedFilter, setSelectedFilter] = useState<string>("all");
10-
10+
const eventColors: Record<string, string> = {
11+
event: "#F5595C",
12+
workshop: "#7D22CC",
13+
food: "#FFA167",
14+
activity: "#00CC8E"
15+
};
1116
const filteredEvents =
1217
selectedFilter === "all"
1318
? events
1419
: events.filter((event: eventsType) => event.type === selectedFilter);
20+
1521
return (
1622
<>
1723
{/* Mobile View */}
@@ -31,22 +37,11 @@ export default function Events() {
3137
<div className="flex flex-row items-center justify-between">
3238
<p className="text-lg font-bold">{event.name}</p>
3339
<p
34-
className={`h-4 w-4 flex-shrink-0 rounded-full ${
35-
event.type == "event"
36-
? "bg-[#F5595C]"
37-
: event.type == "workshop"
38-
? "bg-[#7D22CC]"
39-
: event.type == "food"
40-
? "bg-[#FFA167]"
41-
: event.type == "ctf"
42-
? "bg-[#00CC8E]"
43-
: event.type == "activity"
44-
? "bg-[#6060C2]"
45-
: "#F5595C"
46-
}`}></p>
40+
className="h-4 w-4 flex-shrink-0 rounded-full"
41+
style={{ backgroundColor: eventColors[event.type] }}></p>
4742
</div>
48-
<p> {event.timeString}</p>
49-
<p> {event.location} </p>
43+
<p>{event.timeString}</p>
44+
<p>{event.location}</p>
5045
</div>
5146
);
5247
})}

src/app/(site)/feed/faq/page.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,60 +31,67 @@ const faqs: FAQType[] = [
3131
},
3232
{
3333
id: "faq4",
34+
question:
35+
"Is it necessary to attend the opening ceremony or be present on the first day to participate?",
36+
answer:
37+
"While attending the entire event is preferred, it is not mandatory to attend the opening ceremony. However, you must be present for at least one of the two days to ensure you're checked in and have a project eligible for submission."
38+
},
39+
{
40+
id: "faq5",
3441
question: "Where is the information room?",
3542
answer:
3643
"The information room is in CS110A. You can come here to check in or ask questions."
3744
},
3845
{
39-
id: "faq5",
46+
id: "faq6",
4047
question: "Where do I park my vehicle?",
4148
answer:
4249
"Parking at CSUF is free on Saturday and Sunday. We recommend Lot A, Eastside, for overnight parking."
4350
},
4451
{
45-
id: "faq6",
52+
id: "faq7",
4653
question: "Will there be food?",
4754
answer:
4855
"Yes! We will have pizza on the first day for dinner and pastries and fruit for breakfast on Sunday. Snacks and drinks will be available throughout the event."
4956
},
5057
{
51-
id: "faq7",
58+
id: "faq8",
5259
question: "Does FullyHacks have one theme or multiple themes?",
5360
answer:
5461
"FullyHacks has multiple themes, divided into four different tracks."
5562
},
5663
{
57-
id: "faq8",
64+
id: "faq9",
5865
question: "What should I bring?",
5966
answer:
6067
"A sleeping bag, laptop, chargers, snacks, drinks, hygiene items, and anything else you may need."
6168
},
6269
{
63-
id: "faq9",
70+
id: "faq10",
6471
question: "How do I prepare for the hackathon?",
6572
answer:
6673
"If you have no coding experience, check out our FullyPacks template. Make sure your coding environment is set up in advance, including version control (GitHub), an IDE (VSCode), and any necessary frameworks or runtimes (Python, Node.js, etc.)."
6774
},
6875
{
69-
id: "faq10",
76+
id: "faq11",
7077
question: "What are FullyPacks? Do I have to use them?",
7178
answer:
7279
"No, you're not required to use them. FullyPacks are beginner-friendly templates designed to help you start your project if you don't know where to begin."
7380
},
7481
{
75-
id: "faq11",
82+
id: "faq12",
7683
question: "How do teams work? What if I don't have a team?",
7784
answer:
7885
"Teams can have 1 to 4 members. If you don't have a team, we will host a team-forming event after the opening ceremony."
7986
},
8087
{
81-
id: "faq12",
88+
id: "faq13",
8289
question: "What if I have questions during the hackathon?",
8390
answer:
8491
"Please reach out to any of the mentors in your room or ask in our Discord forum channel."
8592
},
8693
{
87-
id: "faq13",
94+
id: "faq14",
8895
question: "How will the projects be judged?",
8996
answer:
9097
"There will be different prize categories announced on the day of the hackathon. You can sign up your project for a category during the team-forming event. Examples include 'Best Use of...' awards."

src/app/(site)/feed/resources/page.tsx

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

src/components/nav-bar.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -210,27 +210,22 @@ export const FeedSideBar: React.FC = () => {
210210
href: "/feed/events"
211211
},
212212
{
213-
id: "feed07",
213+
id: "feed04",
214214
name: "Tracks & Prizes",
215215
href: "/feed/prizes"
216216
},
217217
{
218-
id: "feed04",
218+
id: "feed05",
219219
name: "FullyPacks",
220220
href: "/feed/fullypacks"
221221
},
222222
{
223-
id: "feed05",
224-
name: "Resources",
225-
href: "/feed/resources"
226-
},
227-
{
228-
id: "feed08",
223+
id: "feed06",
229224
name: "FAQs",
230225
href: "/feed/faq"
231226
},
232227
{
233-
id: "feed06",
228+
id: "feed07",
234229
name: "Profile",
235230
href: "/feed/profile"
236231
}
@@ -242,7 +237,7 @@ export const FeedSideBar: React.FC = () => {
242237
{!isOpen && (
243238
<AiOutlineMenu
244239
onClick={() => setOpen(true)}
245-
className="absolute -top-[5.5rem] left-4 z-20 block cursor-pointer stroke-[2] text-[#72d6e6] md:hidden"
240+
className="absolute -top-[5.865rem] left-4 z-20 block cursor-pointer stroke-[2] text-[#72d6e6] md:hidden"
246241
size={24}
247242
/>
248243
)}

0 commit comments

Comments
 (0)