Fix font-size, line-height, and some other smaller changes

This commit is contained in:
Adi Thakral 2021-06-27 03:33:09 +00:00
parent 48056ca82e
commit 93ede558a4
18 changed files with 162 additions and 164 deletions

View File

@ -1,7 +1,6 @@
.card { .card {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
max-width: calc(1000rem / 16);
box-sizing: border-box; box-sizing: border-box;
padding: calc(24rem / 16); padding: calc(24rem / 16);
} }
@ -35,7 +34,6 @@
.content, .content,
.content > h2 { .content > h2 {
color: var(--purple-2);
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
margin-top: 0; margin-top: 0;
@ -43,6 +41,7 @@
} }
.content > h2 { .content > h2 {
color: var(--purple-2);
font-size: 1rem; font-size: 1rem;
margin-bottom: calc(14rem / 16); margin-bottom: calc(14rem / 16);
} }

View File

@ -20,16 +20,12 @@
} }
.name { .name {
color: var(--purple-2);
font-weight: bolder;
font-size: calc(18rem / 16); font-size: calc(18rem / 16);
line-height: calc(27 / 18);
margin: 0; margin: 0;
} }
.desc { .desc {
color: var(--purple-2); margin: 1rem 0;
margin-top: calc(12rem / 16);
} }
.logo { .logo {
@ -40,8 +36,8 @@
.setting { .setting {
margin: 0; margin: 0;
color: var(--blue-2); color: var(--blue-2);
font-weight: bolder;
font-size: calc(14rem / 16); font-size: calc(14rem / 16);
font-weight: 600;
} }
.details > footer { .details > footer {
@ -64,8 +60,7 @@
.name, .name,
.setting { .setting {
font-size: calc(14rem / 16); font-size: 1rem;
line-height: calc(21 / 14);
} }
.poster { .poster {
@ -77,8 +72,7 @@
} }
.desc { .desc {
font-size: calc(12rem / 16); margin: 0;
line-height: calc(18 / 12);
} }
.logo, .logo,

View File

@ -1,4 +1,4 @@
import React, { ReactNode } from "react"; import React from "react";
import { Button } from "./Button"; import { Button } from "./Button";
import { Image } from "./Image"; import { Image } from "./Image";
import { EventSetting } from "./EventSetting"; import { EventSetting } from "./EventSetting";
@ -7,12 +7,12 @@ import { Discord, Twitch, Instagram, Facebook } from "./SocialLinks";
interface Props { interface Props {
name: string; name: string;
short: string;
online: boolean; online: boolean;
location: string; location: string;
date: Date; date: Date;
poster?: string; poster?: string;
registerLink?: string; registerLink?: string;
children: ReactNode;
} }
/** /**
@ -29,10 +29,10 @@ export function EventDescriptionCard({
location, location,
poster, poster,
name, name,
short,
date, date,
online, online,
registerLink, registerLink,
children,
}: Props) { }: Props) {
const Icon = getIcon(location); const Icon = getIcon(location);
@ -45,7 +45,7 @@ export function EventDescriptionCard({
<h2 className={styles.setting}> <h2 className={styles.setting}>
<EventSetting date={date} online={online} location={location} /> <EventSetting date={date} online={online} location={location} />
</h2> </h2>
<div className={styles.desc}>{children}</div> <p className={styles.desc}>{short}</p>
<footer> <footer>
{registerLink && ( {registerLink && (

View File

@ -18,7 +18,7 @@
} }
.text { .text {
color: white; color: var(--white);
font-style: normal; font-style: normal;
text-align: center; text-align: center;
} }

View File

@ -1,11 +1,11 @@
.miniEventCard { .card {
max-width: calc(936rem / 16);
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
color: var(--purple-2);
padding: calc(20rem / 16); padding: calc(20rem / 16);
/* FIXME: Check figma for updated size */ }
font-size: calc(14rem / 16);
.card:nth-child(odd) {
background-color: var(--teal-2-20);
} }
.name { .name {
@ -19,6 +19,7 @@
} }
.info { .info {
color: var(--purple-2);
margin-bottom: calc(12rem / 16); margin-bottom: calc(12rem / 16);
} }
@ -27,19 +28,20 @@
top: 0; top: 0;
right: 0; right: 0;
cursor: pointer; cursor: pointer;
color: var(--blue-2);
margin: calc(20rem / 16); margin: calc(20rem / 16);
color: var(--blue-2);
font-size: calc(14rem / 16);
} }
.miniEventCard[open] .shortDescription { .card[open] .shortDescription {
display: none; display: none;
} }
.miniEventCard[open] .dropDownIcon { .card[open] .dropDownIcon {
transform: rotate(180deg); transform: rotate(180deg);
} }
.miniEventCard > summary { .card > summary {
list-style: none; list-style: none;
} }

