-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic layout and nav implemented in App Router [#134]
_Largely_ derived from material in Pages Router pages and components, but with a number of redundant or otherwise unneeded styling elements excised for minimalism. Does not yet implement logged in state, and explicitly drops "minimized" as a nav-bar concept, at least for the moment.
- Loading branch information
Showing
21 changed files
with
5,400 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import { Metadata } from "next"; | ||
import { Lato } from "next/font/google"; | ||
import { ReactElement, ReactNode } 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 "./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: ReactNode; | ||
}): 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}> | ||
<Nav /> | ||
<main className="container"> | ||
<BigSpacer count={4} /> | ||
|
||
{children} | ||
|
||
<Line /> | ||
|
||
<Footer /> | ||
|
||
<BigSpacer /> | ||
</main> | ||
<PlausibleAnalytics /> | ||
</body> | ||
</html> | ||
); | ||
} |
Oops, something went wrong.