@digitalygo/create-diggocms-app 0.1.1 → 0.1.3
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.
- package/README.md +96 -23
- package/bin/cli.js +52 -94
- package/package.json +1 -1
- package/templates/full/.env.local.example +3 -2
- package/templates/full/README.md +64 -22
- package/templates/full/components/PageLayout.tsx +40 -0
- package/templates/full/lib/data-fetching.ts +55 -10
- package/templates/full/lib/diggo-config.ts +4 -2
- package/templates/full/package.json +3 -1
- package/templates/full/pages/[...slug].tsx +93 -0
- package/templates/full/pages/_app.tsx +11 -0
- package/templates/full/pages/index.tsx +14 -0
- package/templates/full/postcss.config.js +6 -0
- package/templates/full/styles/globals.css +113 -0
- package/templates/full/tailwind.config.ts +14 -0
- package/templates/full/tsconfig.json +2 -1
- package/templates/minimal/.env.local.example +3 -2
- package/templates/minimal/README.md +44 -10
- package/templates/minimal/lib/data-fetching.ts +46 -12
- package/templates/minimal/lib/diggo-config.ts +2 -5
- package/templates/minimal/package.json +3 -1
- package/templates/minimal/pages/[...slug].tsx +73 -0
- package/templates/minimal/pages/_app.tsx +11 -0
- package/templates/minimal/pages/index.tsx +14 -0
- package/templates/minimal/postcss.config.js +6 -0
- package/templates/minimal/{app → styles}/globals.css +4 -0
- package/templates/minimal/tailwind.config.ts +14 -0
- package/templates/minimal/tsconfig.json +2 -1
- package/templates/with-mock/.env.local.example +3 -2
- package/templates/with-mock/README.md +61 -33
- package/templates/with-mock/components/PageLayout.tsx +40 -0
- package/templates/with-mock/lib/data-fetching.ts +56 -11
- package/templates/with-mock/lib/diggo-config.ts +4 -2
- package/templates/with-mock/package.json +7 -3
- package/templates/with-mock/pages/[...slug].tsx +117 -0
- package/templates/with-mock/pages/_app.tsx +11 -0
- package/templates/with-mock/pages/index.tsx +14 -0
- package/templates/with-mock/postcss.config.js +6 -0
- package/templates/with-mock/scripts/mock-server.ts +0 -6
- package/templates/with-mock/styles/globals.css +118 -0
- package/templates/with-mock/tailwind.config.ts +14 -0
- package/templates/with-mock/tsconfig.json +2 -1
- package/templates/full/app/[...slug]/page.tsx +0 -115
- package/templates/full/app/globals.css +0 -238
- package/templates/full/app/layout.tsx +0 -25
- package/templates/full/app/page.tsx +0 -6
- package/templates/full/tsconfig.tsbuildinfo +0 -1
- package/templates/minimal/app/[...slug]/page.tsx +0 -56
- package/templates/minimal/app/layout.tsx +0 -22
- package/templates/minimal/app/page.tsx +0 -6
- package/templates/with-mock/app/[...slug]/page.tsx +0 -115
- package/templates/with-mock/app/globals.css +0 -238
- package/templates/with-mock/app/layout.tsx +0 -25
- package/templates/with-mock/app/page.tsx +0 -6
- package/templates/with-mock/tsconfig.tsbuildinfo +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentRegistry, NavigationRegistry, DiggoConfig } from '@digitalygo/diggocms-sdk-core';
|
|
2
2
|
import {
|
|
3
|
+
ExtendedTitle,
|
|
3
4
|
ExtendedImage,
|
|
4
5
|
ExtendedText,
|
|
5
6
|
ExtendedVideo,
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
10
11
|
} from '@/components/server-components';
|
|
11
12
|
|
|
12
13
|
export const componentsRegistry = {
|
|
14
|
+
title: ExtendedTitle,
|
|
13
15
|
image: ExtendedImage,
|
|
14
16
|
text: ExtendedText,
|
|
15
17
|
video: ExtendedVideo,
|
|
@@ -31,7 +33,7 @@ function getBaseUrl(): string {
|
|
|
31
33
|
return mockApiUrl ?? 'http://localhost:3001';
|
|
32
34
|
}
|
|
33
35
|
|
|
34
|
-
return baseUrl ?? '
|
|
36
|
+
return baseUrl ?? '';
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export const sdkConfig: DiggoConfig = {
|
|
@@ -45,5 +47,5 @@ export function isMockMode(): boolean {
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
export function hasBaseUrl(): boolean {
|
|
48
|
-
return !!baseUrl;
|
|
50
|
+
return !!baseUrl && baseUrl.length > 0;
|
|
49
51
|
}
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
"name": "my-diggocms-app",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
5
|
"scripts": {
|
|
7
6
|
"dev": "next dev",
|
|
8
7
|
"build": "next build",
|
|
9
8
|
"start": "next start",
|
|
10
9
|
"lint": "next lint",
|
|
11
10
|
"typecheck": "tsc --noEmit",
|
|
12
|
-
"mock:api": "
|
|
13
|
-
"dev:mock": "
|
|
11
|
+
"mock:api": "tsx scripts/mock-server.ts",
|
|
12
|
+
"dev:mock": "concurrently \"pm run mock:api\" \"pm run dev\""
|
|
14
13
|
},
|
|
15
14
|
"dependencies": {
|
|
16
15
|
"@digitalygo/diggocms-sdk-core": "^0.1.0",
|
|
@@ -22,6 +21,11 @@
|
|
|
22
21
|
"@types/node": "^20.0.0",
|
|
23
22
|
"@types/react": "^18.3.0",
|
|
24
23
|
"@types/react-dom": "^18.3.0",
|
|
24
|
+
"autoprefixer": "^10.4.19",
|
|
25
|
+
"concurrently": "^9.0.0",
|
|
26
|
+
"postcss": "^8.4.38",
|
|
27
|
+
"tailwindcss": "^3.4.4",
|
|
28
|
+
"tsx": "^4.0.0",
|
|
25
29
|
"typescript": "^5.5.0"
|
|
26
30
|
}
|
|
27
31
|
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { GetStaticPaths, GetStaticProps } from 'next';
|
|
2
|
+
import type { MenuPayload, 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 { PageLayout } from '@/components/PageLayout';
|
|
8
|
+
import {
|
|
9
|
+
fetchMenuData,
|
|
10
|
+
fetchPageData,
|
|
11
|
+
FetchMenuResult,
|
|
12
|
+
FetchPageResult,
|
|
13
|
+
loadPagesIndex,
|
|
14
|
+
} from '@/lib/data-fetching';
|
|
15
|
+
|
|
16
|
+
interface CatchAllPageProps {
|
|
17
|
+
page: PagePayload | null;
|
|
18
|
+
error: string | null;
|
|
19
|
+
usingMock: boolean;
|
|
20
|
+
menu: MenuPayload | null;
|
|
21
|
+
menuError: string | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default function CatchAllPage({ page, error, usingMock, menu, menuError }: CatchAllPageProps) {
|
|
25
|
+
const router = useRouter();
|
|
26
|
+
|
|
27
|
+
if (router.isFallback) {
|
|
28
|
+
return (
|
|
29
|
+
<div className="min-h-screen flex items-center justify-center">
|
|
30
|
+
<div className="text-lg text-gray-600">Loading...</div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!page) {
|
|
36
|
+
return (
|
|
37
|
+
<PageLayout menu={menu} menuError={menuError}>
|
|
38
|
+
<h1 className="text-3xl font-bold text-gray-900 mb-4">Page Not Found</h1>
|
|
39
|
+
{error && (
|
|
40
|
+
<div className="bg-red-50 border border-red-200 text-red-800 p-4 rounded">
|
|
41
|
+
{error}
|
|
42
|
+
</div>
|
|
43
|
+
)}
|
|
44
|
+
</PageLayout>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<>
|
|
50
|
+
<Head>
|
|
51
|
+
<title>{page.title || 'My DiggoCMS App'}</title>
|
|
52
|
+
<meta name="description" content={page.title || 'DiggoCMS powered page'} />
|
|
53
|
+
</Head>
|
|
54
|
+
{usingMock && (
|
|
55
|
+
<div className="mock-indicator">
|
|
56
|
+
Mock Mode
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
59
|
+
<PageLayout menu={menu} menuError={menuError}>
|
|
60
|
+
{error && (
|
|
61
|
+
<div className="bg-yellow-50 border border-yellow-200 text-yellow-800 p-4 mb-6 rounded">
|
|
62
|
+
<strong className="font-semibold">Warning:</strong> {error}
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
65
|
+
{renderPage(page, componentsRegistry)}
|
|
66
|
+
</PageLayout>
|
|
67
|
+
</>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export const getStaticPaths: GetStaticPaths = async () => {
|
|
72
|
+
if (isMockMode()) {
|
|
73
|
+
try {
|
|
74
|
+
const pages = await loadPagesIndex();
|
|
75
|
+
return {
|
|
76
|
+
paths: pages.map((page) => ({
|
|
77
|
+
params: {
|
|
78
|
+
slug: page.slug === '' ? ['home'] : page.slug.split('/')
|
|
79
|
+
},
|
|
80
|
+
})),
|
|
81
|
+
fallback: 'blocking',
|
|
82
|
+
};
|
|
83
|
+
} catch {}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
paths: [],
|
|
88
|
+
fallback: 'blocking',
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const getStaticProps: GetStaticProps<CatchAllPageProps> = async ({ params }) => {
|
|
93
|
+
const slugArray = params?.slug as string[] | undefined;
|
|
94
|
+
const slug = Array.isArray(slugArray) ? slugArray.join('/') : 'home';
|
|
95
|
+
|
|
96
|
+
const [{ page, error, usingMock }, { menu, error: menuError }]: [
|
|
97
|
+
FetchPageResult,
|
|
98
|
+
FetchMenuResult,
|
|
99
|
+
] = await Promise.all([fetchPageData(slug), fetchMenuData('main')]);
|
|
100
|
+
|
|
101
|
+
if (!page) {
|
|
102
|
+
return {
|
|
103
|
+
notFound: true,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
props: {
|
|
109
|
+
page,
|
|
110
|
+
error,
|
|
111
|
+
usingMock,
|
|
112
|
+
menu,
|
|
113
|
+
menuError,
|
|
114
|
+
},
|
|
115
|
+
revalidate: isMockMode() ? false : 60,
|
|
116
|
+
};
|
|
117
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -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,118 @@
|
|
|
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
|
+
.page-shell {
|
|
18
|
+
@apply min-h-screen bg-gray-50;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.site-header {
|
|
22
|
+
@apply bg-white border-b border-gray-200 shadow-sm;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.site-header__inner {
|
|
26
|
+
@apply max-w-5xl mx-auto px-6 py-4 flex flex-col gap-3 md:flex-row md:items-center md:justify-between;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.site-brand {
|
|
30
|
+
@apply text-lg font-semibold text-gray-900 hover:text-blue-600 transition-colors;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.site-nav {
|
|
34
|
+
@apply w-full md:w-auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.page-content {
|
|
38
|
+
@apply max-w-5xl mx-auto px-6 py-10;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* DiggoCMS Component Styles */
|
|
42
|
+
.diggo-title {
|
|
43
|
+
@apply text-3xl font-bold mb-4 text-gray-900;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.diggo-text {
|
|
47
|
+
@apply mb-4 text-gray-700 leading-relaxed;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.diggo-image {
|
|
51
|
+
@apply max-w-full h-auto rounded-lg shadow-md mb-6;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.diggo-video-block {
|
|
55
|
+
@apply mb-6;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.diggo-video {
|
|
59
|
+
@apply w-full rounded-lg shadow-md;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.diggo-media-caption {
|
|
63
|
+
@apply text-sm text-gray-600 mt-2 text-center;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.diggo-gallery {
|
|
67
|
+
@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.diggo-gallery-image {
|
|
71
|
+
@apply w-full h-48 object-cover rounded-lg shadow-md;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.diggo-gallery-video {
|
|
75
|
+
@apply w-full h-48 rounded-lg shadow-md;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.diggo-card {
|
|
79
|
+
@apply border border-gray-200 rounded-lg p-6 shadow-sm mb-6 bg-white;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.diggo-card-link {
|
|
83
|
+
@apply inline-block mt-4 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Navigation Styles */
|
|
87
|
+
.menu {
|
|
88
|
+
@apply w-full;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.menu-list {
|
|
92
|
+
@apply flex flex-wrap gap-4 items-center justify-start md:justify-end list-none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.menu-item {
|
|
96
|
+
@apply relative;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.menu-link {
|
|
100
|
+
@apply text-gray-700 hover:text-blue-600 font-medium transition-colors;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.menu-link[aria-current="page"] {
|
|
104
|
+
@apply text-blue-600 font-semibold;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.menu-fallback {
|
|
108
|
+
@apply text-sm text-gray-500 bg-gray-100 border border-gray-200 rounded px-3 py-2 inline-flex items-center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.menu-alert {
|
|
112
|
+
@apply bg-yellow-50 text-yellow-800 border-t border-yellow-200 px-6 py-3 text-sm;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Mock Mode Indicator */
|
|
116
|
+
.mock-indicator {
|
|
117
|
+
@apply fixed bottom-4 right-4 bg-blue-600 text-white px-3 py-1 rounded text-sm font-medium shadow-lg z-50;
|
|
118
|
+
}
|
|
@@ -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"
|
|
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 © {new Date().getFullYear()}</p>
|
|
111
|
-
</div>
|
|
112
|
-
</footer>
|
|
113
|
-
</div>
|
|
114
|
-
);
|
|
115
|
-
}
|