improve(public): re-design landing page a bit
This commit is contained in:
@@ -79,7 +79,7 @@ export default async function Page({
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
/>
|
||||
<article className="container max-w-4xl col">
|
||||
<div className="py-16 col gap-3">
|
||||
<div className="pt-16 pb-4 col gap-3">
|
||||
<h1 className="text-5xl font-bold">{page.data.title}</h1>
|
||||
{page.data.description && (
|
||||
<p className="text-muted-foreground text-xl">
|
||||
|
||||
86
apps/public/app/(content)/bajs/page.tsx
Normal file
86
apps/public/app/(content)/bajs/page.tsx
Normal file
@@ -0,0 +1,86 @@
|
||||
import { url } from '@/app/layout.config';
|
||||
import { pageSource } from '@/lib/source';
|
||||
import type { Metadata } from 'next';
|
||||
import { notFound } from 'next/navigation';
|
||||
import Script from 'next/script';
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const page = await pageSource.getPage(['pricing']);
|
||||
|
||||
if (!page) {
|
||||
return {
|
||||
title: 'Page Not Found',
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
title: page.data.title,
|
||||
description: page.data.description,
|
||||
alternates: {
|
||||
canonical: url(page.url),
|
||||
},
|
||||
openGraph: {
|
||||
title: page.data.title,
|
||||
description: page.data.description,
|
||||
type: 'website',
|
||||
url: url(page.url),
|
||||
},
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
title: page.data.title,
|
||||
description: page.data.description,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default async function Page() {
|
||||
const page = await pageSource.getPage(['pricing']);
|
||||
const Body = page?.data.body;
|
||||
|
||||
if (!page || !Body) {
|
||||
return notFound();
|
||||
}
|
||||
|
||||
// Create the JSON-LD data
|
||||
const jsonLd = {
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Article',
|
||||
headline: page.data.title,
|
||||
publisher: {
|
||||
'@type': 'Organization',
|
||||
name: 'OpenPanel',
|
||||
logo: {
|
||||
'@type': 'ImageObject',
|
||||
url: url('/logo.png'),
|
||||
},
|
||||
},
|
||||
mainEntityOfPage: {
|
||||
'@type': 'WebPage',
|
||||
'@id': url(page.url),
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Script
|
||||
id="page-schema"
|
||||
strategy="beforeInteractive"
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||
/>
|
||||
<article className="container max-w-4xl col">
|
||||
<div className="pt-16 pb-8 col gap-3">
|
||||
<h1 className="text-5xl font-bold">{page.data.title}</h1>
|
||||
{page.data.description && (
|
||||
<p className="text-muted-foreground text-xl">
|
||||
{page.data.description}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="prose">
|
||||
<Body />
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import { Pricing } from '@/components/sections/pricing';
|
||||
import { Sdks } from '@/components/sections/sdks';
|
||||
import { Stats, StatsPure } from '@/components/sections/stats';
|
||||
import { Testimonials } from '@/components/sections/testimonials';
|
||||
import { WhyOpenPanel } from '@/components/why-openpanel';
|
||||
import type { Metadata } from 'next';
|
||||
import { Suspense } from 'react';
|
||||
|
||||
@@ -22,15 +23,9 @@ export default function HomePage() {
|
||||
<Navbar />
|
||||
<main>
|
||||
<Hero />
|
||||
<WhyOpenPanel />
|
||||
<Features />
|
||||
<Testimonials />
|
||||
<Suspense
|
||||
fallback={
|
||||
<StatsPure projectCount={0} eventCount={0} last24hCount={0} />
|
||||
}
|
||||
>
|
||||
<Stats />
|
||||
</Suspense>
|
||||
<Faq />
|
||||
<Pricing />
|
||||
<Sdks />
|
||||
|
||||
Reference in New Issue
Block a user