Skip to content

Commit

Permalink
Merge pull request #4198 from signalco-io/feat/cms/core
Browse files Browse the repository at this point in the history
Feat/cms/core
  • Loading branch information
AleksandarDev authored Dec 27, 2023
2 parents 002bf2d + 3eed0f4 commit 92ab31f
Show file tree
Hide file tree
Showing 63 changed files with 593 additions and 247 deletions.
11 changes: 5 additions & 6 deletions web/apps/doprocess/app/(rest)/(marketing)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Check } from '@signalco/ui-icons';
import { Pricing1 } from '@signalco/cms-feature-marketing/Pricing';
import { Heading1 } from '@signalco/cms-feature-marketing/Heading';
import { Feature2, Feature1 } from '@signalco/cms-feature-marketing/Feature';
import { Faq1 } from '@signalco/cms-feature-marketing/Faq';
import { type SectionData } from '@signalco/cms-core/SectionData';
import { KnownPages } from '../../../src/knownPages';
import Footer from '../../../components/pages/Footer';
import { SectionData } from '../../../components/cms/SectionData';
import { Heading1 } from '../../../components/cms/Heading1';
import { Faq1 } from '../../../components/cms/Faq1';
import { Pricing1 } from '../../../components/cms/Pricing1';
import { Feature2 } from '../../../components/cms/Feature2';
import { Feature1 } from '../../../components/cms/Feature1';

export default function LandingPage() {
const data: SectionData[] = [
Expand Down
2 changes: 2 additions & 0 deletions web/apps/doprocess/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"@hcaptcha/react-hcaptcha": "1.9.2",
"@next/env": "14.0.4",
"@planetscale/database": "1.13.0",
"@signalco/cms-core": "workspace:*",
"@signalco/cms-feature-marketing": "workspace:*",
"@signalco/data": "workspace:*",
"@signalco/hooks": "workspace:*",
"@signalco/js": "workspace:*",
Expand Down
3 changes: 2 additions & 1 deletion web/apps/doprocess/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {
'./app/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'../../packages/ui/src/**/*.{ts,tsx}',
'../../packages/ui-primitives/src/**/*.{ts,tsx}'
'../../packages/ui-primitives/src/**/*.{ts,tsx}',
'../../packages/cms-feature-marketing/src/**/*.{ts,tsx}',
]
}
78 changes: 54 additions & 24 deletions web/apps/uier/app/(rest)/(marketing)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,63 @@
import { ExoticComponent, memo } from 'react';
import { Heading1 } from '@signalco/cms-feature-marketing/Heading';
import { Footer1 } from '@signalco/cms-feature-marketing/Footer';
import { SectionsView } from '@signalco/cms-core/SectionsView';
import { type SectionData } from '@signalco/cms-core/SectionData';
import { KnownPages } from '../../../src/knownPages';

function Cover({ header }: { header?: string }) {
return (
<div>{header}</div>
)
}
const data: SectionData[] = [
{
component: 'Heading1',
header: 'uier',
ctas: [
{ label: 'Get Started', href: KnownPages.App },
]
},
{
component: 'Footer1',
features: [
{
header: 'Product',
ctas: [
{ label: 'uier', href: KnownPages.App },
{ label: 'uier', href: KnownPages.App },
{ label: 'uier', href: KnownPages.App },
]
},
{
header: 'Product',
ctas: [
{ label: 'uier', href: KnownPages.App },
{ label: 'uier', href: KnownPages.App },
{ label: 'uier', href: KnownPages.App },
]
},
{
header: 'Legal',
ctas: [
{ label: 'Privacy Policy', href: KnownPages.LegalPrivacyPolicy },
{ label: 'Terms of Service', href: KnownPages.LegalTermsOfService },
{ label: 'Cookie Policy', href: KnownPages.LegalCookiePolicy },
{ label: 'Acceptable Use Policy', href: KnownPages.LegalAcceptableUsePolicy },
{ label: 'SLA', href: KnownPages.LegalSla }
]
}
],
tagline: 'uier',
}
];

export default function LandingPage() {
const data = [
{
header: 'uier',
ctas: [
{ label: 'Get Started', href: KnownPages.App },
]
}
];

const sections = [
Cover
];
const sectionComponents: { [key: string]: ExoticComponent<SectionData> } = {
'Heading1': memo(Heading1),
'Footer1': memo(Footer1)
};

export default function LandingPage() {
return (
<main>
{sections.map((Section, index) => {
const sectionData = data[index];
return (
<Section key={index} {...sectionData} />
);
})}
<SectionsView
sectionsData={data}
componentsRegistry={sectionComponents} />
</main>
);
}
4 changes: 3 additions & 1 deletion web/apps/uier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"dependencies": {
"@enterwell/react-hooks": "0.4.1",
"@next/env": "14.0.4",
"@signalco/cms-core": "workspace:*",
"@signalco/cms-feature-marketing": "workspace:*",
"@signalco/data": "workspace:*",
"@signalco/hooks": "workspace:*",
"@signalco/js": "workspace:*",
Expand Down Expand Up @@ -69,4 +71,4 @@
"showDetails": true,
"skipCommentIfEmpty": true
}
}
}
6 changes: 6 additions & 0 deletions web/apps/uier/src/knownPages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export const KnownPages = {
Landing: '/',
App: '/app',

LegalPrivacyPolicy: '/legal/privacy-policy',
LegalTermsOfService: '/legal/terms-of-service',
LegalCookiePolicy: '/legal/cookie-policy',
LegalAcceptableUsePolicy: '/legal/acceptable-use-policy',
LegalSla: '/legal/sla'
} as const;
3 changes: 2 additions & 1 deletion web/apps/uier/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {
'./app/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'../../packages/ui/src/**/*.{ts,tsx}',
'../../packages/ui-primitives/src/**/*.{ts,tsx}'
'../../packages/ui-primitives/src/**/*.{ts,tsx}',
'../../packages/cms-feature-marketing/src/**/*.{ts,tsx}',
]
}
6 changes: 5 additions & 1 deletion web/apps/web/app/(rest)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export { PageLayout as default } from '../../components/layouts/PageLayout';
import { PageLayout } from '../../components/layouts/PageLayout';

