@digitalygo/create-diggocms-app 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +94 -23
  2. package/bin/cli.js +58 -94
  3. package/package.json +5 -2
  4. package/templates/full/README.md +66 -25
  5. package/templates/full/components/ExtendedCard.tsx +17 -5
  6. package/templates/full/components/ExtendedGallery.tsx +43 -0
  7. package/templates/full/components/ExtendedText.tsx +16 -0
  8. package/templates/full/components/ExtendedVideo.tsx +27 -0
  9. package/templates/full/components/server-components.ts +3 -3
  10. package/templates/full/lib/diggo-config.ts +9 -6
  11. package/templates/full/package.json +3 -0
  12. package/templates/full/pages/[...slug].tsx +82 -0
  13. package/templates/full/pages/_app.tsx +11 -0
  14. package/templates/full/pages/index.tsx +14 -0
  15. package/templates/full/postcss.config.js +6 -0
  16. package/templates/full/styles/globals.css +81 -0
  17. package/templates/full/tailwind.config.ts +14 -0
  18. package/templates/full/tsconfig.json +2 -1
  19. package/templates/minimal/README.md +39 -9
  20. package/templates/minimal/lib/data-fetching.ts +0 -2
  21. package/templates/minimal/lib/diggo-config.ts +0 -3
  22. package/templates/minimal/package.json +3 -0
  23. package/templates/minimal/pages/[...slug].tsx +73 -0
  24. package/templates/minimal/pages/_app.tsx +11 -0
  25. package/templates/minimal/pages/index.tsx +14 -0
  26. package/templates/minimal/postcss.config.js +6 -0
  27. package/templates/minimal/{app → styles}/globals.css +4 -0
  28. package/templates/minimal/tailwind.config.ts +14 -0
  29. package/templates/minimal/tsconfig.json +2 -1
  30. package/templates/with-mock/README.md +64 -36
  31. package/templates/with-mock/components/ExtendedCard.tsx +17 -5
  32. package/templates/with-mock/components/ExtendedGallery.tsx +43 -0
  33. package/templates/with-mock/components/ExtendedText.tsx +16 -0
  34. package/templates/with-mock/components/ExtendedVideo.tsx +27 -0
  35. package/templates/with-mock/components/server-components.ts +3 -3
  36. package/templates/with-mock/fixtures/collection.json +59 -18
  37. package/templates/with-mock/fixtures/pages/chi-siamo.json +9 -8
  38. package/templates/with-mock/fixtures/pages/contatti.json +10 -7
  39. package/templates/with-mock/fixtures/pages/home.json +71 -22
  40. package/templates/with-mock/lib/data-fetching.ts +1 -1
  41. package/templates/with-mock/lib/diggo-config.ts +9 -6
  42. package/templates/with-mock/package.json +7 -2
  43. package/templates/with-mock/pages/[...slug].tsx +103 -0
  44. package/templates/with-mock/pages/_app.tsx +11 -0
  45. package/templates/with-mock/pages/index.tsx +14 -0
  46. package/templates/with-mock/postcss.config.js +6 -0
  47. package/templates/with-mock/scripts/mock-server.ts +0 -6
  48. package/templates/with-mock/styles/globals.css +86 -0
  49. package/templates/with-mock/tailwind.config.ts +14 -0
  50. package/templates/with-mock/tsconfig.json +2 -1
  51. package/templates/full/app/[...slug]/page.tsx +0 -115
  52. package/templates/full/app/globals.css +0 -187
  53. package/templates/full/app/layout.tsx +0 -25
  54. package/templates/full/app/page.tsx +0 -6
  55. package/templates/full/components/ExtendedRichtext.tsx +0 -15
  56. package/templates/full/components/ExtendedSubtitle.tsx +0 -10
  57. package/templates/minimal/app/[...slug]/page.tsx +0 -56
  58. package/templates/minimal/app/layout.tsx +0 -22
  59. package/templates/minimal/app/page.tsx +0 -6
  60. package/templates/with-mock/app/[...slug]/page.tsx +0 -115
  61. package/templates/with-mock/app/globals.css +0 -187
  62. package/templates/with-mock/app/layout.tsx +0 -25
  63. package/templates/with-mock/app/page.tsx +0 -6
  64. package/templates/with-mock/components/ExtendedRichtext.tsx +0 -15
  65. package/templates/with-mock/components/ExtendedSubtitle.tsx +0 -10
