diff --git a/components/MiniEventCard.module.css b/components/MiniEventCard.module.css index d6897613..a96ea9f1 100644 --- a/components/MiniEventCard.module.css +++ b/components/MiniEventCard.module.css @@ -18,7 +18,7 @@ } .info { - margin-top: 0; + margin-bottom: 0.75rem; } .details { diff --git a/components/MiniEventCard.tsx b/components/MiniEventCard.tsx index 032e5c8d..b297ded4 100644 --- a/components/MiniEventCard.tsx +++ b/components/MiniEventCard.tsx @@ -43,9 +43,9 @@ export const MiniEventCard: React.FC = ({
{name}
-

+

-

+

{short}

diff --git a/components/TeamMember.tsx b/components/TeamMember.tsx index 745b14c5..9c9cdc4c 100644 --- a/components/TeamMember.tsx +++ b/components/TeamMember.tsx @@ -5,13 +5,21 @@ import { Image } from "./Image"; interface TeamMemberProps { name: string; role: string; - src: string; + image?: string; } -export const TeamMember: React.FC = ({ name, role, src }) => { +export const TeamMember: React.FC = ({ + name, + role, + image, +}) => { return (
- {`${name} + {`Picture
{name}
{role}
diff --git a/components/TeamMemberCard.module.css b/components/TeamMemberCard.module.css new file mode 100644 index 00000000..35a7882f --- /dev/null +++ b/components/TeamMemberCard.module.css @@ -0,0 +1,114 @@ +.card { + display: grid; + grid-template-columns: 126px auto; + grid-template-areas: + "picture name" + "picture role" + "picture description"; + column-gap: 2rem; + row-gap: 0; + justify-items: start; + align-items: start; + + max-width: 847px; +} + +.picture { + grid-area: picture; + justify-self: center; + + max-width: 126px; + max-height: 126px; + + clip-path: circle(50%); +} + +.image { + width: 100%; +} + +.name { + grid-area: name; + margin: 0; + + color: var(--blue-1); + font-size: 2.25rem; + line-height: 1.1; + font-weight: 700; +} + +.role { + grid-area: role; + margin: 0; + + color: var(--purple-2); + font-size: 1.5rem; + line-height: 1.7; + font-weight: 600; +} + +.description { + grid-area: description; + margin: 0; + + line-height: 1.875; +} + +@media screen and (max-width: 768px) { + .card { + grid-template-columns: 90px auto; + column-gap: 1.375rem; + + max-width: 460px; + } + + .picture { + max-width: 90px; + max-height: 90px; + } + + .name, + .role, + .description { + font-size: 1rem; + line-height: 1.5; + } +} + +/* TODO: Use the correct mobile styles from figma +@media only screen and (max-width: 375px) { + .card { + grid-template-columns: 70px auto; + grid-template-rows: auto calc(0.875rem * 1.5 + 0.75rem) auto; + grid-template-areas: + "picture name" + "picture role" + "description description"; + column-gap: 1.4375rem; + align-items: end; + + max-width: 190px; + } + + .picture { + max-width: 70px; + max-height: 70px; + } + + .name, + .role, + .description { + font-size: 0.875rem; + line-height: 1.5; + } + + .role { + margin-bottom: 0.75rem; + } + + .description { + justify-self: top; + margin-top: 0.75rem; + margin-left: 0.75rem; + } +} */ diff --git a/components/TeamMemberCard.tsx b/components/TeamMemberCard.tsx new file mode 100644 index 00000000..4b9c4e73 --- /dev/null +++ b/components/TeamMemberCard.tsx @@ -0,0 +1,27 @@ +import React from "react"; +import { Image } from "./Image"; +import styles from "./TeamMemberCard.module.css"; + +interface TeamMemberCardProps { + name: string; + role: string; + image?: string; // path to image of person, relative to public directory + children: React.ReactNode; +} + +export function TeamMemberCard(props: TeamMemberCardProps) { + return ( +
+
+ {`Picture +
+

{props.name}

+

{props.role}

+
{props.children}
+
+ ); +} diff --git a/components/playground.tsx b/components/playground.tsx index 9f86fc0e..609e9566 100644 --- a/components/playground.tsx +++ b/components/playground.tsx @@ -15,13 +15,17 @@ import AltTab, { import UnavailableContent, { metadata as unavailableMetadata, } from "../content/playground/unavailable.news.mdx"; -import { metadata as teamMemberMetadata } from "../content/playground/demo.teammember.mdx"; +import { metadata as dogeMetadata } from "../content/playground/doge.team-member.mdx"; +import CodeyInfo, { + metadata as codeyMetadata, +} from "../content/playground/codey.team-member.mdx"; import { MiniEventCard } from "./MiniEventCard"; import { NewsCard } from "./NewsCard"; import { EventCard } from "./EventCard"; import { EventDescriptionCard } from "./EventDescriptionCard"; import { TeamMember } from "./TeamMember"; +import { TeamMemberCard } from "./TeamMemberCard"; const events = [ { Content: OOTBReact, metadata: OOTBReactEventMetadata }, @@ -98,17 +102,27 @@ export function TeamMemberDemo() {

- - - - - - - - - - + + + + + + + + + +
); } + +export function TeamMemberCardDemo() { + return ( +
+ + + +
+ ); +} diff --git a/content/playground/codey.team-member.mdx b/content/playground/codey.team-member.mdx new file mode 100644 index 00000000..0c42aa19 --- /dev/null +++ b/content/playground/codey.team-member.mdx @@ -0,0 +1,9 @@ +export const metadata = { + name: "Codey", + role: "Mascot", + image: "/images/playground/codeyHi.png" +} + +The one, the only, Codey! Codey is ecstatic to be your mascot for this term. +Codey loves programming and playing on their laptop. You can often find Codey +posing for event promo graphics, or chilling in the CSC discord. \ No newline at end of file diff --git a/content/playground/demo.teammember.mdx b/content/playground/demo.teammember.mdx deleted file mode 100644 index 116900b7..00000000 --- a/content/playground/demo.teammember.mdx +++ /dev/null @@ -1,5 +0,0 @@ -export const metadata = { - name: "Name Name", - role: "Role", - src: "images/playground/team-member.png" -} \ No newline at end of file diff --git a/content/playground/doge.team-member.mdx b/content/playground/doge.team-member.mdx new file mode 100644 index 00000000..0fa58e6f --- /dev/null +++ b/content/playground/doge.team-member.mdx @@ -0,0 +1,5 @@ +export const metadata = { + name: "Woof Woof", + role: "Doge", + image: "/images/playground/doge.jpg" +} \ No newline at end of file diff --git a/next-env.d.ts b/next-env.d.ts index bcee8690..458d2ae0 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -34,13 +34,13 @@ declare module "*.news.mdx" { export default ReactComponent; } -declare module "*.teammember.mdx" { +declare module "*.team-member.mdx" { import { ComponentType } from "react"; interface TeamMemberMetadata { name: string; role: string; - src: string; + image?: string; } const ReactComponent: ComponentType; diff --git a/pages/playground.mdx b/pages/playground.mdx index 6f7c115f..f998bb14 100644 --- a/pages/playground.mdx +++ b/pages/playground.mdx @@ -3,9 +3,12 @@ import { NewsCardDemo, EventDescriptionCardDemo, EventCardDemo, - TeamMemberDemo + TeamMemberDemo, + TeamMemberCardDemo, } from "../components/playground"; +import { TeamMemberCard } from "../components/TeamMemberCard"; + # Playground ## `` @@ -49,3 +52,12 @@ The `` component has an image of the team member along with their It is used on the Meet the Team page for non executive members. + +--- + +## `` + +The `` component is used on the "Meet the Team!" page to +display information about the execs: prez, VP, trez, AVP, and syscom overlord. + + diff --git a/public/images/playground/codeyHi.png b/public/images/playground/codeyHi.png new file mode 100644 index 00000000..0445cd82 Binary files /dev/null and b/public/images/playground/codeyHi.png differ diff --git a/public/images/playground/doge.jpg b/public/images/playground/doge.jpg new file mode 100644 index 00000000..0bc18687 Binary files /dev/null and b/public/images/playground/doge.jpg differ diff --git a/public/images/playground/team-member.png b/public/images/playground/team-member.png deleted file mode 100644 index 7bbd2715..00000000 Binary files a/public/images/playground/team-member.png and /dev/null differ diff --git a/public/images/team-member-placeholder.svg b/public/images/team-member-placeholder.svg new file mode 100644 index 00000000..3de69d51 --- /dev/null +++ b/public/images/team-member-placeholder.svg @@ -0,0 +1,3 @@ + + +