-
-
-
- {props.course.courseTitle}
-
-
- );
-}
diff --git a/components/PlanCardList.tsx b/components/PlanCardList.tsx
deleted file mode 100644
index c037251..0000000
--- a/components/PlanCardList.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Course, CoursePlan } from "@prisma/client";
-import prisma from "../lib/prisma";
-import PlanCard from "./PlanCard";
-
-async function getPlans(planId: any) {
- const courses = await prisma.course.findMany({
- where: {
- id: planId,
- },
- });
- /*
- const plans = await prisma.coursePlan.findMany({
- where: {
- User: {
- //@ts-ignore
- uuid: session?.user?.id,
- },
- },
- include: {
- courses: true,
- },
- });*/
- return courses;
-}
-
-export async function PlanCardList(planId: any) {
- const courses: Course[] = await getPlans(planId);
-
- return (
- <>
-
- {courses?.map((course: any) => (
-
- ))}
-
- >
- );
-}
diff --git a/components/primitives.ts b/components/primitives.ts
index 66d31b2..5b16a76 100644
--- a/components/primitives.ts
+++ b/components/primitives.ts
@@ -54,3 +54,29 @@ export const subtitle = tv({
fullWidth: true,
},
});
+
+export const courseColors = [
+ "#093145",
+ "#107896",
+ "#829356",
+
+ "#C2571A",
+ "#9A2617",
+ "#636363",
+ "#087E8B",
+ "#590925",
+ "#034748",
+ "#19381F",
+ "#631D76",
+ "#4B4E6D",
+];
+
+export function generateColorFromName(name: string) {
+ let hash = 0;
+
+ for (let i = 0; i < name.length; i++) {
+ hash += name.charCodeAt(i);
+ }
+
+ return courseColors[hash % courseColors.length];
+}
diff --git a/package-lock.json b/package-lock.json
index 68e46ea..27a2d4a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,6 +10,10 @@
"dependencies": {
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
+ "@fullcalendar/core": "^6.1.15",
+ "@fullcalendar/daygrid": "^6.1.15",
+ "@fullcalendar/react": "^6.1.15",
+ "@fullcalendar/timegrid": "^6.1.15",
"@mui/icons-material": "^6.1.5",
"@nextui-org/button": "2.0.38",
"@nextui-org/code": "2.0.33",
@@ -31,6 +35,7 @@
"clsx": "2.1.1",
"framer-motion": "~11.11.10",
"intl-messageformat": "^10.7.3",
+ "moment": "^2.30.1",
"next": "^15.0.1",
"next-auth": "^4.24.10",
"next-client-cookies": "^2.0.0",
@@ -509,6 +514,57 @@
"tslib": "2"
}
},
+ "node_modules/@fullcalendar/core": {
+ "version": "6.1.15",
+ "resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.15.tgz",
+ "integrity": "sha512-BuX7o6ALpLb84cMw1FCB9/cSgF4JbVO894cjJZ6kP74jzbUZNjtwffwRdA+Id8rrLjT30d/7TrkW90k4zbXB5Q==",
+ "license": "MIT",
+ "dependencies": {
+ "preact": "~10.12.1"
+ }
+ },
+ "node_modules/@fullcalendar/core/node_modules/preact": {
+ "version": "10.12.1",
+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.12.1.tgz",
+ "integrity": "sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/preact"
+ }
+ },
+ "node_modules/@fullcalendar/daygrid": {
+ "version": "6.1.15",
+ "resolved": "https://registry.npmjs.org/@fullcalendar/daygrid/-/daygrid-6.1.15.tgz",
+ "integrity": "sha512-j8tL0HhfiVsdtOCLfzK2J0RtSkiad3BYYemwQKq512cx6btz6ZZ2RNc/hVnIxluuWFyvx5sXZwoeTJsFSFTEFA==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@fullcalendar/core": "~6.1.15"
+ }
+ },
+ "node_modules/@fullcalendar/react": {
+ "version": "6.1.15",
+ "resolved": "https://registry.npmjs.org/@fullcalendar/react/-/react-6.1.15.tgz",
+ "integrity": "sha512-L0b9hybS2J4e7lq6G2CD4nqriyLEqOH1tE8iI6JQjAMTVh5JicOo5Mqw+fhU5bJ7hLfMw2K3fksxX3Ul1ssw5w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@fullcalendar/core": "~6.1.15",
+ "react": "^16.7.0 || ^17 || ^18 || ^19",
+ "react-dom": "^16.7.0 || ^17 || ^18 || ^19"
+ }
+ },
+ "node_modules/@fullcalendar/timegrid": {
+ "version": "6.1.15",
+ "resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.15.tgz",
+ "integrity": "sha512-61ORr3A148RtxQ2FNG7JKvacyA/TEVZ7z6I+3E9Oeu3dqTf6M928bFcpehRTIK6zIA6Yifs7BeWHgOE9dFnpbw==",
+ "license": "MIT",
+ "dependencies": {
+ "@fullcalendar/daygrid": "~6.1.15"
+ },
+ "peerDependencies": {
+ "@fullcalendar/core": "~6.1.15"
+ }
+ },
"node_modules/@humanfs/core": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz",
@@ -7897,6 +7953,15 @@
"node": ">=16 || 14 >=14.17"
}
},
+ "node_modules/moment": {
+ "version": "2.30.1",
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
+ "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
+ "license": "MIT",
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
diff --git a/package.json b/package.json
index 46745b7..fc84f5d 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,10 @@
"dependencies": {
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
+ "@fullcalendar/core": "^6.1.15",
+ "@fullcalendar/daygrid": "^6.1.15",
+ "@fullcalendar/react": "^6.1.15",
+ "@fullcalendar/timegrid": "^6.1.15",
"@mui/icons-material": "^6.1.5",
"@nextui-org/button": "2.0.38",
"@nextui-org/code": "2.0.33",
@@ -32,6 +36,7 @@
"clsx": "2.1.1",
"framer-motion": "~11.11.10",
"intl-messageformat": "^10.7.3",
+ "moment": "^2.30.1",
"next": "^15.0.1",
"next-auth": "^4.24.10",
"next-client-cookies": "^2.0.0",
diff --git a/styles/globals.css b/styles/globals.css
index b5c61c9..ffb33bb 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -1,3 +1,57 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+
+/* override fullcalendar white shadow and border; add filters */
+.fc-timegrid-event-harness-inset .fc-timegrid-event {
+ border: none !important;
+ box-shadow: none !important;
+ filter: drop-shadow(4px 6px 10px #00000044) brightness(100%) !important;
+ -webkit-filter: drop-shadow(4px 6px 10px #00000044) brightness(100%);
+ font-family: var(--font-sans);
+}
+
+.fc-timegrid-event-harness-inset .fc-timegrid-event:hover {
+ box-shadow: none !important;
+ filter: drop-shadow(4px 6px 10px #00000044) brightness(80%) !important;
+ -webkit-filter: drop-shadow(4px 6px 10px #00000044) brightness(80%);
+ -webkit-transition: all 0.5s ease;
+ -moz-transition: all 0.5s ease;
+ -o-transition: all 0.5s ease;
+ -ms-transition: all 0.5s ease;
+ transition: all 0.5s ease;
+ font-family: var(--font-sans);
+}
+.fc-day-today {
+ background-color: inherit !important;
+}
+.fc-col-header-cell-cushion {
+ color: white;
+}
+
+.fc-col-header-cell-cushion:hover {
+ color: white;
+ font-family: var(--font-sans);
+}
+
+.fc-col-header {
+ background-color: #151d2b;
+ font-family: var(--font-sans);
+}
+
+.fc-event-main-frame {
+ cursor: pointer;
+}
+
+.fc-event-title {
+ text-overflow: ellipsis;
+}
+
+h2 {
+ font-size: 1.1em;
+}
+
+.smallFont {
+ font-size: small;
+ margin: 0;
+}
diff --git a/swatscraper b/swatscraper
index 26f1d82..32a5d97 160000
--- a/swatscraper
+++ b/swatscraper
@@ -1 +1 @@
-Subproject commit 26f1d82850014294d64734ae2f9c5b3429bd0eb7
+Subproject commit 32a5d975a8cbe906764c553846d220de1f0ed4ab