View File

@ -11,18 +11,6 @@ interface Props {
date: Date; date: Date;
} }
const dropDownIcon = (
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
height="9"
viewBox="0 0 14 9"
className={styles.dropDownIcon}
>
<path d="M6.24407 8.12713C6.64284 8.58759 7.35716 8.58759 7.75593 8.12713L13.3613 1.65465C13.9221 1.00701 13.4621 0 12.6053 0H1.39467C0.537918 0 0.0778675 1.00701 0.638743 1.65465L6.24407 8.12713Z" />
</svg>
);
export const MiniEventCard: React.FC<Props> = ({ export const MiniEventCard: React.FC<Props> = ({
name, name,
short, short,
@ -32,7 +20,7 @@ export const MiniEventCard: React.FC<Props> = ({
online, online,
}) => { }) => {
return ( return (
<details className={styles.miniEventCard}> <details className={styles.card}>
<summary> <summary>
<div onClick={(event) => event.preventDefault()}> <div onClick={(event) => event.preventDefault()}>
<h2 className={styles.name}> <h2 className={styles.name}>
@ -52,3 +40,15 @@ export const MiniEventCard: React.FC<Props> = ({
</details> </details>
); );
}; };
const dropDownIcon = (
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
height="9"
viewBox="0 0 14 9"
className={styles.dropDownIcon}
>
<path d="M6.24407 8.12713C6.64284 8.58759 7.35716 8.58759 7.75593 8.12713L13.3613 1.65465C13.9221 1.00701 13.4621 0 12.6053 0H1.39467C0.537918 0 0.0778675 1.00701 0.638743 1.65465L6.24407 8.12713Z" />
</svg>
);

View File

@ -1,27 +1,22 @@
.card { .card {
padding: calc(27rem / 16) calc(39rem / 16); padding: calc(30rem / 16) calc(40rem / 16);
max-width: calc(524rem / 16); max-width: calc(524rem / 16);
background-color: white; background-color: var(--white);
border-radius: calc(20rem / 16);
} }
.date { .date {
color: var(--purple-2);
font-size: calc(18rem / 16); font-size: calc(18rem / 16);
font-weight: bold; margin: 0;
line-height: calc(27 / 18);
} }
.author { .author {
color: var(--purple-1); color: var(--purple-1);
font-style: normal; font-style: normal;
line-height: calc(21 / 16);
font-size: calc(14rem / 16);
margin: calc(5rem / 16) 0 calc(7rem / 16) 0;
} }
.content { .content > *:first-child {
line-height: calc(21 / 16); margin-top: 0;
color: var(--purple-2);
} }
@media only screen and (max-width: calc(768rem / 16)) { @media only screen and (max-width: calc(768rem / 16)) {
@ -29,4 +24,13 @@
padding: 0; padding: 0;
background-color: transparent; background-color: transparent;
} }
.content > *:first-child {
margin-top: 1rem;
}
.content ul,
.content ol {
padding: 0 1rem;
}
} }

View File

@ -14,15 +14,15 @@ export const NewsCard: React.FC<NewsCardProps> = ({
}) => { }) => {
return ( return (
<article className={styles.card}> <article className={styles.card}>
<h3> <h1 className={styles.date}>
<time className={styles.date} dateTime={date.toISOString()}> <time dateTime={date.toISOString()}>
{date.toLocaleDateString("en-US", { {date.toLocaleDateString("en-US", {
year: "numeric", year: "numeric",
month: "long", month: "long",
day: "numeric", day: "numeric",
})} })}
</time> </time>
</h3> </h1>
<address className={styles.author}>{author}</address> <address className={styles.author}>{author}</address>
<div className={styles.content}>{children}</div> <div className={styles.content}>{children}</div>
</article> </article>

View File

@ -1,11 +1,11 @@
.wrapper { .wrapper {
display: flex; display: flex;
line-height: calc(24 / 16);
} }
.wrapper h1 { .wrapper h1 {
margin: 1rem 0;
font-size: calc(24rem / 16); font-size: calc(24rem / 16);
margin: 1rem 0 1rem 0; font-weight: 600;
color: var(--blue-2); color: var(--blue-2);
} }
@ -43,11 +43,11 @@
.selected { .selected {
background-color: var(--blue-1-05); background-color: var(--blue-1-05);
color: var(--blue-2); color: var(--blue-2);
font-weight: bold; font-weight: 700;
} }
.readAll { .readAll {
font-weight: bold; font-weight: 700;
} }
.marker { .marker {
@ -73,7 +73,6 @@
flex: 1; flex: 1;
display: flex; display: flex;
cursor: pointer; cursor: pointer;
display: flex;
color: var(--purple-2); color: var(--purple-2);
font-size: calc(12rem / 16); font-size: calc(12rem / 16);
} }
@ -84,7 +83,6 @@
.next { .next {
justify-content: flex-end; justify-content: flex-end;
justify-self: flex-end;
text-align: end; text-align: end;
margin-left: calc(8rem / 16); margin-left: calc(8rem / 16);
} }
@ -92,7 +90,7 @@
.arrowHeading { .arrowHeading {
color: var(--blue-2); color: var(--blue-2);
font-size: calc(14rem / 16); font-size: calc(14rem / 16);
font-weight: bold; font-weight: 700;
border-bottom: calc(2rem / 16) solid var(--blue-2); border-bottom: calc(2rem / 16) solid var(--blue-2);
padding-bottom: calc(4rem / 16); padding-bottom: calc(4rem / 16);
} }

View File

@ -17,12 +17,11 @@
} }
.name { .name {
font-weight: bold; font-weight: 700;
color: var(--blue-1); color: var(--blue-2);
} }
.role { .role {
font-weight: 600; font-weight: 600;
color: var(--purple-2); color: var(--purple-2);
line-height: 1.875;
} }

View File

@ -9,8 +9,6 @@
row-gap: 0; row-gap: 0;
justify-items: start; justify-items: start;
align-items: start; align-items: start;
max-width: calc(847rem / 16);
} }
.picture { .picture {
@ -31,47 +29,26 @@
grid-area: name; grid-area: name;
margin: 0; margin: 0;
color: var(--blue-1); color: var(--blue-2);
font-size: calc(36rem / 16); font-size: calc(36rem / 16);
line-height: 1.1; font-weight: 600;
font-weight: 700;
} }
.role { .role {
grid-area: role; grid-area: role;
margin: 0; margin: 0;
color: var(--purple-2);
font-size: calc(24rem / 16); font-size: calc(24rem / 16);
line-height: 1.7; line-height: calc(40 / 24);
font-weight: 600; font-weight: 600;
} }
.description { .description {
grid-area: description; grid-area: description;
margin: 0;
line-height: 1.875;
} }
@media screen and (max-width: calc(768rem / 16)) { .description > *:first-child {
.card { margin-top: 0;
grid-template-columns: calc(90rem / 16) auto;
column-gap: calc(22rem / 16);
max-width: calc(460rem / 16);
}
.picture {
max-width: calc(90rem / 16);
max-height: calc(90rem / 16);
}
.name,
.role,
.description {
line-height: 1.5;
}
} }
/* TODO: Use the correct mobile styles from figma /* TODO: Use the correct mobile styles from figma

View File

@ -1,7 +1,3 @@
.miniEventCardDemo > *:nth-child(odd) {
background: #e1eefa;
}
.newsDemo { .newsDemo {
padding: calc(50rem / 16); padding: calc(50rem / 16);
background-color: var(--off-white); background-color: var(--off-white);
@ -53,7 +49,6 @@
} }
.teamMemberDemo { .teamMemberDemo {
padding: calc(10rem / 16) calc(50rem / 16) calc(30rem / 16) calc(50rem / 16);
max-width: calc(847rem / 16); max-width: calc(847rem / 16);
} }
@ -81,17 +76,6 @@
column-gap: calc(53rem / 16); column-gap: calc(53rem / 16);
} }
@media only screen and (max-width: calc(768rem / 16)) {
.newsDemo,
.eventDescriptionCardDemo {
background-color: var(--off-white);
}
.eventDescriptionCardDemo > * {
margin: calc(50rem / 16);
}
}
.linkDemo { .linkDemo {
padding: calc(50rem / 16); padding: calc(50rem / 16);
background-color: var(--off-white); background-color: var(--off-white);
@ -102,3 +86,15 @@
color: var(--purple-2); color: var(--purple-2);
font-size: calc(24rem / 16); font-size: calc(24rem / 16);
} }
@media only screen and (max-width: calc(768rem / 16)) {
.newsDemo,
.eventDescriptionCardDemo {
padding: calc(20rem / 16);
background-color: var(--off-white);
}
.eventDescriptionCardDemo > * {
margin: 0;
}
}

View File

@ -47,7 +47,6 @@ import { TeamMember } from "./TeamMember";
import { TeamMemberCard } from "./TeamMemberCard"; import { TeamMemberCard } from "./TeamMemberCard";
import { OrganizedContent, LinkProps } from "./OrganizedContent"; import { OrganizedContent, LinkProps } from "./OrganizedContent";
import { Button } from "./Button"; import { Button } from "./Button";
import { Footer } from "./Footer";
const events = [ const events = [
{ Content: OOTBReact, metadata: OOTBReactEventMetadata }, { Content: OOTBReact, metadata: OOTBReactEventMetadata },
@ -130,9 +129,7 @@ export function EventDescriptionCardDemo() {
<EventDescriptionCard <EventDescriptionCard
{...metadata} {...metadata}
key={metadata.name + metadata.date.toString()} key={metadata.name + metadata.date.toString()}
> />
{metadata.short}
</EventDescriptionCard>
))} ))}
</div> </div>
); );

View File

@ -1,13 +1,10 @@
body { body {
font-family: "Poppins", "sans-serif";
font-size: 1rem;
margin: 0;
/* Default is light theme */ /* Default is light theme */
--white: #ffffff; --white: #ffffff;
--off-white: #fdf8f5; --off-white: #fdf8f5;
--teal-1: #76ffdc; --teal-1: #76ffdc;
--teal-2: #4ed4b2; --teal-2: #4ed4b2;
--teal-2-20: #4ed4b234;
--blue-1: #5caff9; --blue-1: #5caff9;
--blue-1-05: #5caff90d; --blue-1-05: #5caff90d;
--blue-1-20: #5caff934; --blue-1-20: #5caff934;
@ -15,11 +12,20 @@ body {
--blue-2-25: #1482e340; --blue-2-25: #1482e340;
--purple-1: #525284; --purple-1: #525284;
--purple-2: #2a2a62; --purple-2: #2a2a62;
--black: #000000;
--gradient-blue-green: linear-gradient( --gradient-blue-green: linear-gradient(
99.94deg, 99.94deg,
#1481e3 -17.95%, #1481e3 -17.95%,
#4ed4b2 172.82% #4ed4b2 172.82%
); );
color: var(--black);
font-family: "Poppins", "sans-serif";
font-size: 1rem;
font-weight: 400;
line-height: calc(30 / 16);
margin: 0;
} }
/* FIXME: Dark theme is the same as light theme right now */ /* FIXME: Dark theme is the same as light theme right now */
@ -41,8 +47,33 @@ body {
); );
} }
@media only screen and (max-width: calc(425rem / 16)) { h1,
body { h2,
font-size: calc(14rem / 16); h3,
} h4,
h5,
h6 {
font-style: normal;
line-height: 1.5;
color: var(--purple-2);
}
h1 {
font-size: calc(48rem / 16);
font-weight: 700;
}
h2 {
font-size: calc(36rem / 16);
font-weight: 700;
}
h3 {
font-size: calc(24rem / 16);
font-weight: 600;
}
h4 {
font-size: calc(18rem / 16);
font-weight: 600;
} }

