Skip to content

Commit 6ae5498

Browse files
authored
Merge pull request #272 from OpenElements/nextjs-readme
Nextjs readme
2 parents 8a50803 + 61a43da commit 6ae5498

5 files changed

Lines changed: 32 additions & 15 deletions

File tree

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Open Elements Website
22

3-
This repository contains the Open Elements website.
3+
This repository contains the Open Elements website built with Next.js and Tailwind CSS, with legacy Hugo content kept for migration and historical content.
44

55
## Architecture (2026)
66

7-
The project is now a Next.js application with App Router, Tailwind CSS, and `next-intl` for i18n. Legacy Hugo content and templates are still kept in the repo for migration and historical content.
7+
The project is a Next.js application using App Router, Tailwind CSS, and `next-intl` for i18n. Legacy Hugo content and templates are kept in the repo for migration and historical content.
88

99
### Runtime layers
1010

@@ -58,8 +58,36 @@ pnpm run build
5858
pnpm run start
5959
```
6060

61+
### Lint
62+
63+
```
64+
pnpm run lint
65+
```
66+
6167
### E2E tests
6268

6369
```
6470
pnpm run test:e2e
6571
```
72+
73+
## Repo structure
74+
75+
```
76+
src/app Next.js App Router pages & layouts
77+
src/components UI components
78+
src/i18n next-intl routing/messages helpers
79+
locales Translation JSON files
80+
content Legacy Hugo Markdown content
81+
src/layouts Legacy Hugo templates
82+
public Static assets and generated artifacts
83+
react-src Web components source (bundled to public/js)
84+
tests/e2e Playwright specs
85+
```
86+
87+
## Web components build
88+
89+
Custom elements in `react-src` are bundled with esbuild via `react-src/build.mjs` into `public/js`. This output is treated as generated code.
90+
91+
## Deployment
92+
93+
Netlify builds run `pnpm install` and `pnpm run build` (see `netlify.toml`).

src/app/[locale]/about/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export default function AboutPage() {
3535

3636
return (
3737
<div className="">
38-
{/* Hero Background */}
3938
<div className="absolute left-0 w-full top-0 h-34 -z-10 overflow-hidden">
4039
<Image
4140
src="/illustrations/hero-bg-2.svg"
@@ -47,7 +46,6 @@ export default function AboutPage() {
4746
</div>
4847

4948
<div className="flow-root relative pb-20 sm:pb-36 container">
50-
{/* Decorative images */}
5149
<Image
5250
className="top-20 right-0 absolute size-40 shrink-0"
5351
src="/illustrations/circles-2.svg"

src/app/[locale]/contact/page.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export default function ContactPage() {
1111
return (
1212
<div className="relative">
1313
<div className="container relative max-w-sm lg:max-w-7xl md:max-w-2xl sm:max-w-xl sm:w-full xl:pb-36 pb-28">
14-
{/* Decorative lines */}
1514
<Image
1615
className="absolute hidden w-full -ml-20 top-52 2xl:-ml-32 lg:block"
1716
src="/illustrations/lines-5.svg"
@@ -26,8 +25,7 @@ export default function ContactPage() {
2625
width={800}
2726
height={100}
2827
/>
29-
30-
{/* Header */}
28+
3129
<div className="flex items-center justify-center pt-16 pb-4 lg:pt-36 md:pt-28 sm:pt-24 sm:pb-12">
3230
<h1 className="flex items-center justify-center w-full text-center h1">
3331
<div className="relative z-0 flex items-center justify-center w-full">
@@ -42,13 +40,11 @@ export default function ContactPage() {
4240
</div>
4341
</h1>
4442
</div>
45-
46-
{/* Content */}
43+
4744
<div className="relative flex flex-col gap-24 2xl:gap-40 lg:gap-32">
4845
<CalendlyButton />
4946

5047
<div className="relative flex flex-col-reverse items-center justify-center w-full gap-16 lg:flex-row xl:gap-12 lg:gap-6">
51-
{/* Decorative rounds */}
5248
<Image
5349
className="absolute lg:w-[450px] w-80 lg:-left-44 -left-24 lg:top-12 top-[500px] sm:block hidden"
5450
src="/illustrations/round-1.svg"

src/app/[locale]/layout.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,10 @@ export default async function LocaleLayout({
6565
}) {
6666
const { locale } = await params;
6767

68-
// Ensure that the incoming `locale` is valid
6968
if (!routing.locales.includes(locale as any)) {
7069
notFound();
7170
}
7271

73-
// Providing all messages to the client
74-
// side is the easiest way to get started
7572
const messages = await getMessages();
7673

7774
return (

src/app/layout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export const metadata: Metadata = {
2323
},
2424
}
2525

26-
// Root layout delegates to [locale]/layout.tsx for i18n support
27-
// The locale layout provides html/body with proper lang attributes
2826
export default function RootLayout({
2927
children,
3028
}: {

0 commit comments

Comments
 (0)