@@ -1,20 +1,23 @@
1
1
  import type { ComponentRegistry, NavigationRegistry, DiggoConfig } from '@digitalygo/diggocms-sdk-core';
2
2
  import {
3
3
  ExtendedTitle,
4
- ExtendedSubtitle,
5
4
  ExtendedImage,
6
- ExtendedRichtext,
5
+ ExtendedText,
6
+ ExtendedVideo,
7
+ ExtendedGallery,
7
8
  ExtendedCard,
8
9
  ExtendedMenuItem,
9
10
  ExtendedMenuContainer,
10
11
  } from '@/components/server-components';
11
12
 
12
- export const componentsRegistry: ComponentRegistry = {
13
- subtitle: ExtendedSubtitle,
13
+ export const componentsRegistry = {
14
+ title: ExtendedTitle,
14
15
  image: ExtendedImage,
15
- richtext: ExtendedRichtext,
16
+ text: ExtendedText,
17
+ video: ExtendedVideo,
18
+ gallery: ExtendedGallery,
16
19
  card: ExtendedCard,
17
- };
20
+ } as ComponentRegistry;
18
21
 
19
22
  export const navigationRegistry: NavigationRegistry = {
20
23
  MenuItem: ExtendedMenuItem,
@@ -9,8 +9,8 @@
9
9
  "start": "next start",
10
10
  "lint": "next lint",
11
11
  "typecheck": "tsc --noEmit",
12
- "mock:api": "bun run scripts/mock-server.ts",
13
- "dev:mock": "bun run mock:api & next dev"
12
+ "mock:api": "tsx scripts/mock-server.ts",
13
+ "dev:mock": "concurrently \"pm run mock:api\" \"pm run dev\""
14
14
  },
15
15
  "dependencies": {
16
16
  "@digitalygo/diggocms-sdk-core": "^0.1.0",
@@ -22,6 +22,11 @@
22
22
  "@types/node": "^20.0.0",
23
23
  "@types/react": "^18.3.0",
24
24
  "@types/react-dom": "^18.3.0",
25
+ "autoprefixer": "^10.4.19",
26
+ "concurrently": "^9.0.0",
27
+ "postcss": "^8.4.38",
28
+ "tailwindcss": "^3.4.4",
29
+ "tsx": "^4.0.0",
25
30
  "typescript": "^5.5.0"
26
31
  }
27
32
  }