export default function RestLayout() {
return <PageLayout />;
}
8 changes: 1 addition & 7 deletions web/apps/web/components/layouts/EmptyLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import { PropsWithChildren } from 'react';

export function EmptyLayout(props: PropsWithChildren) {
const {
children
} = props;

return (
<div className="relative h-full">
{children}
</div>
<main className="relative h-full" {...props} />
);
}
14 changes: 2 additions & 12 deletions web/apps/web/components/layouts/PageFullLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import { PropsWithChildren } from 'react';
import { Stack } from '@signalco/ui-primitives/Stack';
import Footer from '../pages/Footer';
import { PageNav } from '../PageNav';
import { PageLayout } from './PageLayout';

export function PageFullLayout(props: PropsWithChildren) {
return (
<Stack spacing={4}>
<PageNav fullWidth />
<div className="pt-20">
{props.children}
</div>
<Footer />
</Stack>
);
return <PageLayout fullWidth {...props} />;
}
72 changes: 65 additions & 7 deletions web/apps/web/components/layouts/PageLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,76 @@
import { PropsWithChildren } from 'react';
import { Fragment, PropsWithChildren } from 'react';
import { Stack } from '@signalco/ui-primitives/Stack';
import { Container } from '@signalco/ui-primitives/Container';
import Footer from '../pages/Footer';
import { CompanyX, CompanyReddit, CompanyGitHub } from '@signalco/ui-icons';
import { Footer1 } from '@signalco/cms-feature-marketing/Footer';
import { SectionData } from '@signalco/cms-core/SectionData';
import { SystemStatusLabel } from '../pages/SystemStatusLabel';
import { PageNav } from '../PageNav';
import SignalcoLogotype from '../icons/SignalcoLogotype';
import { KnownPages } from '../../src/knownPages';

export function PageLayout({ children }: PropsWithChildren) {
const footerData: SectionData = {
tagline: 'signalco',
asset: <SignalcoLogotype width={220} />,
features: [
{
header: 'Product',
ctas: [
{ label: 'Features', href: KnownPages.Features },
{ label: 'Channels', href: KnownPages.Channels },
{ label: 'App', href: KnownPages.App },
{ label: 'Pricing', href: KnownPages.Pricing },
{ label: 'Station', href: KnownPages.Station },
{ label: 'Roadmap', href: KnownPages.Roadmap },
]
},
{
header: 'Community',
ctas: [
{ label: 'r/signalco', href: 'https://www.reddit.com/r/signalco/' },
{ label: 'Discussions on GitHub', href: 'https://github.com/signalco-io/signalco/discussions' },
]
},
{
header: 'Resources',
ctas: [
{ label: 'Status', href: KnownPages.Status },
{ label: 'Design', href: KnownPages.UiDocs },
{ label: 'API', href: KnownPages.DocsApi }
]
},
{
header: 'Legal',
ctas: [
{ label: 'Privacy Policy', href: KnownPages.LegalPrivacyPolicy },
{ label: 'Terms of Service', href: KnownPages.LegalTermsOfService },
{ label: 'Cookie Policy', href: KnownPages.LegalCookiePolicy },
{ label: 'Acceptable Use Policy', href: KnownPages.LegalAcceptableUsePolicy },
{ label: 'SLA', href: KnownPages.LegalSla },
]
},
{
tagline: 'SystemStatus',
asset: <SystemStatusLabel />
}
],
ctas: [
{ label: 'X formerly known as Twitter', href: 'https://x.com/signalco_io', icon: <CompanyX /> },
{ label: 'reddit', href: 'https://www.reddit.com/r/signalco/', icon: <CompanyReddit /> },
{ label: 'GitHub', href: 'https://github.com/signalco-io/signalco', icon: <CompanyGitHub /> },
]
};

export function PageLayout({ children, fullWidth }: PropsWithChildren<{ fullWidth?: boolean }>) {
const ContentContainer = fullWidth ? Fragment : Container;
return (
<Stack spacing={4}>
<PageNav />
<PageNav fullWidth={fullWidth} />
<main className="pt-20">
<Container>
<ContentContainer>
{children}
</Container>
</ContentContainer>
</main>
<Footer />
<Footer1 {...footerData} />
</Stack>);
}
90 changes: 0 additions & 90 deletions web/apps/web/components/pages/Footer/Footer.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions web/apps/web/components/pages/Footer/FooterContainer.tsx

This file was deleted.

Loading

0 comments on commit 92ab31f

Please sign in to comment.