Skip to content

Commit 2257a42

Browse files
committed
Add new components Article, News, Standard, Start, and BlankSection.
1 parent 96fdb82 commit 2257a42

File tree

23 files changed

+503
-296
lines changed

23 files changed

+503
-296
lines changed

pnpm-lock.yaml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
import type { NextConfig } from "next";
1+
import type { NextConfig } from 'next';
22

33
const nextConfig: NextConfig = {
4-
/* config options here */
4+
images: {
5+
domains: ['app-opinjssdk1sob7t001.cms.optimizely.com'],
6+
remotePatterns: [
7+
{
8+
protocol: 'https',
9+
hostname: '*.cms.optimizely.com',
10+
port: '',
11+
pathname: '/**',
12+
},
13+
],
14+
},
515
};
616

717
export default nextConfig;

templates/alloy-template/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@
88
"start": "next start"
99
},
1010
"dependencies": {
11+
"@optimizely/cms-sdk": "workspace:*",
12+
"clsx": "^2.1.1",
13+
"next": "15.5.4",
1114
"react": "19.1.0",
1215
"react-dom": "19.1.0",
13-
"next": "15.5.4",
14-
"@optimizely/cms-sdk": "workspace:*"
16+
"tailwind-merge": "^3.3.1"
1517
},
1618
"devDependencies": {
1719
"@optimizely/cms-cli": "workspace:*",
18-
"typescript": "^5",
20+
"@tailwindcss/postcss": "^4",
1921
"@types/node": "^20",
2022
"@types/react": "^19",
2123
"@types/react-dom": "^19",
22-
"@tailwindcss/postcss": "^4",
23-
"tailwindcss": "^4"
24+
"tailwindcss": "^4",
25+
"typescript": "^5"
2426
}
2527
}

templates/alloy-template/src/app/globals.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "tailwindcss";
1+
@import 'tailwindcss';
22

33
:root {
44
--background: #ffffff;
@@ -12,12 +12,12 @@
1212
--font-mono: var(--font-geist-mono);
1313
}
1414

15-
@media (prefers-color-scheme: dark) {
15+
/* @media (prefers-color-scheme: dark) {
1616
:root {
1717
--background: #0a0a0a;
1818
--foreground: #ededed;
1919
}
20-
}
20+
} */
2121

2222
body {
2323
background: var(--background);

templates/alloy-template/src/app/layout.tsx

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ import { initReactComponentRegistry } from '@optimizely/cms-sdk/react/server';
99
import './globals.css';
1010
import Header from '@/components/base/Header';
1111
import Footer from '@/components/base/Footer';
12-
import Jumbotron, { JumbotronContentType } from '@/components/Jumbotron';
13-
import Teaser, { TeaserContentType } from '@/components/Teaser';
14-
import Editorial, { EditorialContentType } from '@/components/Editorial';
15-
import Contact, { ContactContentType } from '@/components/Contact';
16-
import StartPage, { StartPageContentType } from '@/components/StartPage';
12+
import Teaser, { TeaserContentType } from '@/components/base/Teaser';
13+
import Editorial, { EditorialContentType } from '@/components/base/Editorial';
14+
import Contact, { ContactContentType } from '@/components/base/Contact';
15+
import StartPage, { StartPageContentType } from '@/components/Start';
1716
import Product, { ProductContentType } from '@/components/Product';
18-
import StandardPage from '@/components/StandardPage';
17+
import StandardPage, { StandardContentType } from '@/components/Standard';
18+
import Notice, { NoticeContentType } from '@/components/base/Notice';
19+
import News, { NewsContentType } from '@/components/News';
20+
import Article, { ArticleContentType } from '@/components/base/Article';
21+
import BlankSection from '@/components/base/BlankSection';
1922

2023
const geistSans = Geist({
2124
variable: '--font-geist-sans',
@@ -33,24 +36,30 @@ export const metadata: Metadata = {
3336
};
3437

3538
initContentTypeRegistry([
39+
ArticleContentType,
3640
BlankExperienceContentType,
37-
StartPageContentType,
38-
JumbotronContentType,
39-
TeaserContentType,
40-
EditorialContentType,
4141
ContactContentType,
42+
EditorialContentType,
43+
NewsContentType,
44+
NoticeContentType,
4245
ProductContentType,
46+
StartPageContentType,
47+
TeaserContentType,
48+
StandardContentType,
4349
]);
4450

4551
initReactComponentRegistry({
4652
resolver: {
47-
StartPage,
48-
Jumbotron,
49-
Teaser,
50-
Editorial,
53+
Article,
5154
Contact,
55+
Editorial,
56+
News,
57+
Notice,
5258
Product,
5359
StandardPage,
60+
StartPage,
61+
Teaser,
62+
BlankSection,
5463
},
5564
});
5665

@@ -65,7 +74,7 @@ export default function RootLayout({
6574
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
6675
>
6776
<Header />
68-
{children}
77+
<div className="container mx-auto p-10">{children}</div>
6978
<Footer />
7079
</body>
7180
</html>

templates/alloy-template/src/app/preview/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async function Page({ searchParams }: Props) {
1919
)
2020
.catch((err) => {
2121
console.log(err.errors);
22-
console.log(err.request.query);
22+
console.log(err.request?.query);
2323
throw err;
2424
});
2525

templates/alloy-template/src/components/Article.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

templates/alloy-template/src/components/Contact.tsx

Lines changed: 0 additions & 41 deletions
This file was deleted.

templates/alloy-template/src/components/Jumbotron.tsx

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)