@@ -0,0 +1,103 @@
1
+ import type { GetStaticPaths, GetStaticProps } from 'next';
2
+ import type { PagePayload } from '@digitalygo/diggocms-sdk-core';
3
+ import { useRouter } from 'next/router';
4
+ import Head from 'next/head';
5
+ import { renderPage } from '@digitalygo/diggocms-sdk-core/server';
6
+ import { componentsRegistry, isMockMode } from '@/lib/diggo-config';
7
+ import { fetchPageData, FetchPageResult, loadPagesIndex } from '@/lib/data-fetching';
8
+
9
+ interface CatchAllPageProps {
10
+ page: PagePayload | null;
11
+ error: string | null;
12
+ usingMock: boolean;
13
+ }
14
+
15
+ export default function CatchAllPage({ page, error, usingMock }: CatchAllPageProps) {
16
+ const router = useRouter();
17
+
18
+ if (router.isFallback) {
19
+ return (
20
+ <div className="min-h-screen flex items-center justify-center">
21
+ <div className="text-lg text-gray-600">Loading...</div>
22
+ </div>
23
+ );
24
+ }
25
+
26
+ if (!page) {
27
+ return (
28
+ <main className="max-w-5xl mx-auto p-8">
29
+ <h1 className="text-3xl font-bold text-gray-900 mb-4">Page Not Found</h1>
30
+ {error && (
31
+ <div className="bg-red-50 border border-red-200 text-red-800 p-4 rounded">
32
+ {error}
33
+ </div>
34
+ )}
35
+ </main>
36
+ );
37
+ }
38
+
39
+ return (
40
+ <>
41
+ <Head>
42
+ <title>{page.title || 'My DiggoCMS App'}</title>
43
+ <meta name="description" content={page.title || 'DiggoCMS powered page'} />
44
+ </Head>
45
+ {usingMock && (
46
+ <div className="mock-indicator">
47
+ Mock Mode
48
+ </div>
49
+ )}
50
+ <main className="max-w-5xl mx-auto p-8">
51
+ {error && (
52
+ <div className="bg-yellow-50 border border-yellow-200 text-yellow-800 p-4 mb-6 rounded">
53
+ <strong className="font-semibold">Warning:</strong> {error}
54
+ </div>
55
+ )}
56
+ {renderPage(page, componentsRegistry)}
57
+ </main>
58
+ </>
59
+ );
60
+ }
61
+
62
+ export const getStaticPaths: GetStaticPaths = async () => {
63
+ if (isMockMode()) {
64
+ try {
65
+ const pages = await loadPagesIndex();
66
+ return {
67
+ paths: pages.map((page) => ({
68
+ params: {
69
+ slug: page.slug === '' ? ['home'] : page.slug.split('/')
70
+ },
71
+ })),
72
+ fallback: 'blocking',
73
+ };
74
+ } catch {}
75
+ }
76
+
77
+ return {
78
+ paths: [],
79
+ fallback: 'blocking',
80
+ };
81
+ };
82
+
83
+ export const getStaticProps: GetStaticProps<CatchAllPageProps> = async ({ params }) => {
84
+ const slugArray = params?.slug as string[] | undefined;
85
+ const slug = Array.isArray(slugArray) ? slugArray.join('/') : 'home';
86
+
87
+ const { page, error, usingMock }: FetchPageResult = await fetchPageData(slug);
88
+
89
+ if (!page) {
90
+ return {
91
+ notFound: true,
92
+ };
93
+ }
94
+
95
+ return {
96
+ props: {
97
+ page,
98
+ error,
99
+ usingMock,
100
+ },
101
+ revalidate: isMockMode() ? false : 60,
102
+ };
103
+ };
@@ -0,0 +1,11 @@
1
+ import type { AppProps } from 'next/app';
2
+ import { DiggoProvider } from '@/components/DiggoProvider';
3
+ import '@/styles/globals.css';
4
+
5
+ export default function App({ Component, pageProps }: AppProps) {
6
+ return (
7
+ <DiggoProvider>
8
+ <Component {...pageProps} />
9
+ </DiggoProvider>
10
+ );
11
+ }
@@ -0,0 +1,14 @@
1
+ import type { GetStaticProps } from 'next';
2
+
3
+ export default function HomePage() {
4
+ return null;
5
+ }
6
+
7
+ export const getStaticProps: GetStaticProps = async () => {
8
+ return {
9
+ redirect: {
10
+ destination: '/home',
11
+ permanent: false,
12
+ },
13
+ };
14
+ };
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ };
@@ -1,9 +1,3 @@
1
- #!/usr/bin/env bun
2
- /**
3
- * Standalone mock API server for DiggoCMS SDK.
4
- * Serves fixtures as REST API endpoints for local development.
5
- */
6
-
7
1
  import { createServer, type IncomingMessage, type ServerResponse } from 'http';
8
2
  import { readFile } from 'fs/promises';
9
3
  import { join } from 'path';
