forked from www/www-new
Add title to all pages (#222)
Closes #221 Go to https://csclub.uwaterloo.ca/~a3thakra/csc/adi-page-titles and make sure that all pages have a title (you can hover over the tab) Reviewed-on: www/www-new#222 Reviewed-by: j285he <j285he@localhost> Co-authored-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca> Co-committed-by: Aditya Thakral <a3thakra@csclub.uwaterloo.ca>fix-md-font
parent
298e3c6efb
commit
30102822da
@ -0,0 +1,19 @@ |
||||
import Head from "next/head"; |
||||
import React from "react"; |
||||
|
||||
interface Props { |
||||
children: string | string[]; |
||||
} |
||||
|
||||
export function Title(props: Props) { |
||||
const children = |
||||
typeof props.children === "string" ? [props.children] : props.children; |
||||
|
||||
children.push("CSC", "University of Waterloo"); |
||||
|
||||
return ( |
||||
<Head> |
||||
<title>{children.join(" - ")}</title> |
||||
</Head> |
||||
); |
||||
} |
@ -1,9 +1,12 @@ |
||||
import path from "path"; |
||||
|
||||
import { createReadAllPage } from "@/components/OrganizedContent/ReadAll"; |
||||
import { |
||||
createReadAllPage, |
||||
Options, |
||||
} from "@/components/OrganizedContent/ReadAll"; |
||||
import { createReadAllGetStaticProps } from "@/components/OrganizedContent/static"; |
||||
|
||||
export const options = { |
||||
export const options: Options = { |
||||
title: "Code of Conduct", |
||||
image: "images/code-of-conduct.svg", |
||||
pagePath: path.join("about", "code-of-conduct"), |
@ -1,12 +1,16 @@ |
||||
import path from "path"; |
||||
|
||||
import { createReadAllPage } from "@/components/OrganizedContent/ReadAll"; |
||||
import { |
||||
createReadAllPage, |
||||
Options, |
||||
} from "@/components/OrganizedContent/ReadAll"; |
||||
import { createReadAllGetStaticProps } from "@/components/OrganizedContent/static"; |
||||
|
||||
export const options = { |
||||
export const options: Options = { |
||||
title: "Constitution", |
||||
image: "images/constitution.svg", |
||||
pagePath: path.join("about", "constitution"), |
||||
numberedSections: true, |
||||
}; |
||||
|
||||
export default createReadAllPage(options); |
@ -1,13 +1,18 @@ |
||||
import React from "react"; |
||||
|
||||
import { Title } from "@/components/Title"; |
||||
|
||||
import Content from "../../../content/advice/academic-advice.mdx"; |
||||
|
||||
import { Advice } from "./coop"; |
||||
|
||||
export default function AcademicAdvice() { |
||||
return ( |
||||
<Advice> |
||||
<Content /> |
||||
</Advice> |
||||
<> |
||||
<Title>Academic Advice</Title> |
||||
<Advice> |
||||
<Content /> |
||||
</Advice> |
||||
</> |
||||
); |
||||
} |
||||
|
@ -1,13 +1,18 @@ |
||||
import React from "react"; |
||||
|
||||
import { Title } from "@/components/Title"; |
||||
|
||||
import Content from "../../../content/advice/misc-advice.mdx"; |
||||
|
||||
import { Advice } from "./coop"; |
||||
|
||||
export default function MiscAdvice() { |
||||
return ( |
||||
<Advice> |
||||
<Content /> |
||||
</Advice> |
||||
<> |
||||
<Title>Additional Advice</Title> |
||||
<Advice> |
||||
<Content /> |
||||
</Advice> |
||||
</> |
||||
); |
||||
} |
||||
|
Loading…
Reference in new issue