diff --git a/components/About.module.css b/components/About.module.css new file mode 100644 index 0000000..3a82b92 --- /dev/null +++ b/components/About.module.css @@ -0,0 +1,59 @@ +.aboutWrapper { + position: relative; + width: 90%; +} + +.about { + display: flex; + flex-direction: row; + padding: calc(45rem / 16); +} + +.about h1 { + margin: 0; +} + +.about h4 { + margin: 0; +} + +.about aside { + flex: 1; + margin-right: calc(40rem / 16); +} + +.about aside h1 { + color: var(--secondary-accent) +} + +.about aside p { + color: var(--primary-accent-lighter) +} + +.about article { + flex: 3; +} + +.about article p { + color: var(--primary-text); +} + +.angle { + position: absolute; + top: 0; + left: 0; + width: calc(70rem / 16); + height: calc(70rem / 16); +} + +.anglePath { + stroke: var(--primary-accent-light) +} + +.left.angle { + transform: rotate(180deg); + top: unset; + left: unset; + bottom: 0; + right: 0; +} diff --git a/components/About.tsx b/components/About.tsx new file mode 100644 index 0000000..f409610 --- /dev/null +++ b/components/About.tsx @@ -0,0 +1,65 @@ +import React from "react"; + +import styles from "./About.module.css"; + +export function About() { + return ( +
+ +
+ +
+

Computer Science

+

+ Offered from the Faculty of Mathematics as most commonly a co-op + program, students usually attend 8 school and 6 co-op terms in their + degree. However, CS is very flexible, as many students historically + have dropped co-ops, taking terms off, and messing with their + schedule to fit their desires. +

+

Computing and Financial Management

+

+ Computing and Financial Management (CFM) combines the core CS + courses with electives from areas such as accounting, economics, and + financial management. This is a joint offer from the Faculty of + Mathematics and the School of Accounting and Finance, and has the + same schedule (and flexibility) as CS. +

+

CS/BBA

+

+ Joint with Wilfrid Laurier University, the Business Administration + and Computer Science Double Degree (CS/BBA) is an exclusive offering + that allows students to get experience in CS as well as many + subfields of business. There are 10 school terms and either 4 or 5 + co-op terms in the usual schedule, so it’s a bit more work than CS + or CFM. +

+
+
+ +
+ ); +} + +interface AngleDecorationProps { + isBottom: boolean; +} + +function AngleDecoration({ isBottom }: AngleDecorationProps) { + return ( + + + + ); +} diff --git a/components/Sections.module.css b/components/Sections.module.css new file mode 100644 index 0000000..575dc97 --- /dev/null +++ b/components/Sections.module.css @@ -0,0 +1,60 @@ +.sections { + display: flex; + flex-direction: row; + gap: calc(15rem / 16); +} + +.sections h1 { + flex: 3; + text-align: right; + margin: 0; +} + +.separator { + flex: 1; + background-color: var(--label); + height: calc(1rem / 16); + width: 100%; + margin-top: calc(30rem / 16); +} + +.nav { + flex: 3; + display: flex; + flex-direction: column; +} + +.nav ul { + list-style-type: none; + margin: 0; + padding: 0; +} + +.nav li { + margin: calc(20rem / 16); + margin-left: 0; +} + +.nav li:first-child { + margin-top: calc(18rem / 16); +} + +.nav li .linkNumber { + color: var(--secondary-accent); + margin: 0; + display: inline; +} + +.nav li a { + font-size: calc(24rem / 16); + color: var(--primary-text); +} + +.nav li a:hover .linkName { + text-decoration: underline; +} + +.nav li .linkName { + margin: 0; + display: inline; +} \ No newline at end of file diff --git a/components/Sections.tsx b/components/Sections.tsx new file mode 100644 index 0000000..226d383 --- /dev/null +++ b/components/Sections.tsx @@ -0,0 +1,45 @@ +import React from "react"; + +import styles from "./Sections.module.css"; + +interface SectionsData { + name: string; + url: string; +} + +interface SectionsProps { + /* Whether to display the "Sections" title and separator that appears on the left. */ + showHeader?: boolean; + data: SectionsData[]; +} + +export function Sections({ data, showHeader = true }: SectionsProps) { + return ( +
+ {showHeader ? ( + <> +

Sections

+
+ + ) : ( + "" + )} + +
+ ); +} diff --git a/components/Timeline.module.css b/components/Timeline.module.css new file mode 100644 index 0000000..6e46450 --- /dev/null +++ b/components/Timeline.module.css @@ -0,0 +1,75 @@ +.wrapper { + position: relative; +} + +.line { + position: absolute; + height: 100%; + border-radius: calc(10rem / 16); + background-color: var(--secondary-accent); + z-index: -1; +} + +.timelineSections { + width: 100%; + display: flex; + flex-direction: column; + justify-content: space-around; + gap: calc(20rem / 16); +} + +.timelineSection { + width: 100%; + display: flex; + flex-direction: row; + justify-content: center; +} + +.time { + margin: 0; + text-align: right; + font-size: calc(30rem / 16); + font-weight: 700; + color: var(--secondary-accent); + word-wrap: break-word; +} + +.circle { + background-color: var(--secondary-accent); + box-shadow: calc(0rem / 16) calc(0rem / 16) calc(30rem / 16) var(--secondary-accent); + display: flex; + justify-content: center; + align-items: center; +} + +.innerCircle { + background-color: var(--label); + display: none; +} + +.text { + height: fit-content; + margin: 0; + padding: calc(15rem / 16); + border-radius: calc(10rem / 16); + font-size: calc(20rem / 16); + font-weight: 700; + color: var(--label); + border: calc(2rem / 16) solid var(--card-background); + background-color: var(--card-background); + word-wrap: break-word; + box-sizing: border-box; +} + +.timelineSection:hover .time { + color: var(--secondary-accent-light); +} + +.timelineSection:hover .innerCircle { + display: inline; +} + +.timelineSection:hover .text { + border: calc(2rem / 16) solid var(--secondary-accent-light); + box-shadow: calc(0rem / 16) calc(0rem / 16) calc(20rem / 16) var(--secondary-accent); +} \ No newline at end of file diff --git a/components/Timeline.tsx b/components/Timeline.tsx new file mode 100644 index 0000000..643e835 --- /dev/null +++ b/components/Timeline.tsx @@ -0,0 +1,142 @@ +import React from "react"; + +import styles from "./Timeline.module.css"; + +interface TimelineData { + time: string; + text: string; +} + +interface TimelineProps { + data: TimelineData[]; + /** Whether the time is transformed to uppercase. */ + isTimeUppercase?: boolean; + /** Width of the middle timeline line, in pixels */ + lineWidth?: number; + /** Width of the outer circles on the timeline, in pixels. */ + outerCircleWidth?: number; + /** Width of the inner circles on the timeline, in pixels. */ + innerCircleWidth?: number; + /** Width of time label, in pixels. */ + timeWidth?: number; + /** Width of text label, in pixels. */ + textWidth?: number; + /** Distance between the time label AND the text label to middle line, in pixels. */ + gap?: number; + className?: string; +} + +export function Timeline({ + data, + isTimeUppercase = true, + lineWidth = 5, + outerCircleWidth = 30, + innerCircleWidth = 15, + timeWidth = 200, + textWidth = 300, + gap = 50, + className, +}: TimelineProps) { + const largerMiddleElement = + outerCircleWidth > lineWidth ? outerCircleWidth : lineWidth; + const width = timeWidth + gap + largerMiddleElement + gap + textWidth; + if (innerCircleWidth > outerCircleWidth) { + throw new Error( + ` - innerCircleWidth (${innerCircleWidth}) is larger than outerCircleWidth (${outerCircleWidth})` + ); + } + + return ( +
+
+
+ {data.map((datum) => ( + + ))} +
+
+ ); +} + +interface TimelineSectionProps { + datum: TimelineData; + width: number; + isTimeUppercase: boolean; + outerCircleWidth: number; + innerCircleWidth: number; + timeWidth: number; + textWidth: number; + gap: number; +} + +function TimelineSection({ + datum, + width, + isTimeUppercase, + outerCircleWidth, + innerCircleWidth, + timeWidth, + textWidth, + gap, +}: TimelineSectionProps) { + return ( +
+
+ {isTimeUppercase ? datum.time.toUpperCase() : datum.time} +
+
+
+
+
+ {datum.text} +
+
+ ); +} diff --git a/data/mocks.ts b/data/mocks.ts index b8cac8b..ae7b6a8 100644 --- a/data/mocks.ts +++ b/data/mocks.ts @@ -94,6 +94,33 @@ export const mockLineData = { ], }; +export const mockTimelineData = [ + { + time: "Fall 2020", + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", + }, + { + time: "Winter 2021", + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad", + }, + { + time: "Spring 2021", + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor i", + }, + { + time: "Fall 2021", + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proid", + }, + { + time: "Winter 2022", + text: "Lorem ipsum dolor sit amet, consectetur adipi", + }, + { + time: "Spring 2022", + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut en", + }, +]; + export const mockBoxPlotData = [ { category: "1A", diff --git a/data/routes.ts b/data/routes.ts new file mode 100644 index 0000000..ddf9393 --- /dev/null +++ b/data/routes.ts @@ -0,0 +1,46 @@ +export const sectionsData = [ + { + name: "Demographics", + url: "/", + }, + { + name: "Academics", + url: "/", + }, + { + name: "Co-op", + url: "/", + }, + { + name: "Lifestyle and Interests", + url: "/", + }, + { + name: "Intimacy and Drugs", + url: "/", + }, + { + name: "Post-grad", + url: "/", + }, + { + name: "Friends", + url: "/", + }, + { + name: "Miscellaneous", + url: "/", + }, + { + name: "Mental Health", + url: "/", + }, + { + name: "Personal", + url: "/", + }, + { + name: "Contributors", + url: "/", + }, +]; diff --git a/pages/_app.css b/pages/_app.css index 8c5d52f..af6ace7 100644 --- a/pages/_app.css +++ b/pages/_app.css @@ -24,7 +24,6 @@ body { --light--secondary-accent-light: #FEA0C8; --light--primary-heading: #D02B53; --light--primary-text: #483B35; - --light--secondary-text: var(--pink); --light--link: var(--orange); --light--link-hover: #FFBC9F; --light--card-background: #FFFFFF; @@ -69,22 +68,52 @@ body { color: var(--primary-text); font-family: "Inconsolata", monospace; margin: 0; + + /* Font styling for body */ + font-size: calc(18rem / 16); + font-weight: 500; } -h1, +/* Page titles (e.g. Demographics) */ +h1 { + font-size: calc(48rem / 16); + font-weight: 700; + color: var(--primary-accent-light); + margin-top: calc(32rem / 16); + margin-bottom: calc(16rem / 16); +} + +/* Major section headings (e.g. About the Programs) */ h2 { + font-size: calc(36rem / 16); + font-weight: 700; color: var(--primary-heading); + margin-top: calc(32rem / 16); + margin-bottom: calc(16rem / 16); } +/* Minor section headings & questions (e.g. What Program Are You In?) */ h3 { + font-size: calc(32rem / 16); + font-weight: 700; color: var(--secondary-heading); - font-size: calc(45rem / 16); + margin-top: calc(24rem / 16); + margin-bottom: calc(16rem / 16); } -h4, -h5, -h6 { +/* Titles within paragraphs (e.g. About the Programs -> Computer Science)*/ +h4 { + font-size: calc(24rem / 16); + font-weight: 700; color: var(--secondary-heading); + margin-top: calc(24rem / 16); + margin-bottom: calc(8rem / 16); +} + +p { + color: var(--primary-text); + margin-top: 1rem; + margin-bottom: 1rem; } a { @@ -96,10 +125,6 @@ a:hover { color: var(--link-hover); } -p { - font-size: calc(28rem / 16); -} - @media only screen and (prefers-color-scheme: dark) { body { --primary-background: var(--dark--primary-background); diff --git a/pages/playground.tsx b/pages/playground.tsx index bab073b..1499dc4 100644 --- a/pages/playground.tsx +++ b/pages/playground.tsx @@ -8,11 +8,16 @@ import { mockQuoteData, mockQuoteDataLong, mockPieData, + mockTimelineData, } from "data/mocks"; +import { sectionsData } from "data/routes"; import React from "react"; +import { About } from "@/components/About"; import { PieChart } from "@/components/PieChart"; import { QuotationCarousel } from "@/components/QuotationCarousel"; +import { Sections } from "@/components/Sections"; +import { Timeline } from "@/components/Timeline"; import { CenterWrapper } from "../components/CenterWrapper"; import { ColorPalette } from "../components/ColorPalette"; @@ -26,13 +31,26 @@ export default function Home() {

Playground

Show off your components here!

+ + + +

+ Text Styles +

+

h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1 h1

+

h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2 h2

+

h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3 h3

+

h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4 h4

+

p p p p p p p p p p p p p p p p p p p p p p p p p p p p

+ a a a a a a a a a a a a a a a a a a a a a a a a a a a a +

{""}

- +

{""}

@@ -48,6 +66,7 @@ export default function Home() { right: 20, }} /> +

{""}

@@ -67,6 +86,7 @@ export default function Home() { right: 20, }} /> +

{""}

@@ -76,6 +96,12 @@ export default function Home() { value: word.value, }))} /> + +

+ {""} +

+ +

{""}

@@ -124,6 +150,16 @@ export default function Home() { }} /> +

+ {""} +

+ + +

+ {""} +

+ +

{""}