@@ -0,0 +1,86 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ * {
6
+ margin: 0;
7
+ padding: 0;
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ body {
12
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
13
+ line-height: 1.6;
14
+ color: #333;
15
+ }
16
+
17
+ /* DiggoCMS Component Styles */
18
+ .diggo-title {
19
+ @apply text-3xl font-bold mb-4 text-gray-900;
20
+ }
21
+
22
+ .diggo-text {
23
+ @apply mb-4 text-gray-700 leading-relaxed;
24
+ }
25
+
26
+ .diggo-image {
27
+ @apply max-w-full h-auto rounded-lg shadow-md mb-6;
28
+ }
29
+
30
+ .diggo-video-block {
31
+ @apply mb-6;
32
+ }
33
+
34
+ .diggo-video {
35
+ @apply w-full rounded-lg shadow-md;
36
+ }
37
+
38
+ .diggo-media-caption {
39
+ @apply text-sm text-gray-600 mt-2 text-center;
40
+ }
41
+
42
+ .diggo-gallery {
43
+ @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6;
44
+ }
45
+
46
+ .diggo-gallery-image {
47
+ @apply w-full h-48 object-cover rounded-lg shadow-md;
48
+ }
49
+
50
+ .diggo-gallery-video {
51
+ @apply w-full h-48 rounded-lg shadow-md;
52
+ }
53
+
54
+ .diggo-card {
55
+ @apply border border-gray-200 rounded-lg p-6 shadow-sm mb-6 bg-white;
56
+ }
57
+
58
+ .diggo-card-link {
59
+ @apply inline-block mt-4 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors;
60
+ }
61
+
62
+ /* Navigation Styles */
63
+ .menu {
64
+ @apply bg-gray-100 py-4 mb-8;
65
+ }
66
+
67
+ .menu-list {
68
+ @apply flex flex-wrap gap-6 max-w-5xl mx-auto px-8 list-none;
69
+ }
70
+
71
+ .menu-item {
72
+ @apply relative;
73
+ }
74
+
75
+ .menu-link {
76
+ @apply text-gray-700 hover:text-blue-600 font-medium transition-colors;
77
+ }
78
+
79
+ .menu-link[aria-current="page"] {
80
+ @apply text-blue-600 font-semibold;
81
+ }
82
+
83
+ /* Mock Mode Indicator */
84
+ .mock-indicator {
85
+ @apply fixed bottom-4 right-4 bg-blue-600 text-white px-3 py-1 rounded text-sm font-medium shadow-lg z-50;
86
+ }
@@ -0,0 +1,14 @@
1
+ import type { Config } from 'tailwindcss';
2
+
3
+ const config: Config = {
4
+ content: [
5
+ './pages/**/*.{js,ts,jsx,tsx,mdx}',
6
+ './components/**/*.{js,ts,jsx,tsx,mdx}',
7
+ ],
8
+ theme: {
9
+ extend: {},
10
+ },
11
+ plugins: [],
12
+ };
13
+
14
+ export default config;
@@ -14,10 +14,11 @@
14
14
  "jsx": "preserve",
15
15
  "incremental": true,
16
16
  "plugins": [{ "name": "next" }],
17
+ "baseUrl": ".",
17
18
  "paths": {
18
19
  "@/*": ["./*"]
19
20
  }
20
21
  },
21
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
22
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
22
23
  "exclude": ["node_modules"]
23
24
  }
