Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert 'contact', 'team', and 'whoami' to app router; partially convert '404' [#134] #1032

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions static-site/app/contact/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import type { Metadata } from "next";
import React from "react";

import { BigSpacer } from "../../components/spacers";
import FlexCenter from "../../components/flex-center";
import { FocusParagraphNarrow } from "../../components/focus-paragraph";

export const metadata: Metadata = {
title: "Contact",
};

export default function ContactPage(): React.ReactElement {
return (
<>
<BigSpacer count={4} />

<h1>Contact Us</h1>

<FlexCenter>
<FocusParagraphNarrow>
We are a small team, but connecting with users is important to us.
<br />
<br />
If you have a general question about Nextstrain, we encourage you to
post on our{" "}
<a
href="https://discussion.nextstrain.org"
target="_blank"
rel="noreferrer noopener"
>
discussion forum
</a>
, where both Nextstrain team members and other community members can
assist you.
<br />
<br />
To send a bug report or feature request, please open an issue in one
of our{" "}
<a href="https://github.com/orgs/nextstrain/repositories">
GitHub repositories
</a>
.
<br />
<br />
For private inquiries, you can reach us at hello
<span style={{ display: "none" }}>obfuscate</span>@nextstrain.org.
<br />
<br />
We also host office hours via Zoom every week on Thursdays at 10AM US
Pacific time. Email us for the meeting link.
</FocusParagraphNarrow>
</FlexCenter>

<BigSpacer />
</>
);
}
88 changes: 88 additions & 0 deletions static-site/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import { Metadata } from "next";
import { Lato } from "next/font/google";
import React from "react";

import { BigSpacer } from "../components/spacers";
import Footer from "../components/footer";
import Line from "../components/line";
import Nav from "../components/nav";
import PlausibleAnalytics from "../components/plausible-analytics/";
import {
blogFeedUrls,
groupsApp,
siteTitle,
siteTitleAlt,
} from "../data/BaseConfig";
import UserDataWrapper from "../components/user-data-wrapper";

import "./styles/browserCompatability.css";
import "./styles/bootstrap.css";
import "./styles/globals.css";

// Custom fonts bundled (i.e. no external requests), see
// <https://nextjs.org/docs/pages/building-your-application/optimizing/fonts>
const lato = Lato({
style: ["normal", "italic"],
subsets: ["latin"],
variable: "--lato",
weight: ["300", "400", "700"],
});

export const metadata: Metadata = {
title: {
absolute: siteTitle,
template: `%s - ${siteTitle}`,
},
description: siteTitleAlt,
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}): React.ReactElement {
return (
<html lang="en">
<head>
{!groupsApp && (
<>
<link rel="me" href="https://mstdn.science/@nextstrain" />
<link
href={`${blogFeedUrls.atom}`}
rel="alternate"
title="Atom feed for nextstrain.org/blog"
type="application/atom+xml"
/>
<link
href={`${blogFeedUrls.json}`}
rel="alternate"
title="JSON feed for nextstrain.org/blog"
type="application/json"
/>
<link
href={`${blogFeedUrls.rss2}`}
rel="alternate"
title="RSS2 feed for nextstrain.org/blog"
type="application/rss+xml"
/>
</>
)}
</head>
<body className={lato.variable}>
<UserDataWrapper>
<Nav />
<main>
{children}

<Line />

<Footer />

<BigSpacer />
</main>
<PlausibleAnalytics />
</UserDataWrapper>
</body>
</html>
);
}
19 changes: 19 additions & 0 deletions static-site/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from "react";

import Splash from "../components/splash";

import styles from "./styles/not-found.module.css";

export default function FourOhFour(): React.ReactElement {
return (
<>
<div className={styles.errorContainer}>
Oops - that page doesn’t exist! (404).
<br />
Here’s the splash page instead…
</div>

<Splash />
</>
);
}
Loading