View File

@ -10,3 +10,10 @@
.contentContainer { .contentContainer {
flex-grow: 1; flex-grow: 1;
} }
.defaultLayout {
margin: 0 auto;
max-width: calc(800rem / 16);
padding: 0 calc(20rem / 16);
padding-bottom: calc(20rem / 16);
}

View File

@ -1,5 +1,6 @@
import React from "react"; import React, { ComponentType, ReactNode } from "react";
import { AppProps } from "next/app"; import { NextComponentType, NextPageContext } from "next";
import { AppProps as DefaultAppProps } from "next/app";
import { MDXProvider } from "@mdx-js/react"; import { MDXProvider } from "@mdx-js/react";
import { ThemeProvider } from "../components/theme"; import { ThemeProvider } from "../components/theme";
import { Navbar } from "../components/Navbar"; import { Navbar } from "../components/Navbar";
@ -11,6 +12,8 @@ import "./_app.css";
import "./font.css"; import "./font.css";
export default function App({ Component, pageProps }: AppProps): JSX.Element { export default function App({ Component, pageProps }: AppProps): JSX.Element {
const Layout = Component.Layout ?? DefaultLayout;
return ( return (
<ThemeProvider theme="light"> <ThemeProvider theme="light">
<MDXProvider components={{ a: Link }}> <MDXProvider components={{ a: Link }}>
@ -18,7 +21,9 @@ export default function App({ Component, pageProps }: AppProps): JSX.Element {
<Navbar /> <Navbar />
{/* Wrapping content with a div to allow for a display: block parent */} {/* Wrapping content with a div to allow for a display: block parent */}
<div className={styles.contentContainer}> <div className={styles.contentContainer}>
<Component {...pageProps} /> <Layout>
<Component {...pageProps} />
</Layout>
</div> </div>
<Footer /> <Footer />
</div> </div>
@ -26,3 +31,19 @@ export default function App({ Component, pageProps }: AppProps): JSX.Element {
</ThemeProvider> </ThemeProvider>
); );
} }
function DefaultLayout(props: { children: React.ReactNode }) {
return <div className={styles.defaultLayout}>{props.children}</div>;
}
type PageComponent = NextComponentType<
NextPageContext,
unknown,
Record<string, unknown>
> & {
Layout?: ComponentType<{ children: ReactNode }>;
};
type AppProps = DefaultAppProps & {
Component: PageComponent;
};

View File

@ -1,9 +1,3 @@
.container {
margin: 0 auto;
max-width: calc(806rem / 16);
padding: 0 calc(60rem / 16);
}
.headerContainer { .headerContainer {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -19,23 +13,14 @@
text-align: center; text-align: center;
} }
.title { .content h2 {
font-weight: 600; font-weight: 600;
font-size: calc(24rem / 16); font-size: calc(24rem / 16);
line-height: calc(36 / 24);
color: var(--blue-2); color: var(--blue-2);
margin-top: calc(35rem / 16); margin-top: calc(35rem / 16);
} }
.text {
line-height: calc(24 / 16);
}
@media only screen and (max-width: calc(768rem / 16)) { @media only screen and (max-width: calc(768rem / 16)) {
.container {
padding: 0 calc(45rem / 16);
}
.headerContainer { .headerContainer {
flex-direction: column-reverse; flex-direction: column-reverse;
align-items: center; align-items: center;
@ -50,7 +35,8 @@
width: calc(100rem / 16); width: calc(100rem / 16);
} }
.list { .content ol,
padding: 0 calc(18rem / 16); .content ul {
padding: 0 1rem;
} }
} }

View File

@ -1,34 +1,21 @@
import { MDXProvider } from "@mdx-js/react"; import React from "react";
import React, { HTMLAttributes } from "react";
import { Image } from "../../components/Image"; import { Image } from "../../components/Image";
import Content from "../../content/our-supporters.mdx"; import Content from "../../content/our-supporters.mdx";
import styles from "./our-supporters.module.css"; import styles from "./our-supporters.module.css";
export default function OurSupporters() { export default function OurSupporters() {
return ( return (
<MDXProvider components={{ h2: H2, p: Text, ul: UL }}> <>
<div className={styles.container}> <div className={styles.headerContainer}>
<div className={styles.headerContainer}> <h1 className={styles.header}>Our Supporters</h1>
<h1 className={styles.header}>Our Supporters</h1> <Image
<Image src="our-supporters/supporters-codey.svg"
src="our-supporters/supporters-codey.svg" className={styles.codey}
className={styles.codey} />
/> </div>
</div> <div className={styles.content}>
<Content /> <Content />
</div> </div>
</MDXProvider> </>
); );
} }
function H2(props: HTMLAttributes<HTMLHeadingElement>) {
return <h2 {...props} className={styles.title} />;
}
function Text(props: HTMLAttributes<HTMLParagraphElement>) {
return <p {...props} className={styles.text} />;
}
function UL(props: HTMLAttributes<HTMLUListElement>) {
return <ul {...props} className={styles.list} />;
}