@@ -1,115 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import type { Metadata } from 'next';
3
- import Link from 'next/link';
4
- import { notFound } from 'next/navigation';
5
- import { fetchPageData, fetchMenuData } from '@/lib/data-fetching';
6
- import {
7
- componentsRegistry,
8
- navigationRegistry,
9
- isMockMode,
10
- hasBaseUrl,
11
- } from '@/lib/diggo-config';
12
- import { renderPage, renderMenu } from '@digitalygo/diggocms-sdk-core/server';
13
-
14
- export const dynamic = 'force-dynamic';
15
-
16
- interface CatchAllPageProps {
17
- params: Promise<{ slug: string[] }>;
18
- }
19
-
20
- export async function generateMetadata({
21
- params,
22
- }: CatchAllPageProps): Promise<Metadata> {
23
- const { slug: slugParam } = await params;
24
- const slug = (Array.isArray(slugParam) ? slugParam : []).join('/') || 'home';
25
- const { page } = await fetchPageData(slug);
26
-
27
- return {
28
- title: page?.title,
29
- };
30
- }
31
-
32
- export default async function CatchAllPage({
33
- params,
34
- }: CatchAllPageProps): Promise<ReactElement> {
35
- const { slug: slugParam } = await params;
36
- const slug = (Array.isArray(slugParam) ? slugParam : []).join('/') || 'home';
37
-
38
- const [{ page, error, usingMock }, { menu }] = await Promise.all([
39
- fetchPageData(slug),
40
- fetchMenuData('main'),
41
- ]);
42
-
43
- const showMockIndicator = usingMock || isMockMode();
44
- const showError = error && !page;
45
-
46
- if (!page) {
47
- if (!hasBaseUrl() && !isMockMode()) {
48
- return (
49
- <div className="container">
50
- <header className="header">
51
- <div className="header-content container">
52
- <div className="logo">My DiggoCMS App</div>
53
- </div>
54
- </header>
55
- <main className="main container">
56
- <div className="error-banner">
57
- <strong>Error:</strong> BASE_URL is not configured and MOCK mode
58
- is disabled.
59
- </div>
60
- <p>
61
- Please configure your environment variables. Copy{' '}
62
- <code>.env.local.example</code> to <code>.env.local</code> and set
63
- either:
64
- </p>
65
- <ul style={{ marginLeft: '1.5rem', marginTop: '0.5rem' }}>
66
- <li>
67
- <code>MOCK=1</code> to use local fixtures
68
- </li>
69
- <li>
70
- <code>BASE_URL</code> to your CMS API endpoint
71
- </li>
72
- </ul>
73
- </main>
74
- </div>
75
- );
76
- }
77
-
78
- notFound();
79
- }
80
-
81
- return (
82
- <div>
83
- <header className="header">
84
- <div className="header-content container">
85
- <Link href="/" className="logo">
86
- My DiggoCMS App
87
- </Link>
88
- {menu && renderMenu(menu, navigationRegistry)}
89
- </div>
90
- </header>
91
-
92
- <main className="main container">
93
- {showError && !showMockIndicator && (
94
- <div className="error-banner">
95
- <strong>Warning:</strong> {error}
96
- </div>
97
- )}
98
-
99
- {showMockIndicator && (
100
- <div className="mock-badge">
101
- Mock Mode
102
- </div>
103
- )}
104
-
105
- {renderPage(page, componentsRegistry)}
106
- </main>
107
-
108
- <footer className="footer">
109
- <div className="container">
110
- <p>My DiggoCMS App &copy; {new Date().getFullYear()}</p>
111
- </div>
112
- </footer>
113
- </div>
114
- );
115
- }
@@ -1,187 +0,0 @@
1
- * {
2
- margin: 0;
3
- padding: 0;
4
- box-sizing: border-box;
5
- }
6
-
7
- body {
8
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
9
- line-height: 1.6;
10
- color: #333;
11
- }
12
-
13
- .container {
14
- max-width: 1200px;
15
- margin: 0 auto;
16
- padding: 0 1rem;
17
- }
18
-
19
- /* Header Styles */
20
- .header {
21
- background: #fff;
22
- border-bottom: 1px solid #e5e7eb;
23
- padding: 1rem 0;
24
- margin-bottom: 2rem;
25
- }
26
-
27
- .header-content {
28
- display: flex;
29
- justify-content: space-between;
30
- align-items: center;
31
- flex-wrap: wrap;
32
- gap: 1rem;
33
- }
34
-
35
- .logo {
36
- font-size: 1.5rem;
37
- font-weight: 700;
38
- color: #3b82f6;
39
- text-decoration: none;
40
- }
41
-
42
- /* Main Content */
43
- .main {
44
- min-height: calc(100vh - 200px);
45
- padding-bottom: 3rem;
46
- }
47
-
48
- /* Footer Styles */
49
- .footer {
50
- background: #f9fafb;
51
- border-top: 1px solid #e5e7eb;
52
- padding: 2rem 0;
53
- text-align: center;
54
- color: #6b7280;
55
- }
56
-
57
- /* Error Banner */
58
- .error-banner {
59
- background: #fef3c7;
60
- border: 1px solid #fbbf24;
61
- border-radius: 0.375rem;
62
- padding: 1rem;
63
- margin-bottom: 1.5rem;
64
- color: #92400e;
65
- }
66
-
67
- /* Mock Badge */
68
- .mock-badge {
69
- display: inline-block;
70
- background: #dbeafe;
71
- color: #1e40af;
72
- padding: 0.25rem 0.75rem;
73
- border-radius: 9999px;
74
- font-size: 0.75rem;
75
- font-weight: 500;
76
- margin-bottom: 1rem;
77
- }
78
-
79
- /* Component Styles */
80
- .diggo-title {
81
- font-size: 2.5rem;
82
- font-weight: 700;
83
- color: #111827;
84
- margin-bottom: 1rem;
85
- line-height: 1.2;
86
- }
87
-
88
- .diggo-subtitle {
89
- font-size: 1.5rem;
90
- font-weight: 600;
91
- color: #374151;
92
- margin-bottom: 1rem;
93
- margin-top: 2rem;
94
- line-height: 1.3;
95
- }
96
-
97
- .diggo-image {
98
- max-width: 100%;
99
- height: auto;
100
- border-radius: 0.5rem;
101
- margin: 1rem 0;
102
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
103
- }
104
-
105
- .diggo-richtext {
106
- margin: 1rem 0;
107
- }
108
-
109
- .diggo-richtext p {
110
- margin-bottom: 1rem;
111
- }
112
-
113
- .diggo-card {
114
- background: #fff;
115
- border: 1px solid #e5e7eb;
116
- border-radius: 0.5rem;
117
- padding: 1.5rem;
118
- margin: 1.5rem 0;
119
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
120
- }
121
-
122
- .diggo-card .diggo-title {
123
- font-size: 1.25rem;
124
- margin-bottom: 0.5rem;
125
- }
126
-
127
- .diggo-card .diggo-subtitle {
128
- font-size: 1rem;
129
- color: #6b7280;
130
- margin-top: 0;
131
- margin-bottom: 1rem;
132
- }
133
-
134
- /* Navigation Styles */
135
- .menu {
136
- display: flex;
137
- }
138
-
139
- .menu-list {
140
- display: flex;
141
- list-style: none;
142
- gap: 1.5rem;
143
- flex-wrap: wrap;
144
- }
145
-
146
- .menu-item {
147
- position: relative;
148
- }
149
-
150
- .menu-link {
151
- color: #374151;
152
- text-decoration: none;
153
- font-weight: 500;
154
- padding: 0.5rem 0;
155
- transition: color 0.2s;
156
- }
157
-
158
- .menu-link:hover {
159
- color: #3b82f6;
160
- }
161
-
162
- .menu-link[aria-current='page'] {
163
- color: #3b82f6;
164
- border-bottom: 2px solid #3b82f6;
165
- }
166
-
167
- .menu-item ul {
168
- display: none;
169
- position: absolute;
170
- top: 100%;
171
- left: 0;
172
- background: #fff;
173
- border: 1px solid #e5e7eb;
174
- border-radius: 0.375rem;
175
- padding: 0.5rem 0;
176
- min-width: 150px;
177
- list-style: none;
178
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
179
- }
180
-
181
- .menu-item:hover > ul {
182
- display: block;
183
- }
184
-
185
- .menu-item ul li {
186
- padding: 0.25rem 1rem;
187
- }
@@ -1,25 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import { DiggoProvider } from '@/components/DiggoProvider';
3
- import './globals.css';
4
-
5
- export const metadata = {
6
- title: {
7
- template: '%s | My DiggoCMS App',
8
- default: 'My DiggoCMS App',
9
- },
10
- description: 'Built with DiggoCMS SDK',
11
- };
12
-
13
- export default function RootLayout({
14
- children,
15
- }: {
16
- children: React.ReactNode;
17
- }): ReactElement {
18
- return (
19
- <html lang="en">
20
- <body>
21
- <DiggoProvider>{children}</DiggoProvider>
22
- </body>
23
- </html>
24
- );
25
- }
@@ -1,6 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import { redirect } from 'next/navigation';
3
-
4
- export default function HomePage(): ReactElement {
5
- redirect('/home');
6
- }
@@ -1,15 +0,0 @@
1
- import type { RichtextProps } from '@digitalygo/diggocms-sdk-core';
2
- import type { ReactElement } from 'react';
3
-
4
- export function ExtendedRichtext({ content }: RichtextProps): ReactElement | null {
5
- if (!content) {
6
- return null;
7
- }
8
-
9
- return (
10
- <div
11
- className="diggo-richtext"
12
- dangerouslySetInnerHTML={{ __html: content }}
13
- />
14
- );
15
- }
@@ -1,10 +0,0 @@
1
- import type { SubtitleProps } from '@digitalygo/diggocms-sdk-core';
2
- import type { ReactElement } from 'react';
3
-
4
- export function ExtendedSubtitle({ content }: SubtitleProps): ReactElement | null {
5
- if (!content) {
6
- return null;
7
- }
8
-
9
- return <h2 className="diggo-subtitle">{content}</h2>;
10
- }