diff --git a/src/components/events/EventCard/index.tsx b/src/components/events/EventCard/index.tsx
index d03f6805..69f1d16e 100644
--- a/src/components/events/EventCard/index.tsx
+++ b/src/components/events/EventCard/index.tsx
@@ -16,7 +16,7 @@ import {
} from '@/lib/utils';
import Image from 'next/image';
import Link from 'next/link';
-import { useState } from 'react';
+import { ComponentType, Fragment, ReactNode, useState } from 'react';
import styles from './style.module.scss';
interface EventCardProps {
@@ -26,6 +26,9 @@ interface EventCardProps {
showYear?: boolean;
borderless?: boolean;
hideInfo?: boolean;
+ interactive?: boolean;
+ /** Used by onboarding to highlight the badges */
+ badgeWrapper?: ComponentType<{ children: ReactNode }>;
}
const EventCard = ({
@@ -35,6 +38,8 @@ const EventCard = ({
showYear,
borderless,
hideInfo,
+ interactive = true,
+ badgeWrapper: BadgeWrapper = Fragment,
}: EventCardProps) => {
const { uuid, cover, title, start, end, location, committee } = isOrderPickupEvent(event)
? {
@@ -49,6 +54,8 @@ const EventCard = ({
const displayCover = getDefaultEventCover(cover);
+ const Component = interactive ? Link : 'div';
+
return (
<>
{isPickupEvent ? (
@@ -71,12 +78,17 @@ const EventCard = ({
/>
)}
- {
+ if (!interactive) {
+ return;
+ }
e.preventDefault();
setExpanded(true);
}}
@@ -117,10 +129,12 @@ const EventCard = ({
{location}
-
+
+
+
) : null}
-
+
>
);
};
diff --git a/src/components/events/EventCard/style.module.scss b/src/components/events/EventCard/style.module.scss
index d2e9962c..76ee6de9 100644
--- a/src/components/events/EventCard/style.module.scss
+++ b/src/components/events/EventCard/style.module.scss
@@ -20,7 +20,7 @@
border-radius: 10px;
}
- &:not([data-disabled]):hover {
+ &.interactive:not([data-disabled]):hover {
outline-width: 4px;
transform: scale(0.975);
diff --git a/src/components/events/EventCard/style.module.scss.d.ts b/src/components/events/EventCard/style.module.scss.d.ts
index 732f49bd..35b4eb13 100644
--- a/src/components/events/EventCard/style.module.scss.d.ts
+++ b/src/components/events/EventCard/style.module.scss.d.ts
@@ -4,6 +4,7 @@ export type Styles = {
image: string;
info: string;
infoText: string;
+ interactive: string;
};
export type ClassNames = keyof Styles;
diff --git a/src/components/events/EventFilter/index.tsx b/src/components/events/EventFilter/index.tsx
index 787cbcf1..2613844e 100644
--- a/src/components/events/EventFilter/index.tsx
+++ b/src/components/events/EventFilter/index.tsx
@@ -16,6 +16,7 @@ interface EventFilterProps {
filters: FilterOptions;
onFilter?: (param: string, value: string) => void;
loggedOut?: boolean;
+ className?: string;
}
export const DEFAULT_FILTER_STATE: FilterEventOptions = {
@@ -29,11 +30,12 @@ const EventFilter = ({
filters: { search, communityFilter, dateFilter, attendanceFilter },
onFilter,
loggedOut,
+ className = '',
}: EventFilterProps) => {
const years = useMemo(getYears, []);
return (
-
+
{
+ return (
+
+ {children}
+
+ Each event is categorized under one of the ACM communities and tagged with the number of
+ points you can earn from attending.
+
+
+ );
+};
+
const Events = () => {
return (
-
Events
+
+ Events
+
{
}}
/>
- {dummyEvents.map(event => (
-
+ {dummyEvents.map((event, i) => (
+
))}
diff --git a/src/components/onboarding/Events/style.module.scss b/src/components/onboarding/Events/style.module.scss
index 0c3d2e91..ab36cf30 100644
--- a/src/components/onboarding/Events/style.module.scss
+++ b/src/components/onboarding/Events/style.module.scss
@@ -10,5 +10,75 @@
display: flex;
gap: 1rem;
justify-content: space-between;
+
+ @media (max-width: vars.$breakpoint-lg) {
+ justify-content: center;
+ }
+
+ .badgeWrapper {
+ animation: badge-highlight 0.5s 1s forwards;
+ border: 2px solid transparent;
+ border-radius: 4px;
+ margin: calc(-0.25rem - 2px);
+ padding: 0.25rem;
+ position: relative;
+ transform-origin: left;
+ width: fit-content;
+
+ .annotation {
+ animation: annotation-appear 0.5s 1.5s backwards;
+ bottom: 100%;
+ left: 0;
+ position: absolute;
+ transform: scale(calc(1 / 1.2));
+ white-space: pre-wrap;
+ }
+ }
+ }
+
+ .fadeOut {
+ animation: fade-out 0.5s 1s forwards;
+ }
+
+ .desktopOnly {
+ @media (max-width: vars.$breakpoint-lg) {
+ display: none;
+ }
+ }
+}
+
+@keyframes fade-out {
+ from {
+ opacity: 1;
+ }
+
+ to {
+ opacity: 0.3;
+ }
+}
+
+@keyframes badge-highlight {
+ from {
+ background-color: transparent;
+ border-color: transparent;
+ transform: scale(1);
+ }
+
+ to {
+ background-color: rgba(255, 243, 181, 0.6);
+ border-color: #ffdc24;
+ transform: scale(1.2);
+ }
+}
+
+@keyframes annotation-appear {
+ from {
+ opacity: 0;
+ transform: translateY(1rem) scale(calc(1 / 1.2));
+ }
+
+ to {
+ opacity: 1;
+ transform: scale(calc(1 / 1.2));
}
}
diff --git a/src/components/onboarding/Events/style.module.scss.d.ts b/src/components/onboarding/Events/style.module.scss.d.ts
index 87aeaac2..bc496c72 100644
--- a/src/components/onboarding/Events/style.module.scss.d.ts
+++ b/src/components/onboarding/Events/style.module.scss.d.ts
@@ -1,5 +1,11 @@
export type Styles = {
+ annotation: string;
+ annotationAppear: string;
+ badgeHighlight: string;
+ badgeWrapper: string;
+ desktopOnly: string;
events: string;
+ fadeOut: string;
page: string;
};