nextstrain.org icon indicating copy to clipboard operation
nextstrain.org copied to clipboard

Convert 'contact' to app router [#134]

Open genehack opened this issue 1 year ago • 0 comments

Description of proposed changes

This converts the global/shared layout and navigation bits, and the /contact page, over to using the App Router.

This also required converting all styled-components usage in those parts over to either regular CSS/SASS, or to CSS Modules, depending on the scope of the usage. In general, I have tried to keep things scoped either very tightly (i.e., in specific CSS Modules imported into a single component) or put them in a global CSS file that is imported in the root layout.

I have also elected to migrate components to /static-site/components as they are converted over for use with App Router; that felt like the cleanest option. I also elected to put page content directly into the app/*/pages.tsx files, rather than propagating the "page content is actually under static-site/src/pages/*.jsx" pattern, reasoning that this reduces the number of moving parts and makes it more clear where the content is relative to the the URL it is displayed at.

To be explict: when this conversion work is done, I expect the contents of /static-site to be:

README.md
app/
components/
content/        ; maybe unify 
data/           ; these two?
next-env.d.ts
next.config.mjs
public/
static/         ; maybe unify with data?
tsconfig.json
types.d.ts
vendored/

Related issue(s)

#134

Checklist

genehack avatar Sep 27 '24 19:09 genehack